[wellylug] vim question
Grant McLean
grant at mclean.net.nz
Tue Sep 9 12:51:00 NZST 2003
> i have vim rsi in my righthand :-(
> too many times pressing :w
> it's the shift-colon that's doing.
>
> is it possible and easy to change the commands for save to something
> else, like a semicolon instead of a colon?? then i won't need to press
> the shift key.
>
> thanks
> -Brenda
I have mapped Ctrl-W to write the file using this entry in my .vimrc file:
map ^W :w^M
Which I type as:
map <space> Ctrl-V Ctrl-W <space> :w Ctrl-V <enter>
(ie: Ctrl-V is used as prefix before a control character).
That syntax works in vi as well as Vim. Vim also supports a syntax
that doesn't require you to type control characters and I think is
something like this:
map <C-W> :w<Enter>
But if you want to discuss this further, I guess one of us could get
out of our chair and walk across the room :-)
Grant
More information about the wellylug
mailing list