Is there a way to do a forward (resp. backward) repeat search with n (resp. N) indifferently I start the research with //* or ?/# ?

  • Are you saying you want / and ? to behave identically and * and # to behave identically? – Tumbler41 Apr 12 '17 at 20:53

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'
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.