1

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

1
  • Are you saying you want / and ? to behave identically and * and # to behave identically?
    – Tumbler41
    Commented Apr 12, 2017 at 20:53

1 Answer 1

2

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'

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