53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
# commands
|
|
define-command -docstring "save and quit" x "write-all; quit"
|
|
define-command -docstring "quit with exit code 1" cq "quit 1"
|
|
|
|
# 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>"
|
|
|
|
## 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>"
|
|
|
|
## clipboard
|
|
map -docstring "yank the selection into the clipboard" global user y "<a-|>xclip -sel clipboard<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>"
|