diff options
author | Teddy Wing | 2019-12-18 00:11:36 +0100 |
---|---|---|
committer | Teddy Wing | 2019-12-18 00:11:36 +0100 |
commit | 893bee02e30851010cc6111c5cc60452cf41191e (patch) | |
tree | d5ac60b3dca4eecc305957801989f385c0c8dc60 | |
parent | 89152f2e6ba1fe65515c3a038051377cd00e9451 (diff) | |
download | vim-nohai-893bee02e30851010cc6111c5cc60452cf41191e.tar.bz2 |
plugin/nohai.vim: Add operator-pending mappings
Make operator-pending versions of the `g/` and `g?` mappings.
-rw-r--r-- | plugin/nohai.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugin/nohai.vim b/plugin/nohai.vim index 44b7d07..3c9f140 100644 --- a/plugin/nohai.vim +++ b/plugin/nohai.vim @@ -23,14 +23,19 @@ let g:loaded_nohai = 1 nnoremap <expr> <Plug>(nohai-search-backward) nohai#Search('?') nnoremap <expr> <Plug>(nohai-search) nohai#Search('/') +onoremap <expr> <Plug>(nohai-search-backward) nohai#Search('?') +onoremap <expr> <Plug>(nohai-search) nohai#Search('/') + if exists('g:nohai_no_maps') && g:nohai_no_maps finish endif -if !hasmapto('<Plug>(nohai-search-backward)') && !maparg('g?', 'n') +if !hasmapto('<Plug>(nohai-search-backward)', 'no') && !maparg('g?', 'no') nmap g? <Plug>(nohai-search-backward) + omap g? <Plug>(nohai-search-backward) endif -if !hasmapto('<Plug>(nohai-search)') && !maparg('g/', 'n') +if !hasmapto('<Plug>(nohai-search)', 'no') && !maparg('g/', 'no') nmap g/ <Plug>(nohai-search) + omap g/ <Plug>(nohai-search) endif |