Browse Source

Add local and global variable name substitution

Frans Bergman 6 years ago
parent
commit
c0c7c1c447
1 changed files with 6 additions and 0 deletions
  1. 6 0
      .vimrc

+ 6 - 0
.vimrc

@@ -13,6 +13,12 @@ nnoremap <leader>sv :source $MYVIMRC<cr>
 
 nnoremap <leader>f :tabfind ./**/
 
+" Local (scope) replace
+nnoremap gr gd[{V%::s/<C-R>///gc<left><left><left>
+
+" Global replace
+nnoremap gR gD:%s/<C-R>///gc<left><left><left>
+
 nnoremap Y y$
 nnoremap H ^
 nnoremap L $