Is there a way to use kakoune with colemak keyboard layout?

colemak disperses hjkl, so it would be difficult to navigate a file with colemak keyboard layout.

1 Like

A few references from here regarding using Kakoune with alternative layouts:

1 Like

I’ve been using kakoune with colemak for 2 years now. Check out my mappings: kakoune-config/colemak.kak at master · JJK96/kakoune-config · GitHub

1 Like

I’ve also been using Kakoune with Colemak-DH for a long time. At first I was using the default bindings to see if I could get used to them. I did, but after a while it started to get really uncomfortable because of the hjkl, so a few weeks ago I decided to remap every one of my bindings and even change some of non-hjkl bindings too to try to get them as comfortable as possible in every way. Since I was already going out of my way to learn a new more efficient layout like Colemak-DH, might as well learn a new more efficient layout for modal editing. (Yeah, I didn’t have anything better to do)

I made mnei (hnei on vanilla Colemak, hjkl on qwerty) the directional movement keys, and luy (uio on qwerty) the word movement keys (bwe). This makes the right hand responsible for all movement and I find them really intuitive.
Then I had to cycle some other keys to fit all those changes in. Like e.g. h (m on both Colemak and qwerty) is my i (insert mode) now.
I’ve been really happy with these changes and my discomfort with hjkl is gone.

Only problem after that was, if the default Kakoune bindings made going back to just Vim hard, these mappings made the whole TUI hjkl ecosystem harder haha. I’ve been remapping only the programs I use the most to use mnei as hjkl and then I fall back to a layer on KMonad that maps them to the arrow keys instead. It’s been working good enough for me that way.

I’d post my config but right now it’s a big mess with lots of repeated mappings for all modes. I haven’t gotten around to organizing it yet.

I’m diving into Colemak-DH; are you still using Kak? How has your config evolved?

I myself also switched to Colemak DH full time recently and the most difficult part was overcoming muscle memory for shell shortcuts and modal editors. Since I use a programmable ergonomic keyboard, I have arrow keys mapped to the home row so I started using them instead of hjkl. It required a few additional shortcuts but all in all it was a pretty minimal config change.

1 Like

I’ve been using kakoune for a long time now and have been using colemak way before that …
here’s my bindings, i use an e and u for up/down and n and i for left/right, like the shape of the arrow keys … i love that config and haven’t made any changes for a long time because of how well this works:

expand the config
#MAPPINGS
#----------------------
# insert mode
map global normal s i
map global normal S I

#; works as :
map global normal \; :

#swap t+a ... i prefer t for insertmode
map global normal t a
map global normal T A
map global normal a t
map global normal A T

#comment binding
map global normal -docstring 'comment line' '#' ':comment-line<ret>'

#move cursor in insert mode
map global insert <c-u> <up>
map global insert <a-u> <up>
map global insert <a-e> <down>
map global insert <c-e> <down>
map global insert <c-l> <left>
map global insert <c-y> <right>
map global insert <a-n> <left>
map global insert <a-i> <right>

#select command
map global normal j s
map global normal J S

#undo/redo
map global normal z u
map global normal Z U

#cursor movement
map global normal e j
map global normal u k
map global normal i l
map global normal n h
#word left/right
map global normal l b
map global normal y w

#scroll half a page up/down
map global normal <c-e> <c-d>

#yank (copy paste)
map global normal C y
map global normal p P
map global normal P p
# map global normal <c-c> y

# extend cursor downwards
map global normal <a-y> C

#search next/prev
map global normal k n
map global normal K <a-n>
map global normal <c-k> N
map global normal <a-k> <a-N>

#extend selection by words
map global normal L B
map global normal Y E

#select chars left/right
map global normal N H
map global normal I L

#select line up/down
#(select to) end/beginning of line
map global normal U K
map global normal E J
map global normal <c-l> <a-h>
map global normal <c-y> <a-l> 

#leave insert mode
map global insert <c-q> <esc>
map global insert <c-k> <esc>

#move line up/down
map global normal <a-u> xdkP
map global normal <a-e> xdp

#save with Ctrl-s
map global normal <c-s> :w<ret>
map global insert <c-s> <esc>:w<ret>
#exit with Ctrl-q
map global normal <c-q> :q<ret>
map global normal Q :q<ret>

# case in- and sensitive search
map -docstring 'case insensitive search' global normal '/' /(?i)
map -docstring 'case insensitive backward search' global normal '<a-/>' <a-/>(?i)
map -docstring 'case insensitive extend search' global normal '?' ?(?i)
map -docstring 'case insensitive backward extend-search' global normal '<a-?>' <a-?>(?i)

#move stuff left/right
map global normal <a-n> hd
map global normal <a-i> i<space><esc>