I edited this file to set the tabwidth to a width of 2: $MY_KAK_DIR/share/kak/rc/extra/editorconfig.kak but when I insert a new tab, I get 4 spaces. How do I set my tab-width (indentwidth, tabstop) to 2 universally on my system?
The editorconfig.kak file is a script that teaches Kakoune to understand EditorConfig files in the current directory, it's not the actual configuration of Kakoune.
If you want Kakoune to use two-space indents all the time, put something like the following into ~/.config/kak/kakrc:
hook global InsertChar \t %{ exec -draft -itersel h@ }
set global tabstop 4
set global indentwidth 4
(the "hook" line makes Kakoune expand tabs as you type them)
See Indentation & Tabulation in the wiki for more details.
Great, this works.
Seems like the up to date wiki page is: https://github.com/mawww/kakoune/wiki/Indentation-and-Tabulation ("and" rather than "&")
Most helpful comment
The
editorconfig.kakfile is a script that teaches Kakoune to understand EditorConfig files in the current directory, it's not the actual configuration of Kakoune.If you want Kakoune to use two-space indents all the time, put something like the following into
~/.config/kak/kakrc:(the "hook" line makes Kakoune expand tabs as you type them)
See Indentation & Tabulation in the wiki for more details.