n (next instance of a search) starts moving me up in the file instead of down. Could this be caused by a bug in a plugin?
'n' by default moves in the same direction as the last normal mode search command. So if you used
? to search backwards,
n will also search backwards. Until you use
/ again to search forward, in which case
n will then again also move forward again. The same is true for
Here is a mapping that I use to have
n always search forwards and
N always continue searching backwards:
nnoremap <expr> n (v:searchforward ? 'n' : 'N') nnoremap <expr> N (v:searchforward ? 'N' : 'n')
See also this answer where I explain that in more detail and also how those maps work.