Created
April 7, 2015 05:38
-
-
Save scajanus/45ba6acbcb770bd9482b to your computer and use it in GitHub Desktop.
Add \%V to substitute pattern
This file contains hidden or 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
| com! -nargs=1 -bar -range Substitute <line1>,<line2>call Substitute(<q-args>) | |
| function! Substitute(arg) range | |
| let arglist = split(a:arg, '/') | |
| echo arglist | |
| exec a:firstline.",".a:lastline . 'substitute/\%V'.arglist[0].'\%V/'.arglist[1].'/'.arglist[2] | |
| endfun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment