Map :W to :w in vim
One of the most annoying things about vim for me was that I frequently typed :W
instead of :w
. This is happens because the colon needs a shift, w doesn't.
So I mapped some commands in my .vimrc
:
:command WQ wq
:command Wq wq
:command W w
:command Q q
Now if I am writing uppercase letters for that commands, the lower case commands will be executed.
Source: http://stackoverflow.com/questions/117150/can-i-re-map-commands-in-vim
Related protips:
Written by Alexander Greim
Related protips
5 Responses
I used to do this, but then I decided to nnoremap ; :
It seems silly, but once you try it for a bit, you won't know how you lived without it!
over 1 year ago
·
you changed my life forever matt, marry me.
over 1 year ago
·
:x
It makes :wq even shorter.
over 1 year ago
·
Or just type ZZ in normal mode
over 1 year ago
·
It worked! F-yeah!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Viml
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#