summaryrefslogtreecommitdiff
path: root/kak
diff options
context:
space:
mode:
Diffstat (limited to 'kak')
-rw-r--r--kak/kakrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/kak/kakrc b/kak/kakrc
index d9e2968..83cf09e 100644
--- a/kak/kakrc
+++ b/kak/kakrc
@@ -19,6 +19,10 @@ hook global ModuleLoaded x11 %{
set global termcmd 'st -e sh -c'
}
+hook global BufWritePre .* %{
+ jrk-trim-trailing-whitespace
+}
+
define-command testcmd %{
prompt -file-completion 'What is your name? ' %{
evaluate-commands %sh{
@@ -39,6 +43,10 @@ define-command jrk-set-makecmd-and-make %{
}
}
+define-command jrk-trim-trailing-whitespace %{
+ try %{ execute-keys -draft "%%s\h+$<ret>d" }
+}
+
map -docstring 'yank to system clipboard' global user y '<a-|>xclip -selection clipboard<ret>'
map -docstring 'paste from system clipboard' global user p '<!>xclip -selection clipboard -o<ret>'