From: Andre Ramnitz Date: Wed, 27 Dec 2023 00:02:46 +0000 (+0100) Subject: kak: update config X-Git-Tag: v0.2~270 X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=cad92decec73355eddb31beb16505e88e725c344;p=dotfiles.git kak: update config --- diff --git a/config/kak/kakrc b/config/kak/kakrc index dea2afaa..f73aa449 100644 --- a/config/kak/kakrc +++ b/config/kak/kakrc @@ -20,7 +20,6 @@ plug "andreyorst/plug.kak" noload hook global WinSetOption filetype=(c|cpp) smarttab } plug "whereswaldon/shellcheck.kak" - plug "occivink/kakoune-filetree" plug "occivink/kakoune-sudo-write" plug "occivink/kakoune-find" plug "foot.kak" @@ -56,7 +55,7 @@ hook global WinCreate [^*].* %{ hook -once window WinDisplay .* %{ hook window WinResize [0-9]*\.[0-9]* %{ set-option window scrolloff %sh{ - printf '%u,%u' "$(($kak_window_height / 6))" "$(($kak_window_width / 8))" + printf '%u,%u' "$(($kak_window_height / 5))" "$(($kak_window_width / 8))" } } } @@ -124,29 +123,40 @@ define-command -hidden -params 2 inc %{ try %{ map global normal '#' :comment-line -docstring 'comment line' map global normal '' :comment-block -docstring 'comment block' map global goto m 'm;' -docstring 'matching char' -map -docstring 'select lines downwards' global normal X TLx -# see #inc map global normal ': inc %val{count} +' map global normal ': inc %val{count} -' -map global normal Q q # map q to Q -#map global normal q -docstring 'tabs mode' ': enter-user-mode tabs' # map q to tabs mode - # default user mode # ────────────────────────────────────────────────────────────────────────────── -map global user -docstring 'enable autocomplete' a ': set-option -add buffer autocomplete insert' -map global user -docstring 'disable autocomplete' A ': set-option -remove buffer autocomplete insert' +map global user -docstring 'Buffer mode' b ':enter-user-mode buffermode' +map global user -docstring 'Selection mode' s ':enter-user-mode selectionmode' +#map global user -docstring 'bookMarks mode' m ':enter-user-mode bookmarks' + map global user -docstring 'edit kakrc' e ': e ~/.config/kak/kakrc' -map global user -docstring 'clean tabs and trailing whitespace in selections' c ': clean-selections' -map global user -docstring 'clean tabs and trailing whitespace in the buffer' C ': clean-buffer' -map global user -docstring 'buffer backward' b ': buffer-previous' -map global user -docstring 'buffer forward' n ': buffer-next' -map global user -docstring 'lint-buffer' L ': buffer *lint-output*' -map global user -docstring 'relative line numbers enable' r ': add-highlighter window/nl number-lines -relative -hlcursor' -map global user -docstring 'relative line numbers disable' R ': remove-highlighter window/nl' -map global user -docstring 'wrap enable' w ': add-highlighter buffer/bw wrap' -map global user -docstring 'wrap disable' W ': remove-highlighter buffer/bw' +# buffer user mode +# ────────────────────────────────────────────────────────────────────────────── +declare-user-mode buffermode +map global buffermode -docstring 'enable autocomplete' a ': set-option -add buffer autocomplete insert' +map global buffermode -docstring 'disable autocomplete' A ': set-option -remove buffer autocomplete insert' +map global buffermode -docstring 'Lint buffer' L ': buffer *lint-output*' +map global buffermode -docstring 'buffer picker' l ': connect terminal-popup kcr fzf buffers' +map global buffermode -docstring 'Next buffer ' n ': buffer-next' +map global buffermode -docstring 'Previous buffer' p ': buffer-previous' +map global buffermode -docstring 'clean tabs and trailing whitespace in the buffer' c ': clean-buffer' +map global buffermode -docstring 'wrap enable' w ': add-highlighter buffer/bw wrap' +map global buffermode -docstring 'wrap disable' W ': remove-highlighter buffer/bw' + +# selection user mode +# ────────────────────────────────────────────────────────────────────────────── +declare-user-mode selectionmode +map global selectionmode -docstring 'clean tabs and trailing whitespace in selections' c ': clean-selections' + +# window user mode +# ────────────────────────────────────────────────────────────────────────────── +declare-user-mode windowmode +map global windowmode -docstring 'relative line numbers enable' r ': add-highlighter window/nl number-lines -relative -hlcursor' +map global windowmode -docstring 'relative line numbers disable' R ': remove-highlighter window/nl' # terminal config (via foot.kak) # ────────────────────────────────────────────────────────────────────────────── diff --git a/config/kak/plugins/bookmarks.kak b/config/kak/plugins/bookmarks.kak index 2e92602e..d2269398 160000 --- a/config/kak/plugins/bookmarks.kak +++ b/config/kak/plugins/bookmarks.kak @@ -1 +1 @@ -Subproject commit 2e92602eef5ed1717660689765b93583eecce099 +Subproject commit d2269398466268ef4393b9f71c3d247623292007