Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. fun! SetupCommandAlias(from, to)
  2. exec 'cnoreabbrev <expr> '.a:from
  3. \ .' ((getcmdtype() is# ":" && getcmdline() is# "'.a:from.'")'
  4. \ .'? ("'.a:to.'") : ("'.a:from.'"))'
  5. endfun
  6. call SetupCommandAlias("W","w")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement