Monday, June 18, 2012

Re: VIM: best way to swap the Caps and esc, but JUST for vim

> experts:
> this might be an old topic...but surprisingly I don't get a good answer from google easily...
> in my work I use linux and I already swapped the esc/caps with xmodmap, so I don't have issue to do it for the whole computer (not just for vim).
>
>
> but from time to time I need to borrow another windows PC, running cygwin terminal, ssh into my linux and work inside vim.
> I don't want to affact other users/apps since this is not just my PC...
> what's the best practice so far to just swap the 2 keys for VIM? or at least, change caps to esc.
>
>
> most/all answers I got involves a system-wide configuration...
> thanks!
>
> regards<span><font color="#888888">
> ping
>
> </font></span></blockquote></div>

If you can use autohotkey paste this into your autohotkey script, it will only
replace caps lock for esc in vim and a few other apps:

; use shift+capslock for the default capslock
+Capslock::Capslock

#IfWinActive, ahk_class Vim
*CapsLock::Esc
#IfWinActive, ahk_class mintty
*CapsLock::Esc
#IfWinActive, ahk_class VanDyke Software - SecureCRT
*CapsLock::Esc
#IfWinActive

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: