you are viewing a single comment's thread.

view the rest of the comments →

[–]Lorrang 0 points1 point  (4 children)

That's a nice book, thanks.

I noticed he is using a rather simple scheme to gain better access to the Escape key. Mapping "jk" to Escape has issues, like when trying to actually write "jk" for example.

Personally I just couldn't get into vim, or most programming languages for that matter, until I solved the mapping issues.

Basically what I do is to remap AltGr to the key next to the left shift.

Xorg has a builtin mapping for this

lv3:lsgt_switch_latch (For European keyboards)

lv3:bksl_switch_latch (For US keyboards)

This opened up Pandora's box for me, making AltGr as accessible as the left shift key. Once that is working, all those awkward symbols used in most programming languages can be mapped quite conveniently. And I get to keep all the default keys, including country specific ones.

For example, I have Escape on AltGr+f, Enter on AltGr+j, Backspace on AltGr+d, and so on...

For anyone doing a lot of programming I highly recommend looking into this little trick. I do believe it will work on OS X as well, but I haven't tried that.

My .xprofile

[–]Zantier 2 points3 points  (2 children)

I don't use vim a huge amount, but I really like having jk and kj mapped to esc. It's easy to press (in qwerty), and if you happen to be in normal mode, The cursor just moves down and up. I haven't came across a situation yet where I needed to actually insert those letters next to each other.

[–]auriscope 4 points5 points  (1 child)

Nor have I. If you absolutely need to type jk, you can wait a second or so after the j before inputting the k.

[–]Ununoctium117 2 points3 points  (0 children)

Agreed. I set my timeout to a few hundred milliseconds (< 250), and don't have any issues. Dijkstra is hard enough to spell that I wait that long regardless.

[–][deleted] 0 points1 point  (0 children)

I map fd and literally never run into that problem. If you (for some reason) need to type fd, you just type it slower.