diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 4cd5183..782283f 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -1,42 +1,52 @@ -# kakrc - -## commands +# commands define-command -docstring "save and quit" x "write-all; quit" define-command -docstring "quit with exit code 1" cq "quit 1" -## keybinds +# hooks +hook global BufOpenFile .* editorconfig-load +hook global BufNewFile .* editorconfig-load + +# visual + +## colorscheme +colorscheme palenight + +## scrolling & wrapping +set-option global scrolloff 1,3 +add-highlighter global/ wrap -word -indent + +## tabs +set-option global tabstop 4 +set-option global indentwidth 0 + +## statusbar +set-option global ui_options terminal_status_on_top=true + +## highlights + +### line numbers +add-highlighter global/ number-lines -hlcursor + +### whitespace +add-highlighter global/ regex "\h+$" 0:Error +add-highlighter global/ regex "^(\t+ +)|( +\t+)" 0:Error + +# keybinds + +## qol map -docstring "next buffer" global user n ":bn" map -docstring "previous buffer" global user ":bp" -map -docstring "yank the selection into the clipboard" global user y "wl-copy" -map -docstring "paste the clipboard" global user p "wl-paste -n" +## spellcheck map -docstring "spellcheck buffer" global user s ":spell" map -docstring "clear spellcheck" global user ":spell-clear" map -docstring "next wrong spelling" global normal ":spell-next" map -docstring "next wrong spelling" global normal ":spell-replace" -## visual - -### colorscheme -colorscheme palenight - -### scrolling & wrapping -set-option global scrolloff 1,3 -add-highlighter global/ wrap -word -indent - -### tabs -set-option global tabstop 4 -set-option global indentwidth 0 - -### statusbar -set-option global ui_options terminal_status_on_top=true - -### line numbers -add-highlighter global/ number-lines -hlcursor - -### trailing whitespace -add-highlighter global/ regex \h+$ 0:Error - -# clipboard shit +## clipboard map -docstring "yank the selection into the clipboard" global user y "xclip -sel clipboard" -map -docstring "paste the clipboard" global user p "xclip -sel clipboard -o" +map -docstring "prepend the clipboard" global user "!xclip -sel clipboard -o" +map -docstring "append the clipboard" global user p "xclip -sel clipboard -o" + +## ctags +map -docstring "search for tag" global user c ":ctags-search"