kakoune: a lot of changes

This commit is contained in:
yosh 2024-03-07 20:45:37 -05:00
parent 07e542f66d
commit 0e5ce193ce
1 changed files with 40 additions and 30 deletions

View File

@ -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<ret>"
map -docstring "previous buffer" global user <a-n> ":bp<ret>"
map -docstring "yank the selection into the clipboard" global user y "<a-|>wl-copy<ret>"
map -docstring "paste the clipboard" global user p "<a-!>wl-paste -n<ret>"
## spellcheck
map -docstring "spellcheck buffer" global user s ":spell<ret>"
map -docstring "clear spellcheck" global user <a-s> ":spell-clear<ret>"
map -docstring "next wrong spelling" global normal <c-e> ":spell-next<ret>"
map -docstring "next wrong spelling" global normal <c-r> ":spell-replace<ret>"
## 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 "<a-|>xclip -sel clipboard<ret>"
map -docstring "paste the clipboard" global user p "<a-!>xclip -sel clipboard -o<ret>"
map -docstring "prepend the clipboard" global user <a-p> "!xclip -sel clipboard -o<ret>"
map -docstring "append the clipboard" global user p "<a-!>xclip -sel clipboard -o<ret>"
## ctags
map -docstring "search for tag" global user c ":ctags-search<ret>"