]> Freerunner's - dotfiles.git/commitdiff
kak: add kakoune-surround plugin
authorAndre Ramnitz <tux.rising@gmail.com>
Tue, 26 Nov 2024 17:15:06 +0000 (18:15 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Tue, 26 Nov 2024 17:15:06 +0000 (18:15 +0100)
dot-config/kak/kakrc

index c6f6a9814ef77353738a12d9e41a397adbb69d78..759dc10067c2a742cbdad4523c67f4f700c12c1a 100644 (file)
@@ -62,6 +62,7 @@ bundle kakoune-sudo-write https://github.com/occivink/kakoune-sudo-write
 bundle kakoune-find https://github.com/occivink/kakoune-find
 bundle kakoune-expand https://github.com/occivink/kakoune-expand
 bundle foot.kak https://github.com/kkga/foot.kak
+bundle kakoune-surround https://github.com/h-youhei/kakoune-surround
 bundle kak-harpoon https://github.com/raiguard/kak-harpoon %{
         hook global WinCreate .* harpoon-add-bindings
 }
@@ -281,6 +282,7 @@ map global normal -docstring 'Next buffer '                            <c-n>  ':
 map global normal -docstring 'Previous buffer'                         <c-p>  ': buffer-previous<ret>'
 map global normal -docstring 'add 1 int'                                 '^'  ': inc %val{count} +<ret>'
 map global normal -docstring 'substract 1 int'                         <a-^>  ': inc %val{count} -<ret>'
+map global normal -docstring 'surround'                                    0  ': surround<ret>'
 
 # default user mode
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -320,9 +322,13 @@ map global buffermode -docstring 'Wrap disable'                          W  ': r
 # selection user mode
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 declare-user-mode selmode
-map global selmode -docstring 'clean tabs and trailing whitespaces'      c  ': clean-selections<ret>'
+map global selmode -docstring 'clean tabs and trailing whitespaces'      C  ': clean-selections<ret>'
 map global selmode -docstring 'sort words Horizontally in selection'     h  '| xargs -n1 | sort -u | xargs <ret>'
 map global selmode -docstring 'sort words Vertically in selection '      v  '| sort -n  <ret>'
+map global selmode -docstring 'surround'                                 s  ':surround<ret>'
+map global selmode -docstring 'change surround'                             c  ':change-surround<ret>'
+map global selmode -docstring 'delete surround'                             d  ':delete-surround<ret>'
+map global selmode -docstring 'select tag'                                  t  ':select-surrounding-tag<ret>'
 
 # terminal config (via foot.kak)
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────