Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun! SetupCommandAlias(from, to)
- exec 'cnoreabbrev <expr> '.a:from
- \ .' ((getcmdtype() is# ":" && getcmdline() is# "'.a:from.'")'
- \ .'? ("'.a:to.'") : ("'.a:from.'"))'
- endfun
- call SetupCommandAlias("W","w")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement