Last active
December 15, 2015 07:49
-
-
Save comeonly/5226320 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" replace | |
" For function argument with comment header | |
nnoremap <leader>ra viwy?^[\ta-z ]*\<function\><CR>/{<CR>%v%V[/:s/\V<C-r>"//gc<left><left><left> | |
" For variable in function | |
nnoremap <leader>rf viwy?^[\ta-z ]*\<function\><CR>/{<CR>%v%V:s/\V<C-r>"//gc<left><left><left> | |
" For local replace | |
nnoremap <leader>rl gd[{V%:s/<C-R>///gc<left><left><left> | |
" For global replace | |
nnoremap <leader>rg gD:%s/<C-R>///gc<left><left><left> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment