diff --git a/.config/fish/functions/kakkill.fish b/.config/fish/functions/kakkill.fish new file mode 100644 index 00000000..61dfd899 --- /dev/null +++ b/.config/fish/functions/kakkill.fish @@ -0,0 +1,6 @@ +function kakkill --description 'select kakoune sessions to kill' + set ids (kak -l | fzf --multi) + for id in $ids + echo kill | kak -p "$id" + end +end diff --git a/.config/kak/autoload/filetype.kak b/.config/kak/autoload/filetype.kak index 62590097..6b56f9bb 100644 --- a/.config/kak/autoload/filetype.kak +++ b/.config/kak/autoload/filetype.kak @@ -25,6 +25,15 @@ hook global WinSetOption filetype=typst %{ unset-option window formatcmd remove-hooks window typst-auto-format } + define-command -docstring %{ + Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file + } typst %{ + nop %sh{ + { + "$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid" + } > /dev/null 2>&1 < /dev/null & + } + } } hook global WinSetOption filetype=fish %{ @@ -36,7 +45,7 @@ hook global WinSetOption filetype=fish %{ # line doesn't cause hortizonal overflow! hook global WinSetOption filetype=man %{ try %{ - # remove these highlighters so everything displays properly + # remove these highlighters so everything displays properly remove-highlighter window/number-lines remove-highlighter window/show-whitespaces ui-wrap-disable @@ -44,12 +53,12 @@ hook global WinSetOption filetype=man %{ # man.kak emits this user hook event # This is needed because we can't modify the selection # in WinSetOption's context - hook -once global User manpageloaded %{ - # This will move the cursor to the enter of the screen + hook -once global User manpageloaded %{ + # This will move the cursor to the enter of the screen set-option window scrolloff "99,0" execute-keys %sh{ result=$((kak_window_height / 2 - 1)) printf '%d%s' "$result" 'j' } - } + } } diff --git a/.config/kak/autoload/surround.kak b/.config/kak/autoload/surround.kak index 296a4531..ad1a1ade 100644 --- a/.config/kak/autoload/surround.kak +++ b/.config/kak/autoload/surround.kak @@ -99,4 +99,6 @@ map -docstring 'surround' global normal k ': enter-user-mode surround' map -docstring 'add surrounding' global surround s ': enter-user-mode surround-add' map -docstring 'delete surrounding' global surround d ':surround-delete' map -docstring 'replace surrounding' global surround r ':surround-replace' +map -docstring 'select inside object' global surround i '' +map -docstring 'select around object' global surround a '' ~