• You are not logged in.

    Best Layout for VIM

    • Started by creese
    • 11 Replies:
    • Reputation: 0
    • Registered: 25-Jun-2012
    • Posts: 4

    Long time Colemak user, getting into VIM. I need to remap some keys so I can do "hkjl" navigation. Also thinking about trying a WASD-y approach with 'u' for "up" and leaving 'h' as a dead key (colemak.vim). I need to find better places for 'n' (next), 'e' (end word), 'i' (insert), and maybe, 'u' (undo). I may also need to relocate uppercase counterparts. Ideas?

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

    Hi, search the forum it's a popular question :)

    --
    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

    My preferred way nowadays is adding an Extend mapping layer as an omnimode, omniapp way of navigating etc, then leaving Vim be. You always meet fresh Vim on other machines and then it's no fun if you've messed up yours. Besides, you can't swing a dead nnoremap in there without crashing some other mapping that you'll end up missing in the end.

    *** 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: 25-Jun-2012
    • Posts: 4

    That looks really useful! Can you post your config file in pastebin?

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

    Yes, well, um. I map the Extend layer with PKL on Windows and XKB on Linux. It's been a while since I updated my files. Next week when I'm back from vacation I'll try to get something fresh up. What's your platform of choice?

    *** 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: 25-Jun-2012
    • Posts: 4

    Arch Linux

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

    Right, um. Could you maybe upload a fresh /usr/share/X11/xkb directory from your distro? So I can compare it with mine from Ubuntu 12.04. Unless you happen to know that they use the same X.Org version, that is...

    Last edited by DreymaR (05-Jul-2012 00:07:58)

    *** 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: 25-Jun-2012
    • Posts: 4

    Where?

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

    Okay, note how I just posted my Magnum Opus topic including Linux/XKB files? :)

    If Arch Linux uses the same X.Org version as Ubuntu 12.04 and has the same X.Org file structure (I think it does) then you could use my patch directly on a fresh XKB folder. If not, then note that in the same directory as the patch I also put my modified files. Try comparing those to yours - if the only changes are mine then you're good to go.

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

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

    How does what work, Vernon? Sorry, I'm afraid you'll have to be a bit more specific. (If you're asking about my topic, ask there.)

    *** 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: 03-Jul-2009
    • Posts: 189

    A WASD approach is good for games, where you are likely to move towards all directions with more or less the same frequency, whereas while editing you are likely to use up and down much more than other directions (check the "Interesting Highlights" section):

    http://ergoemacs.org/emacs/command-frequency.html

    Therefore hjkl works better than it looks.

    Last edited by spremino (16-Jul-2012 14:25:10)

    Dvorak typist here.  Please take my comments with a grain of salt.

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

    Well, that'll depend a bit on what you're doing and your style I think. Holding down the down arrow for instance, could count as many or as one 'command' - or you could use a number before it if you're terribly clever. Also, I tend to use the left arrow a fair bit (often with Ctrl to skip words) to get back to something I need to change, and then skip to the end of the line with End afterwards.

    All in all, that works well for me then. The most used keys are on the strongest fingers. I don't think it matters much on total strain though. And then, the WARS-type concept (WASD is for QWEsses...) has at least the advantage of a very intuitive setup. That again won't matter to the seasoned veterans...

    Last edited by DreymaR (16-Jul-2012 14:35:59)

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

    Offline
    • 0