diff options
-rw-r--r-- | plugin/monocole.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/monocole.vim b/plugin/monocole.vim index f83ee08..5c88e2d 100644 --- a/plugin/monocole.vim +++ b/plugin/monocole.vim @@ -7,6 +7,7 @@ if !exists('g:monocole_create_mappings') let g:monocole_create_mappings = 1 endif +" Create a monocole from normal mode. This is meant to work with operatorfunc. function! s:create_monocole(text) abort set foldmethod=manual silent! norm zE @@ -15,6 +16,7 @@ function! s:create_monocole(text) abort silent! ']+1,$fold endfunction +" Creates a monocole around a visual block. function! s:v_create_monocole() abort set foldmethod=manual silent! norm zE @@ -27,6 +29,6 @@ noremap <silent> <Plug>(monocole-create) :<C-u>silent!set operatorfunc=<SID>crea vnoremap <silent> <Plug>(v-monocole-create) :<C-u>call <SID>v_create_monocole()<cr> if g:monocole_create_mappings - noremap <silent> <C-f> <Plug>(monocole-create) - vnoremap <silent> <C-f> <Plug>(v-monocole-create) + noremap <silent> z<C-f> <Plug>(monocole-create) + vnoremap <silent> z<C-f> <Plug>(v-monocole-create) endif |