• You are not logged in.
  • Index
  • General
  • I need a rarely used two-key combination of home row keys, for VIM esc

    I need a rarely used two-key combination of home row keys, for VIM esc

    • Started by ksira
    • 12 Replies:
    • Reputation: 0
    • Registered: 24-Aug-2012
    • Posts: 2

    Hi all,

    I switched to Colemak over 20 months ago (first post here though), and I am a VIM 'power user'. Here is my question:

    There is a trick QWERTY users in VIM use to map the 'kj' key combination to the often used escape key. Because you use escape so much in VIM (it is probably up there in most used single commands) when you are in insert mode 'kj' is a really handy mapping for 2 reasons, 1) It is on the home row, 2) it is practically never used in an actual word.

    What I want to figure out is what is the 'optimal' mapping for VIM. I have been using 'ii' because it satisfies the two above conditions for a good mapping. However I have discovered in my months of use one downside of the 'ii' mapping. Often enough, you are ending a word in 'i', or 'i' is the last thing you want to type before escaping insert mode, in that case the second time you press 'i', the first 'i' will be interpreted as the first 'i' in 'ii' and get dropped from the text you entered. Complicated I know, but the bottom line is that an optimal escape mapping in VIM would also have a third condition: the two keys should not repeat.

    My best alternative at this point is 'hd', but it would also be nice to hear anyone elses ideas.

    You may think that I am a little too concerned about this, but I program a lot for my job, and I'm in a text editor/shell all day, and this is one of my major annoyances. I've though about it a fair bit ,and I realize that I'm asking for something that goes exactly against what colemak is asking for. If I just sound crazy, well it's nice to finally say 'hi' to some fellow Colemak users, definitly loving it so far.

    -ksira

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,362

    It's a very common digraph in my language (Norwegian). "Kjempekjekt!" :)

    What I do is use my Extend mode for Linux (XKB) or Windows (PKL). Then Caps+q is Esc, as is Caps+[ (inspired by the common Ctrl+[). The Caps+q one is very easy to hit with the left hand I think.

    Can't help you with the letter digraphs. I personally come across many odd ones (for roman numerals sometimes a slightly old-fashioned or scientific text will use 'i', 'ii', 'iii' etc thus ruining your suggestion). Also, same-finger digraphs are irksome.

    I totally understand and support your concern! What are we but life-hackers anyway? And in your case you have a good explanation for it which is more than I can sometimes claim... ;)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 24-Aug-2012
    • Posts: 2

    I am sorry that I sounded like I was saying English is the only language with 'actual words'! I just happen to speak it exclusively (though not very well), and I forgot my manners.

    Good ideas though, I like the feel of something like Caps+t better though, as it feels firmer and more balanced with my hands. =)

    Last edited by ksira (24-Aug-2012 12:00:27)
    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,362

    Should you want a truly omnimode, omniapp(!) implementetation for XKB or PKL feel free to peruse mine (see my sig) and modify it to suit your needs!

    I didn't take offense nonono, just found it amusing. That's what happens when you've studied letter frequencies and suchlike too much. ;)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 21-Oct-2010
    • Posts: 3

    I am too a big fan of Vim (although switched to Sublime Text 2 recently), and I didn't like hitting Esc all the time. What I came up is that I can actually use Tab for that purpose - it's close to my pinky and I can live without it input mode.

    Another Vim tip - if you haven't mapped ":" to ";" in command mode yet - do it now, it will save you pressing that Shift all the time :)

    Offline
    • 0
    • Reputation: 0
    • Registered: 12-Aug-2008
    • Posts: 12

    I use 'uu' as my escape sequence in VIM and have never had any issues with it. It isn't a home row combination, but that key is practically on par with the home row for me.

    Offline
    • 0
    • Reputation: 0
    • Registered: 05-Nov-2012
    • Posts: 4

    I have capslock set to CTRL and also set to generate ESC it it is pressed and released alone, as described here:
    https://stevelosh.com/blog/2012/10/a-mo … ace-cadet/

    Offline
    • 0
    • Reputation: 23
    • From: Belgium
    • Registered: 26-Feb-2008
    • Posts: 482

    Very interesting idea to re-use modifier keys that way!  Can it be done on Linux/X11 (setxkbmap or xmodmap) and Windows/PKL as well?

    Offline
    • 0
    • Reputation: 0
    • From: Berkeley
    • Registered: 04-Nov-2012
    • Posts: 30
    ghen said:

    Very interesting idea to re-use modifier keys that way!  Can it be done on Linux/X11 (setxkbmap or xmodmap) and Windows/PKL as well?

    I haven't found a way to do this on Windows, but if I recall correctly, someone put up a code for this on github for Xorg systems.

    Colemak (start 11.5.12): ~80 WPM.
    QWERTY: ~90 WPM.

    Offline
    • 0
    • Reputation: 0
    • Registered: 11-Nov-2012
    • Posts: 5

    Hey there,

    I'm switching to colemack and have the exact same issues regarding 'kj'.

    First of all, I've been playing piano for 20 years, so I kinda know a lot about good hand movement optimization...

    I've tried two bindings to replace 'kj'

    1. tn <- You use two hands on this one but you will stay in homerow
    2. lh <- This is the one I'm trying now, it's not 100% homerow, but it's very close.

    I would check #2 :) , good luck with that.

    Offline
    • 0
    • Reputation: 7
    • Registered: 21-Apr-2010
    • Posts: 818

    @goles, please share your thoughts and advice about good hand movement optimization and positive ergonomics on another thread please.  Videos of _correct_/good keyboarding technique wanted.

    Last edited by pinkyache (15-Nov-2012 14:54:15)

    --
    Physicians deafen our ears with the Honorificabilitudinitatibus of their heavenly Panacaea, their sovereign Guiacum.

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,362

    Being Norwegian I often type 'kj'. I use the index finger for the 'k' and the middle finger for the 'j'. But I suppose that's not quite enough for you people...

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 11-Nov-2012
    • Posts: 5
    pinkyache said:

    @goles, please share your thoughts and advice about good hand movement optimization and positive ergonomics on another thread please.  Videos of _correct_/good keyboarding technique wanted.

    I will but I'm still learning colemak, barely 30 WPM on day 6 or so. ( Went cold turkey about 2 days ago )

    Cheers!!

    Offline
    • 0
      • Index
      • General
      • I need a rarely used two-key combination of home row keys, for VIM esc