From d0be3793523620d93f484edce854e06ea4b4adae Mon Sep 17 00:00:00 2001 From: hophacker Date: Tue, 9 Jul 2019 17:36:51 +0800 Subject: [PATCH] toggle set paste through \p --- vim/settings/yadr-keymap.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vim/settings/yadr-keymap.vim b/vim/settings/yadr-keymap.vim index 9e26769..961745c 100644 --- a/vim/settings/yadr-keymap.vim +++ b/vim/settings/yadr-keymap.vim @@ -294,3 +294,15 @@ noremap :echo '戒黄赌毒及上下左右键!' noremap :echo '戒黄赌毒及上下左右键!' noremap :echo '戒黄赌毒及上下左右键!' inoremap fn =expand("%:t") + + +function! TogglePaste() + if &paste + setlocal nopaste + else + setlocal paste + endif +endfunction + +" set paste +nnoremap p :call TogglePaste()