You may not post on this forum because you're not logged in.

#1 25-Jun-2012 19:52:49

creese
New member
Registered: 25-Jun-2012
Posts: 4

Best Layout for VIM

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

#2 25-Jun-2012 21:59:19

pinkyache
Member
Registered: 21-Apr-2010
Posts: 416

Re: Best Layout for VIM

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


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

Offline

#3 26-Jun-2012 08:03:58

DreymaR
Member
From: Bærum, Norway
Registered: 13-Dec-2006
Posts: 2,095
Website

Re: Best Layout for VIM

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.


Better burden you cannot carry than man-wisdom much  --  Hávamál
Check out my Big Bag of Keyboard Tricks! For XKB (Linux) and for PKL (Win).

Offline

#4 26-Jun-2012 19:48:46

creese
New member
Registered: 25-Jun-2012
Posts: 4

Re: Best Layout for VIM

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

Offline

#5 28-Jun-2012 16:42:01

DreymaR
Member
From: Bærum, Norway
Registered: 13-Dec-2006
Posts: 2,095
Website

Re: Best Layout for VIM

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?


Better burden you cannot carry than man-wisdom much  --  Hávamál
Check out my Big Bag of Keyboard Tricks! For XKB (Linux) and for PKL (Win).

Offline

#6 28-Jun-2012 21:28:44

creese
New member
Registered: 25-Jun-2012
Posts: 4

Re: Best Layout for VIM

Arch Linux

Offline

#7 05-Jul-2012 00:04:43

DreymaR
Member
From: Bærum, Norway
Registered: 13-Dec-2006
Posts: 2,095
Website

Re: Best Layout for VIM

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)


Better burden you cannot carry than man-wisdom much  --  Hávamál
Check out my Big Bag of Keyboard Tricks! For XKB (Linux) and for PKL (Win).

Offline

#8 08-Jul-2012 05:42:52

creese
New member
Registered: 25-Jun-2012
Posts: 4

Re: Best Layout for VIM

Where?

Offline

#9 08-Jul-2012 11:09:43

DreymaR
Member
From: Bærum, Norway
Registered: 13-Dec-2006
Posts: 2,095
Website

Re: Best Layout for VIM

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.


Better burden you cannot carry than man-wisdom much  --  Hávamál
Check out my Big Bag of Keyboard Tricks! For XKB (Linux) and for PKL (Win).

Offline

#10 15-Jul-2012 11:48:03

DreymaR
Member
From: Bærum, Norway
Registered: 13-Dec-2006
Posts: 2,095
Website

Re: Best Layout for VIM

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


Better burden you cannot carry than man-wisdom much  --  Hávamál
Check out my Big Bag of Keyboard Tricks! For XKB (Linux) and for PKL (Win).

Offline

#11 16-Jul-2012 14:24:07

spremino
Member
Registered: 03-Jul-2009
Posts: 150

Re: Best Layout for VIM

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)

Offline

#12 16-Jul-2012 14:33:04

DreymaR
Member
From: Bærum, Norway
Registered: 13-Dec-2006
Posts: 2,095
Website

Re: Best Layout for VIM

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)


Better burden you cannot carry than man-wisdom much  --  Hávamál
Check out my Big Bag of Keyboard Tricks! For XKB (Linux) and for PKL (Win).

Offline

Board footer