Using Windows key as Meta is very useful in Emacs, is there the way to do it in Vim?
You can use AutoHotkey to map the windows key to a different key. Only activate the mapping when vim is active:
#IfWinActive ahk_class GVIM
RWin::Alt
LWin::Alt
#IfWinActive ; This puts subsequent remappings and hotkeys in effect for all windows.
None of these answers (including this one) is vim-specific, and the selected answer is Windows-specific. Here's one for *nix running X.
I map my left Win key to the Esc key. This won't work in virtual terminals, but it works in X.
Either:
(1) Append keysym Super_L = Escape
to ~/.Xmodmap
and execute xmodmap .Xmodmap
.
|__(1a) ~same as echo "keysym Super_L = Escape" >> ~/.Xmodmap && xmodmap .Xmodmap
.
(2) Execute xmodmap -e "keysym Super_L = Escape"
.
If you want it to work in virtual terminals, see [0].
REFERENCES:
[0] http://www.mail-archive.com/[email protected]/msg02859.html
[1] http://www.paganini.net/index.cgi/linux/nocaps.html
[2] http://ubuntuforums.org/archive/index.php/t-975229.html