2017-11-20 13:53:56 +01:00
colorscheme desertex
2017-01-12 17:58:00 +01:00
set global scrolloff 5,5
set global incsearch true
set global aligntab true
2017-11-20 13:53:56 +01:00
set global ui_options ncurses_assistant=none:ncurses_change_colors=true
# set global autoinfo normal|command|onkey ## always show info box for every command key
set global grepcmd 'rg --column'
map global insert <tab> ' '
# with inspiration from
# https://github.com/Delapouite/dotfiles/blob/master/link/kak/kakrc
set global modelinefmt %{
%val{bufname} [%opt{filetype}]
· %val{cursor_line}:%val{cursor_char_column}
· {{context_info}} {{mode_info}}
2017-01-12 17:58:00 +01:00
}
2017-11-20 13:53:56 +01:00
addhl -group / group trailing_white_spaces
addhl -group /trailing_white_spaces regex \h+$ 0:Error
hook global InsertBegin .* %{
rmhl trailing_white_spaces
# echo -color Information '— INSERT —'
}
hook global InsertEnd .* %{
addhl ref trailing_white_spaces
lint
}
# ← system clipboard
map global user y '<a-|>xsel --input --clipboard<ret>; :echo -color Information "copied selection to X11 clipboard"<ret>' -docstring 'yank from clipboard'
map global user p '<a-!>xsel --output --clipboard<ret>' -docstring 'replace from clipboard'
map global user P '!xsel --output --clipboard<ret>' -docstring 'print from clipboard'
2017-01-12 17:58:00 +01:00
2017-11-20 13:53:56 +01:00
# → system clipboard
hook global NormalKey y|d|c %{ nop %sh{
printf %s "$kak_reg_dquote" | xsel --input --clipboard
2017-01-12 17:58:00 +01:00
}}
2017-11-20 13:53:56 +01:00
def -docstring 'ripgrep in current dir' \
find -params 1 -shell-candidates %{ rg --files } %{ edit %arg{1} }