commit 1d6ce90f829c5b63150bfc422f999fc0c08010bc
parent fc19fcbf45136d9ddeeaf82787b8b7aef6f7d2ff
Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe>
Date: Thu, 3 Aug 2023 16:58:23 -0500
Updated vimrc
Diffstat:
| M | vimrc | | | 16 | +++++++++++----- |
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/vimrc b/vimrc
@@ -51,9 +51,15 @@ cabbrev q echo 'Use ZQ'
cabbrev w echo 'Use up'
" Registers
-noremap p <NOP>
-noremap P <NOP>
-for s:i in ['"','*','+','-','.',':','%','/','=','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
- execute 'noremap "'.s:i.'p "'.s:i.'p'
- execute 'noremap "'.s:i.'P "'.s:i.'P'
+for s:i in ['_','"','*','+','-','.',':','%','/','=','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
+ for s:j in ["p","P","y","Y","c","C","d","D"]
+ execute 'nnoremap ' . s:j . ' :<C-U>echo "Use registers instead of ' . s:j . '"<CR>'
+ execute 'nnoremap "' . s:i . s:j . ' "' . s:i . s:j
+ execute 'vnoremap ' . s:j . ' :<C-U>echo "Use registers instead of ' . s:j . '"<CR>'
+ execute 'vnoremap "' . s:i . s:j . ' "' . s:i . s:j
+ endfor
+ for s:j in ["yy","cc","dd"]
+ execute 'nnoremap ' . s:j . ' :<C-U>echo "Use registers instead of ' . s:j . '"<CR>'
+ execute 'nnoremap "' . s:i . s:j . ' "' . s:i . s:j
+ endfor
endfor