• You are not logged in.

Colemak + Vim

  • Started by Jules
  • 148 Replies:
  • Reputation: 0
  • Registered: 30-Sep-2012
  • Posts: 1

I've taken a completely different approach. Most vim key-bindings are very logical and remapping them screws the mnemonics to remember them.

You mostly just need to fix the hjkl-issue and from there on you're good. Unfortunately remapping hjkl means you end up remapping just about anything since everything now needs to shift to new keys.

However, most of the commands/functions in vim don't use the Alt/Meta key to do anything, they either use Control or the Leader. So, what I ended up doing is creating a mapping where alt+h -> h, alt+n -> j and so forth (in normal mode).

I realise you now also need to press the alt key but my left hand isn't doing anything when I'm moving around in normal mode so I don't lose any functionality and I don't end up remapping the whole of vim.

This is what I ended up doing:

" Mac hack so we can use Meta
let os=substitute(system('uname'), '\n', '', '')
if os == 'Darwin' || os == 'Mac'
    set macmeta
endif

" Colemak hjkl hack
nnoremap <M-h> <Left>|
nnoremap <M-n> <Down>|
nnoremap <M-e> <Up>|
nnoremap <M-i> <Right>|

Now, this is Mac specific (not MacVim, it works in vim too because I'm not depending on has(gui_macvim)) but it's easily extended to either Linux or Windows, you just need a different set <*>meta option.

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

Still not sure how to do it for Linux or Win? Could you extend your script to include if os statements for those please? I used to do pretty much the same thing but I've forgotten how to. :) I also had the rest of the "navigation block": UNEI arrows; LY Home/End; JH PgUp/PgDn; :O Del/Back.

Nowadays, the Extend mappings (using Caps as a modifier) have taken over my needs for these mappings and they work outside of Vim too. Real OmniMode! ;)

Last edited by DreymaR (30-Sep-2012 23:52:24)

*** 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: 04-Apr-2013
  • Posts: 538
DreymaR said:

g3BJl.png

DreymaR said:
"+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
"|~ Case    |! ExtFlt> |@ PlyMcr· |#  <-=    |$  ->|    |% GoMatch |^  <--    |& Rep :s  |*  =->    |( |<-Sent |) Sent->| |_ LastLin |+ Next<-- |
"|` Go Mk·  |1         |2         |3         |4         |5         |6         |7         |8         |9         |0  |<-    |- TopLine |= Format> |
"+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
"|          |  Quit    |  WinNext |          |          |          |  =<PgUp> |  =<Home> |  =<Up>   |  =<End>  |          |  =<Esc>  |          |
"|  NextTab |  =<C-v>  |  WinCmd  |  GUIFind |  =<Up>   |  FileInf |  BOF     |   <--    |  ScrlUp  |   ->|    |          |  =<Esc>  |          |
"| <TAB>    |Q PlyMcrQ |W Warp->| |F <-Find· |P <-Prch· |G ScrMid  |J ScrTop  |L <-WORD  |U  5Up    |Y WORD->  |; z-Cmd·  |{ |<-Para |} Para->| |
"| <TAB>    |  RecMcr· |  Warp >  |  Find·-> |  Prch·-> |  g-Cmd·  |  PgUp    |  <-word  |    Up    |  word->  |: ExLine  |[ <-Misc· |] Misc·-> |
"+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
" OmniMeta->|  AreaVis |          |          |  TabNext |          |  =<PgDn> |  =<Left> |  =<Dn>   |  =<Rght> |  =<CR>   |          |          |
" Ctrl----->|  AreaAll |  Redo    |  Save    |  TabNew  |  DelWord |  EOF     |  =<Dn>   |  ScrlDn  |  =<Tab>  |  JmpOldr |          |          |
" Shift---->|A AreaLin |R RepMode |S |<-Ins  |T Att->|  |D Del->|  |H ScrBot  |N 5Left   |E  5Dn    |I 5Right  |O OpenUp  |" SetReg· || GoCol1  |
" Normal--->|  Area    |  Replce· |  InSert  |  ATtach  |  Delete> |  PgDn    |   Left   |    Dn    |   Right  |  OpenDn  |' GoMk·|< |\ (usr)·  |
"           +----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
"           |          |          |          |          |          |          |          |          |          |          |
"  Ctrl+:   |  Undo    |  ClpCtLn |  ClpCpLn |  ClipIns |          |  Digraph |  =<CR>   |          |          |          |    · = char arg.
"Up/Dn scrl |Z Redo    |X <-Cut   |C CopyLin |V <-Paste |B RevPpFf |K <-Next§ |M ScrMid  |< Unindt> |> Indent> |? <-Find§ |    > = move arg.
"PgUp/Dn HL |  Undo    |  Cut->   |  Copy >  |  Paste-> |  RepPpFf |  Next§-> |  Set Mk· |, (usr)·  |. Repeat  |/ Find§-> |
"           +----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
"
"Quick golemak.vim helpscreen - DreymaR, 0812                                                                                       [columns=149]
"
"Legend: |<- <-- ->| b/h/eol; Mk mark; Flt filter; Mcr macro; Reg register; = same/ident.; § pattern; Warp change; Area visual; 'Pr(oa)ch 'till.
"NB: Obviously, a sheet such as this cannot possibly cover everything. It's pretty much mode naïve and modes mean a lot, for instance.
"    One idea in colemak.vim is to make things more consistent over multiple modes (although you may have to use Meta/Alt in i/c mode!).
"Notes: Some keys (sUQK) are available as g-cmds. Ctrl-Shift-Up/Dn swaps lines. Use r(educed) for i(nner). A count may be used with - _ G |.
"Alt: Hit AND RELEASE the Alt/Meta key and then a letter for menu shortcuts. M-T Tab nav; M-W Win nav; M-R(eturn) Esc;
"
"Changes: M JHG jh ; X LY C-ly , C-[] C-q C-w () C-ue x_C-D abbrevs (he ed ars/sra). These changes relative to colemak.vim per 080421.
"Missing: C-t (tag stack; only for filetype help now)?, eE, sS (not necessary?), -_ (- taken from gg; swap-map gg to -?)
"Problem: Some C-mappings are "hard-coded" synonyms that cannot be remapped?! n_<C-i>=<Tab> (can be handy?); n_<C-m>=<Enter>; n_<C-p/n>=<Up>/<Dn>
"
" colemak.vim - redesigned mapping for the Colemak layout for Vim 7.0; 2008-04-21 Shai Coleman, https://colemak.com/ . Public domain. 
" golemak.vim - further tweaks (and some untweaks!); 2008-12-02 Øystein Bech "DreymaR" Gadmar, http://folk.uio.no/obech/ . Public domain.
"

Currently reading through colemak-evil.el; it occurs to me I'll forget many of the shortcuts quickly.  Is there any tool for making these diagrams?

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

Oh dear. I haven't used that stuff in ages, but reverted to plain Vim and using the Extend layer mappings for "omnimode" arrowing around and such. Since Vim is supposed to be accessible on lots of different machines I tired of having to mod each of them before I could use it right.

I suppose you mean the diagram in this post rather than the one you quoted above? Well, I made that from scratch as an SVG file using Inkscape. If you're interested I could cough up my file for you.

While I was still using my 'golemak.vim' mappings though, I became enamored with the trick of typing ':ars' to bring up that ascii help sheet and ':sra' to close it again! Much handier than a printed helpsheet since it'd always be with me whenever the mappings were in use and never clutter up the desk. The only tool I needed to make that was Vim! ;)

Last edited by DreymaR (06-May-2013 10:24:32)

*** 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: 04-Apr-2013
  • Posts: 538

Found a svg and started on another version:

qIiuYu5.png

This is much more annoying than the keyboard layout analyzer.. whatever.  Might just try for a text-guide eventually.  It turns out I don't actually understand enough to write much of it out anyhow.

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

Really depends on how serious you want to get. For selling it to newbies, a nice SVG is gold. Looking at this, I really like what I did with my own SVG though: A more informative color scheme and arrows denoting operators (which can also be direct/modal/extra commands!).

For your own purposes, like I said the ASCII image was what I took to using after a while. I was trying out changes too and the ASCII was very easily editable.

Last edited by DreymaR (07-May-2013 09:15:14)

*** 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: 04-Apr-2013
  • Posts: 538

Made a pretty huge, still experimental redesign to the colemak-vim layout:

yMFXTfH.png

I noticed that replace was only rarely used, and replace mode not at all, so that went away to T. More importantly, by kixcereal's [perhaps not intentional] suggestion, I've found myself using find-char as a main method of navigation.  So, I've experimentally put them in the home row, displacing insert/append to wf.

Is that justifiable?  It's not clear yet, but I did observe myself using change (p) quite a lot instead of insert/append, so I suspect those are simply not used as much.  A more conservative alternative is to swap the wf and rs positions.

My modified colemak-evil.el config can be found here.

Modified vim config (warning: much less developed and more buggy): here.

Last edited by lalop (21-Jul-2013 21:03:57)
Offline
  • 0
  • Reputation: 210
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,343

Hehe, you're at least as ambitious as I was. Best of luck with your endeavors! :)

Last edited by DreymaR (29-May-2013 08:36:29)

*** 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: 04-Apr-2013
  • Posts: 538

After much deliberation, I've decided to revert to the conservative version.  It was a tough choice either way, and I can't rule out that it was influenced by legacy bias.  Ultimately, here are some of my observations:

Pro-conservative:

  • It seems healthier to go from wf to spamming t, than from rs to spamming t.  Your fingers are already in a more relaxed position, whereas they may not get the chance to adjust in the latter case. By contrast, going from rs to general typing does not lock them into position as much.

  • My fingers are more ready for general typing from the rs position than the wf.

  • Insert/append require less thought, hence less reaction time, than searching characters.  Thus, they benefit more from the immediate home-row position.

  • Easy [number][w/f], p[w/f] combos.

Pro-radical:

  • Someone whose navigation by character search is second-nature would want to have quick access to those buttons, period.

  • It's arguably more organized, with all input methods being on the same line.

  • More radical: Change can be reassigned from p to w or f in order to void same-finger "tp".

Ultimately, it was the ergonomic argument that pushed me over the edge (as, without good ergonomics, all this is rather pointless).  But it's still quite unclear.  I think the conservative choice is probably more friendly to an inexpert, but when I become more expert will I regret this decision?  Quite possibly.

jq68Aiu.png

Last edited by lalop (31-May-2013 04:55:36)
Offline
  • 0
  • Reputation: 210
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,343

When you become expert, my prediction is that you'll be better off with a conservative version. It's more portable, links better in with anything else that uses vim-like bindings, utilizes other people's knowledge better and other arguments found in this thread.

*** 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: 04-Apr-2013
  • Posts: 538

I plan on learning an optimized direction-based version for home and wherever I can install it, then using the mnemonics to muddle through everywhere else.  Default vim's over-reliance on mnemonics may have led to some questionable placements, but at least it seems relatively easy to memorize.  I can almost see where the purists are coming from, and to some extent regret not just going full mnemonic, but I ultimately don't think it's optimized, nor takes advantage of the directional intuition we use in games, for instance.

+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
|~ Case     |! ExtFlt>  |@ PlyMcr·  |#  <-=     |$  ->|     |% GoMatch  |^  <--     |+ Next<--  |[ Rep :s   |]  =->     |( |<-Sent  |) Sent->|  |_ LastLin  |
|` Go Mk·   |1          |2          |3          |4          |5          |6          |= Format>  |7          |8          |9          |0  |<-     |- TopLine  |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
|           |           |           |           |ChangeToEOL|           |           |           |           |     =<Up> |           |           |           |
|  NextTab  |           | WinCmd    |           |Change     | Abort Cmd |           |  ▲        |   WORD    |  ▲  ScrlUp|   WORD    |           |           |
| <TAB>     |  RepState | Find Till | Find Till |Subs Line  | EOF/GotoLn|{          |  ❚        |Back2Indent|  |  5Char |   EOL     |; z-Cmd·   |" SetReg·  |
| <TAB>     |  Replace  | Find Char | Find Char |Substitute | Misc Cmds |[          |  ❚  PageUp|   word    |  |  Char  |   word    |: z-Cmd·   |' GoMk·|<  |
|           |     Q     |  ◀--W     |     F--▶  |     P     |     G     |           |     J     |  ◀▬▬▬ L   |     U     |   Y ▬▬▬▶  |           |           |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
 Meta-----> |SelectBlock|           |           |           |           |           |           |   =<Left> |     =<Dn> |   =<Rght> |           |           |
 Ctrl-----> |Select All | Redo      | Search    |           |  DelWord  |           |  ❚        |   =<Dn>   |  |  ScrlDn|   =<Tab>  |  JmpOldr  |           |
 Shift----> |Select Line| Insert BOL| Append EOL|RptFndChBkw||D Del->|  |}          |  ❚        |   5Char   |  |  5Char |   5Char   |O OpenUp   || GoCol1   |
 Normal---> |  Select   | Insert    | Append    |RptFindChar|  Delete>  |]          |  ▼  PgDown|   Char    |  ▼  Char  |   Char    |  OpenDn   |\: (usr)·  |
 Ltr/Direc->|     A     |  ◀--R     |     S--▶  |     T     |     D     |           |     H     |  ◀--- N   |     E     |   I ---▶  |     O     |           |
            +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
            |           |           |           |           |           |           |           |           |           |           |
            |           |           |           |           |           |           |           |           |           |           |    · = char arg.
            |   Redo    | Cut To EOL| Copy Line |  <-Paste  | Find File | ? <-Find§ |RpetFndBkwd|           | < ◀-Dedent| > Indent-▶|    > = move arg.
            |   Undo    |   Cut->   |  Copy >   |  Paste->  |  Buffers  | / Find§-> |Repeat Find|  Set Mk·  | ,         | .         |
            |     Z     |     X     |     C     |     V     |     B     |           |     K     |     M     |           |           |                        
            +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+

I already miss the instant character-based navigation from the radical version.  I hope I don't do anything stupid like switching back.

Last edited by lalop (01-Jun-2013 06:01:30)
Offline
  • 0
  • Reputation: 0
  • From: Kirkenes, Norway.
  • Registered: 13-Jun-2013
  • Posts: 2
DreymaR said:

Oh dear. I haven't used that stuff in ages, but reverted to plain Vim and using the Extend layer mappings for "omnimode" arrowing around and such. Since Vim is supposed to be accessible on lots of different machines I tired of having to mod each of them before I could use it right.

Hi, I am new to Colemak, but have been using Vim for quite some time. Could you elaborate how you are using Colemak+Vim? I want my navigation keys on homerow for the same reason as I changed to Colemak, iess strain on my fingers.

Sincerely,
Ehtele.

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

If you use Windows PKL or *nix XKB you can use my Big Bag of Tricks (as per my sig topics) to get arrow keys and much more at your fingertips – not just in vim but pretty much everywhere. The concession is using Caps as an 'Extend' layer modifier, which I find works splendidly! I actually find the chord Caps+o less strainful than hitting the actual Backspace for instance.

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

Offline
  • 0
  • Reputation: 0
  • From: Kirkenes, Norway.
  • Registered: 13-Jun-2013
  • Posts: 2

Thank you very much for a quick answer. I have read your post before and thought about making me an extended layer. I guess this makes the choice easy. Thanks again!

Offline
  • 0
  • Reputation: 0
  • Registered: 02-May-2013
  • Posts: 28

Hi Lalop,

Did you create a vim equivalent of your evil mode vim bindings? I couldn't find one on git, though you do mention it in your post. I like how the remapping looks, however I use VsVim at work so I'll need to convert a vimrc to get close enough. I now use Emacs with Evil at home, so they should work perfectly there.

Cheers.

Offline
  • 0
  • Reputation: 0
  • Registered: 04-Apr-2013
  • Posts: 538

I adapted Shai's from page 1.  It was pretty terrible and I haven't updated it in some time.   Please do share any version that you make better.

https://github.com/lalopmak/lalopmak-ma … master/vim

Incidentally, are you lbradstreet?  I might have to send an email update about 1-2 things, if so.

Last edited by lalop (21-Jul-2013 21:05:54)
Offline
  • 0
  • Reputation: 0
  • Registered: 02-May-2013
  • Posts: 28

Hey mate,

Thanks for that. That should be a good start anyway. I may have to neuter it somewhat anyway, as I don't think VsVim supports all the options.
Yep, that's me on github. I figured I'd start out by forking it and see if I make any changes. Incidentally, do you use paredit with emacs/evil at all? I'm trying to find some good keybindings for it and it's proving difficult ;).

Cheers

Offline
  • 0
  • Reputation: 0
  • Registered: 04-Apr-2013
  • Posts: 538
ghaz said:

Incidentally, do you use paredit with emacs/evil at all? I'm trying to find some good keybindings for it and it's proving difficult ;).

Not at this moment.  I've been meaning to get into it ;)

I've sent you an email via forum mailer.  Forum has been a bit buggy lately, though.

Offline
  • 0
  • Reputation: 0
  • Registered: 04-Apr-2013
  • Posts: 538

I've been trying my hand at mnemonics, with some pretty funny results, as well as some unintentionally good ones, like "warp" for full-screen ace-jumping.

(defvar lalopmak-evil-mnemonic-hintstring "Mnemonic (less descriptive) hints for lalop's colemak-evil configuration.  Accessed via: :mnemonic

To dismiss: retype one of the above commands or press q in the buffer.

Normal mode:
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
|~ Case     |! ExtFlt>  |@ PlyMcr·  |#  <-=     |$  ->|     |% GoMatch  |^  <--     |+ Next<--  |[ Rep :s   |]  =->     |( |<-Sent  |) Sent->|  |_ LastLin  |
|` Go Mk·   |1          |2          |3          |4          |5          |6          |= Format>  |7          |8          |9          |0  |<-     |- TopLine  |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
|           |           |◀--FindChar|FindChar--▶|           |           |           |           |           | PasteAbove|           |           |           |
|  NextTab  |           |WinCmd     |FloatRegion|RePractcing| Abort Cmd |           |  ▲        |   WORD    |  ▲  ScrlUp|   WORD    |           |  GoMk·|<  |
| <TAB>     |Quash State|WarpTilChar|FndTilNbyCh|           | EOF/GotoLn|{          |  ❚        |Back2Indent|  |  5Char |   EOL     |; z-Cmd·   |\" SetReg·  |
|ExpdSnippet|Quash Char |WarpToChar |FndNrbyChar|JusPractcng|Go Commands|[          |  ❚  PageUp|   word    |  |  Char  |   word    |: z-Cmd·   |' RunMacro |
|           |     Q     |     W     |     F     |     P     |     G     |           |     J     |  ◀▬▬▬ L   |     U     |   Y ▬▬▬▶  |           |           |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
 Meta-----> | Block Area|           |           |RptFindChar|           |           |           | PasteAtBOL| PasteBelow| PasteAtEOL|           |           |
 Ctrl-----> | All Area  | Redo      |  Search   |           |  DelWord  |           |  ❚        |   =<Dn>   |  |  ScrlDn|   =<Tab>  |           |           |
 Shift----> | Area Line | Insert BOL|SucceedLine|TrnsfmToEOL||D Del->|  ||          |  ❚        |   5Char   |  |  5Char |   5Char   |           || GoCol1   |
 Normal---> |   Area    | Insert    |  Succeed  | Transform |  Delete>  |\  Indent  |  ▼  PgDown|   Char    |  ▼  Char  |   Char    |  JumpOver |\\: (usr)·  |
 Ltr/Direc->|     A     |  ◀--R     |     S--▶  |     T     |     D     |           |     H     |  ◀--- N   |     E     |   I ---▶  |     O     |           |
            +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
            |           |           |           |           |           |           |           |           |           |           |
            |           |           |           | Paste-Pop |           |           |           |           |           |           |    · = char arg.
            |ZigZag Up  | Cut To EOL| Copy Line |  <-Paste  | Find File | ? <-Find§ |RpetFndBkwd|  Set Mk·  | < ◀-Dedent| > Indent-▶|    > = move arg.
            |ZigZag Down|   Cut->   |  Copy >   |  Paste->  |  Buffers  | / Find§-> |Repeat Find|CreateMacro| ,         | .         |
            |     Z     |     X     |     C     |     V     |     B     |           |     K     |     M     |           |           |                        
            +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+

====Text Object Triggers====
r = inner = 'reduced' 
s = outer = 'spread'   
z = surround = zurround?

====Text Objects====

The usual (w)ord,(W)ORD,(s)entence,(p)aragraph still work.

u = paragraph = 'ubiquity'
e = sentence = 'entry'
n = word = 'nearby'
i = WORD = 'interconnected word' / 'interword'

y = sYmbol
")

Any suggestions would be appreciated.  For reference, the default-named chart:

+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
|~ Case     |! ExtFlt>  |@ PlyMcr·  |#  <-=     |$  ->|     |% GoMatch  |^  <--     |+ Next<--  |[ Rep :s   |]  =->     |( |<-Sent  |) Sent->|  |_ LastLin  |
|` Go Mk·   |1          |2          |3          |4          |5          |6          |= Format>  |7          |8          |9          |0  |<-     |- TopLine  |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
|           |           |◀--FindChar|FindChar--▶|           |           |           |           |           | PasteAbove|           |           |           |
|  NextTab  |           |WinCmd     |ExpndRegion|   Redo    | Abort Cmd |           |  ▲        |   WORD    |  ▲  ScrlUp|   WORD    |           |  GoMk·|<  |
| <TAB>     |  RepState |JmpCharTill|JmpNbyChTil|           | EOF/GotoLn|{          |  ❚        |Back2Indent|  |  5Char |   EOL     |; z-Cmd·   |\" SetReg·  |
|ExpdSnippet|  Replace  |AceJumpChar|JmpNrbyChar|   Undo    |Go Commands|[          |  ❚  PageUp|   word    |  |  Char  |   word    |: z-Cmd·   |' RunMacro |
|           |     Q     |     W     |     F     |     P     |     G     |           |     J     |  ◀▬▬▬ L   |     U     |   Y ▬▬▬▶  |           |           |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
 Meta-----> |SelectBlock|           |           |RptFindChar|           |           |           | PasteAtBOL| PasteBelow| PasteAtEOL|           |           |
 Ctrl-----> |Select All | Redo      | Search    |           |  DelWord  |           |  ❚        |   =<Dn>   |  |  ScrlDn|   =<Tab>  |  JmpOldr  |           |
 Shift----> |Select Line| Insert BOL| Append EOL|ChangeLine ||D Del->|  ||          |  ❚        |   5Char   |  |  5Char |   5Char   |           || GoCol1   |
 Normal---> |  Select   | Insert    | Append    |  Change   |  Delete>  |\  Indent  |  ▼  PgDown|   Char    |  ▼  Char  |   Char    |AceJumpLine|\\: (usr)·  |
 Ltr/Direc->|     A     |  ◀--R     |     S--▶  |     T     |     D     |           |     H     |  ◀--- N   |     E     |   I ---▶  |     O     |           |
            +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
            |           |           |           |           |           |           |           |           |           |           |
            |           |           |           | Paste-Pop |           |           |           |           |           |           |    · = char arg.
            |  OpenUp   | Cut To EOL| Copy Line |  <-Paste  | Find File | ? <-Find§ |RpetFndBkwd|  Set Mk·  | < ◀-Dedent| > Indent-▶|    > = move arg.
            |  OpenDn   |   Cut->   |  Copy >   |  Paste->  |  Buffers  | / Find§-> |Repeat Find|CreateMacro| ,         | .         |
            |     Z     |     X     |     C     |     V     |     B     |           |     K     |     M     |           |           |                        
            +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+

I am also experimenting with a more minimal "mnemonic" mapping whose primary goal is to keep vim's default mnemonics intact.  You can try those by instead (require 'lalopmak-evil-mnemonic).

However, the comparatively awkward positions are getting to me:

  • Change is at such a weird key for something I use all the time

  • You can't easily navigate forward or backward word with the awkward w/b

  • Combining those, a very common pattern for me is change-[forward/backward word], which is awkward with c-w while terrible with c-b.

  • There seems to be no one-fingered way to browse large vertical distances.

  • Deprovement of several "shift letters" relative to colemak-evil-like style.  v is very commonly shifted, and an awkward reach compared to colemak-evil's a.  Ditto for undo (z vs u), though admittedly the use of redo for shift there is arbitrary.  In the case of my particular layout, r/s (insert/append) also benefit a little from this (relative to default and colemak-evil, respectively).

And that's not even getting into the colemak-specific issues (redundant replace/substitute right next to each other, endword taking up prime real estate while the arrow keys are displaced - I got rid of endword to move some back).  All in all, I'm not convinced it's worth it.

Last edited by lalop (12-Aug-2013 19:36:26)
Offline
  • 0
  • Reputation: 2
  • Registered: 13-Nov-2013
  • Posts: 48

I haven't seen this posted in this thread, but I have been using the following plugin for vim.

http://www.vim.org/scripts/script.php?script_id=2865

I have been using it to keep all the commands in Qwerty that then changes into Colemak for any editing/inserting.  For me this was convenient to keep all of my commands how I am used to them (no need to rebind the hjkl movement keys and shift everything else around).

I added one line at the end of the script to always call the plugin (as its not activated by default which I wanted it to be)

call CMapQwertySwitch()

and one line in the function CMapQwerty() so that I can use "gg" which was missing.

noremap dd gg
Offline
  • 0
  • Reputation: 0
  • Registered: 11-Oct-2013
  • Posts: 79

I also quite like colemak's letter placement for vim. I have yet to make any remappings. I agree that the only real problems are the nei keys. Right now I'm also just using a caps layer with left down up right for navigation. I might move it, but I use n,e, and i pretty frequently, so maybe I won't. It's not really a pain since I hardly use left and right and often will replace a 10down 4w, for example, with navigation via easymotion.

Most remapping for me takes place outside of vim. I have added leader to my caps layer to the forward slash key (or to right shift which I'm using as forward slash question mark on a wide mod).

I'v also done things like remap $ and numbers specifically for vim. I have a tab layer with a numpad on the right hand.. Alternatively if you're willing to give up shift with a caps layer (xmodmap; for highlighting), you could put a numpad on the right hand with the caps layer and s (shift)... interestingly enough, this has had different effects for me in different applications. In libre office, browsers, vim, etc. caps + shift on caps layer will put the number, but in sublime text 3, I still get highlighting.

The nice thing is that the more you use vim, the less highlighting like this is helpful and the more a numpad is helpful instead. I might change it to have half of the numbers on the left top row (by tab) and the rest on the right hand home row because I have to think about where numbers are on the numpad. Another option might be to just move the number keys down a row onto the tab layer and then also put left up down right in the tab layer, so you can do it all in the tab layer. Obviously not everyone will want to remap tab. This would probably work better on a keyboard with a thumb cluster.

Offline
  • 0
  • Reputation: 1
  • Registered: 08-Oct-2018
  • Posts: 2

Seems to me like we can break this whole discussion down into progressively more drastic options:

1.) Leave hjkl alone, as this person argues
2.) Leave "l" as right alone, and then make "k" down, "h" up, and "j" left. This is a minimalist approach that makes the keys positions make more sense, and can be done with a simple langmap
3.) Swap j/J with e/E and n/N with k/K, and then rejigger the arrows to make sense so you have h=left, n=down, l=up, and e=right.
4.) Change completely to hnei or neui, which can be awkward because then you have to do something about nuking some important vim keys (i,n,u, or e). You also have to consider remapping window navigation like "<C-W> j", "<C-W> <C-J>" as well as all the "g" remappings like "gj".
5.) Do something totally out of the box or clever like this guy, but with all the same issues with nuking important keys.
6.) Go full on crazy and use Shai's full blown colemak.vim. Which, if you remember, worked so well that Shai unceremoniously switched to Sublime Text. (I kid, I kid. Sublime will alway get some <3 from me)

I got obsessed enough with finding the perfect remapping that I made some Google Docs to play around with visualizing the various options. But ultimately, I landed on simple is better. The more remappings you do to make arrows right in all contexts (window moving, NERDTree, etc), the harder it will be to learn and use. Truthfully, the best advice is to leave h/j/k/l alone or use the arrow keys again like a noob until you learn to start navigating using better methods like "/", "f", or <C-D/U> or <C-F/B>. Or, see if you can get Extend going. Good luck and happy vimming!

Last edited by mattmc3 (11-Oct-2018 14:20:18)
Offline
  • 0
  • Reputation: 210
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,343

I started ultra crazy, working from Shai's files. Now I use Vim completely out of the box, which is one of its assets: You come to a new Linux box, there's Vim waiting for you. I really like knowing how it works without adding any further settings.

Then again, I install Extend on that box as soon as possible, and I use Extend with Vim ... extensively. ;-) With the Extend nav keys, it's like an omnimode nav/edit switch-mode is always there for you, so you'll never miss hjkl again.

Like you say, experienced vimmers also use hjkl a lot less. You learn to use / and other nav tricks more and more.

As for the rest of the commands, they're mostly mnemonic which is a remapper's dream. G is G no matter where G is, etc.

Last edited by DreymaR (11-Oct-2018 09:00:28)

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

Offline
  • 1
  • Reputation: 117
  • From: UK
  • Registered: 14-Apr-2014
  • Posts: 975

I know a lot of people have gotten used to HJKL, but if you look at it objectively,  it never really made much sense. Maybe you could say it's better than arrow keys due to being closer to your home position. But if you were going to say that, why not go the whole hog and use (Colemak) LHNE, or better still, UNEI?

I use vim from time to time, but don't have any special mappings for it. That's because Extend is by far and away the best solution.

A vim mapping that moved a minimal number of keys from the defaults, just enough to get logical arrow keys, would kind of make sense - in a world where Extend didn't exist!

Last edited by stevep99 (12-Oct-2018 11:45:23)

Using Colemak-DH with Seniply.

Offline
  • 0