summaryrefslogtreecommitdiffstats
path: root/kakrc
blob: 6caab19df4d2a3ec8bd7c25bc69e7ebf7f8da146 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
colorscheme terminal

add-highlighter global/ number-lines -relative -hlcursor -separator "  "
add-highlighter global/ show-matching
add-highlighter global/ regex \h+$ 0:Error

set-option global scrolloff 50,10
set-option global tabstop 4

hook global RegisterModified '"' %{
    nop %sh{
        printf "%s" "$kak_main_reg_dquote" | (eval wl-copy --foreground) > /dev/null 2>&1 &
    }
}

map -docstring 'paste wayland clipboard after cursor' global user \
'p' '<a-!>wl-paste -n<ret>'
map -docstring 'paste wayland clipboard before cursor' global user \
'P' '!wl-paste -n<ret>'


# Snippets
define-command -params 2 expand-snippet %{
	exec -draft x s %arg{1}<ret>d
	exec -with-hooks %arg{2}
}

define-command -params 2 expand-snippet-nl %{
	exec -draft x s ^\s*? %arg{1} <ret> n s %arg{1}<ret>d
	exec -with-hooks %arg{2}
}