diff options
author | Teddy Wing | 2020-09-29 01:54:17 +0200 |
---|---|---|
committer | Teddy Wing | 2020-09-29 01:54:17 +0200 |
commit | e230b24276a018701b6c3b8645c64fc8b1620985 (patch) | |
tree | e931f72c21ad32926fe71a3971c02997af4085d4 /plugin/grappele.vim | |
parent | 8a05e0113d49585ba1c22251695d5478b1c634ca (diff) | |
parent | 560239bbd9afb7dbf7ce846160bd687b1cfda03f (diff) | |
download | vim-grappele-e230b24276a018701b6c3b8645c64fc8b1620985.tar.bz2 |
Merge branch 'fix-omap'
Diffstat (limited to 'plugin/grappele.vim')
-rw-r--r-- | plugin/grappele.vim | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/plugin/grappele.vim b/plugin/grappele.vim index 9ab1400..be001ea 100644 --- a/plugin/grappele.vim +++ b/plugin/grappele.vim @@ -4,32 +4,30 @@ endif let g:loaded_grappele = 1 -nnoremap <silent> <Plug>Grappele :<c-u>call grappele#Grappele(v:count, 'n')<cr> -nnoremap <silent> <Plug>GrappeleRecall :<c-u>call grappele#Recall('n')<cr> -vnoremap <silent> <Plug>GrappeleRecall :<c-u>call grappele#Recall('v')<cr> -onoremap <silent> <Plug>GrappeleRecall :<c-u>call grappele#Recall('o')<cr> +nnoremap <silent> <expr> <Plug>GrappeleRecall grappele#Recall() +vnoremap <silent> <expr> <Plug>GrappeleRecall grappele#Recall() +onoremap <silent> <expr> <Plug>GrappeleRecall grappele#ORecall() -if !hasmapto('<Plug>Grappele') || !maparg('G', 'n') - nnoremap <silent> G :<c-u>call grappele#Grappele(v:count, 'n')<cr> +if !maparg('G', 'n') + nnoremap <silent> <expr> G grappele#Grappele(v:count) endif -if !hasmapto('<Plug>Grappele') || !maparg('G', 'v') - vnoremap <silent> G - \ :<c-u>call grappele#Grappele(v:count, 'v', visualmode())<cr> +if !maparg('G', 'v') + vnoremap <silent> <expr> G grappele#Grappele(v:count) endif -if !hasmapto('<Plug>Grappele') || !maparg('G', 'o') - onoremap <silent> G :<c-u>call grappele#Grappele(v:count, 'o')<cr> +if !maparg('G', 'o') + onoremap <silent> <expr> G grappele#Grappele(v:count) endif -if !hasmapto('<Plug>GrappeleRecall') || !maparg('gG', 'n') +if !hasmapto('<Plug>GrappeleRecall', 'n') || !maparg('gG', 'n') nmap gG <Plug>GrappeleRecall endif -if !hasmapto('<Plug>GrappeleRecall') || !maparg('gG', 'v') +if !hasmapto('<Plug>GrappeleRecall', 'v') || !maparg('gG', 'v') vmap gG <Plug>GrappeleRecall endif -if !hasmapto('<Plug>GrappeleRecall') || !maparg('gG', 'o') +if !hasmapto('<Plug>GrappeleRecall', 'o') || !maparg('gG', 'o') omap gG <Plug>GrappeleRecall endif |