From 0d9030e66e6306a627ead0bd0bc404d5a5a8420a Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 30 Aug 2022 20:02:35 -0600 Subject: monocole.vim: change binding to z. --- plugin/monocole.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugin') 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 (monocole-create) :silent!set operatorfunc=crea vnoremap (v-monocole-create) :call v_create_monocole() if g:monocole_create_mappings - noremap (monocole-create) - vnoremap (v-monocole-create) + noremap z (monocole-create) + vnoremap z (v-monocole-create) endif -- cgit