FWIW, on linux I'm using
xmodmap and xcape to use the
Enter key as the control modifier key when it's hold, and
Enter when it's pressed.
I do something similar with the capslock key: control when it's hold, and escape when it's pressed.
I don't know Mac well enough to tell you if you could do something similar, but if you did, you would have 2 symmetric control keys, one on the left, the other on the right of the keyboard.
When you have 2 control keys easily accessible for your left and right little fingers, many key sequences involving the control modifier key become easier to type, imho.
In a file sourced by
xmodmap (I think it could be
~/.Xmodmap), I have this code:
keycode 36 = Hyper_L
remove mod4 = Hyper_L
add control = Hyper_L
keycode 255 = Return
keycode 66 = Control_L
add control = Control_L
These commands make the
Enter and capslock key produce the
Control_L keysym, when the keys are hold.
In a script executed after the machine has started, I have these commands:
xcape -e 'Control_L=Escape'
xcape -e 'Hyper_L=Return'
It restores the keysym
Return on the
Enter key, and the keysym
Escape on the capslock key, when the keys are pressed briefly (< 500ms).
If you don't want to use external tools, you could remap the prefix
C-w, which is used to perform various actions on Vim windows, to
This idea is from justinmk.
gw is a normal operator to format a text-object, or a region of text covered by a motion. For example, you can format the current paragraph hitting
Even though you would lose this operator, you could still use
gq instead, which seems a more powerful alternative.
gq also allows to format text, but, contrary to
gw, you can control its behavior with the options
The idea behind using
gw as a prefix for managing your windows, is to take
g, which Vim uses by default as a common prefix to build various commands / operators / motions (you can see most of them with
:echo map(taglist('^g.$'), 'v:val.name')), and add
w with the mnemonics
If you wanted to test this solution for a while, you could try this mapping:
nnoremap gw <C-w>
From then, to switch from a window to another, instead of hitting
C-w w, you would hit
To open the file under the cursor inside a horizontal split window, instead of hitting
C-w f, you would hit
gwf. And so on...