Is there a way? In vim I was used to that extra bit of feedback as to which mode I was in based on if I had a block cursor (normal) or vertical line (insert). Perhaps related would be the ability to turn on blinking of the cursor, although I don’t mind it remaining solid as much as I thought I might have.
On the other hand, I’m not sure how much control kak has over how the cursor is drawn if running inside tmux…
Vertical line cursor in Kakoune would be misleading as Kakoune always operate on selection, and “just cursor” is a selection of the current character, and there is no 0-width selection in Kakoune.
One of the options (which I use) is to change cursor color in insert mode, like this:
hook global ModeChange insert:.* %{
set-face global PrimaryCursor rgb:ffffff,rgb:000000+F
}
hook global ModeChange .*:insert %{
set-face global PrimaryCursor rgb:ffffff,rgb:008800+F
}
I had to change these modifications to make it work:
hook global ModeChange (push|pop):insert:.* %{
set-face global PrimaryCursor rgb:ffffff,rgb:008800+F
}
hook global ModeChange (push|pop):.*:insert %{
set-face global PrimaryCursor rgb:ffffff,rgb:880000+F
}
If you use multiple windows, you have to replace global to window inside the hook so that the color change only happens in the actual window where insert mode is entered.
This is what I have in my colorscheme file:
# Define custom faces to keep them organized
set-face global PrimaryCursorNormal +r
set-face global PrimaryCursorInsert bright-magenta+r
set-face global PrimaryCursor PrimaryCursorNormal
# EOL cursor
set-face global PrimaryCursorEolNormal default,bright-cyan
set-face global PrimaryCursorEolInsert PrimaryCursorInsert
set-face global PrimaryCursorEol PrimaryCursorEolNormal
# [...]
hook global ModeChange (push|pop):.*insert %{
set-face window PrimaryCursor PrimaryCursorInsert
set-face window PrimaryCursorEol PrimaryCursorEolInsert
}
hook global ModeChange (push|pop):insert:.* %{
set-face window PrimaryCursor PrimaryCursorNormal
set-face window PrimaryCursorEol PrimaryCursorEolNormal
}