Remap :W to :w for lazy shift finger saving
Not an editor command: W
got you down?
Put this in your $MYVIMRC:
cnoreabbrev <expr> W ((getcmdtype() is# ':' && getcmdline() is# 'W')?('w'):('W'))
Source: http://stackoverflow.com/questions/3878692/aliasing-a-command-in-vim
Note: Not sure if this will break other commands or not, but has been safe for me.
Written by Jonathan Bowers
Related protips
2 Responses
And again, I think using map <C-S> :w<CR>
is a much better alternative.
over 1 year ago
·
That's a lot of voodoo, you can get away with something like this:
command W w
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#