Tips: unfancy mappings for n/N

This commit is contained in:
Marco Hinz 2016-01-06 14:58:22 +01:00
parent 1607cc4353
commit 169f82e10a

View File

@ -411,8 +411,8 @@ searching forward or backward respectively. This is pretty confusing to me.
If you want `n` to always search forward and `N` backward, use this:
```viml
nnoremap <expr> n 'Nn'[v:searchforward].'zvzz'
nnoremap <expr> N 'nN'[v:searchforward].'zvzz'
nnoremap <expr> n 'Nn'[v:searchforward]
nnoremap <expr> N 'nN'[v:searchforward]
```
#### Quickly move current line