Tip #166: Mapping caps lock to esc in XWindows
tip karma |
Rating 70/22, Viewed by 845
|
created: |
|
November 19, 2001 11:19 |
|
complexity: |
|
basic |
author: |
|
Leif Wickland |
|
as of Vim: |
|
5.7 |
(This originally appeared on the vim mailing list as post by Adam Monsen http://groups.yahoo.com/group/vim/message/19856)
If you want to completely swap caps lock and escape, you have to replace the
"Lock" on caps lock. Drop this file in your home dir:<br>
-----------start------------<br>
! Swap caps lock and escape<br>
remove Lock = Caps_Lock<br>
keysym Escape = Caps_Lock<br>
keysym Caps_Lock = Escape<br>
add Lock = Caps_Lock<br>
------------end-------------<br>
and call it ".speedswapper". Then open a terminal and type<br>
$ xmodmap .speedswapper<br>
and you'll be twice as efficient in vim. Who needs caps lock anyway? The swapping lasts for the duration of the X session, so you can put it in a .xinitrc or similar startup file. As far as other people using my laptop, I'd rather they didn't! Using a Dvorak layout might protect me even more... :)
<<Deleting a buffer without closing the window |
Using vim as a man-page viewer under Unix >>
Additional Notes
|