Is there a way to do a forward (resp. backward) repeat search with n
(resp. N
) indifferently I start the research with /
/*
or ?
/#
?
1 Answer
I am not sure where I copied these from, but they make n
and N
always go in the same direction
nnoremap <expr> n 'Nn'[v:searchforward] . 'zv'
nnoremap <expr> N 'nN'[v:searchforward] . 'zv'
/
and?
to behave identically and*
and#
to behave identically?