aboutsummaryrefslogtreecommitdiff
path: root/autoload/surround.kak
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-10-30 09:24:20 +0530
committerAkshay Nair <phenax5@gmail.com>2025-10-31 13:25:43 +0530
commitf69a19a4bd00ad92843b903db3d5967d11095edd (patch)
tree3459238e342f04346039286b8301578c6fdaae08 /autoload/surround.kak
parent406432cd53c168390221ae37a41724eda5b867c9 (diff)
downloadkakoune-config-f69a19a4bd00ad92843b903db3d5967d11095edd.tar.gz
kakoune-config-f69a19a4bd00ad92843b903db3d5967d11095edd.zip
Dumb snippets
Diffstat (limited to '')
-rw-r--r--autoload/surround.kak27
1 files changed, 11 insertions, 16 deletions
diff --git a/autoload/surround.kak b/autoload/surround.kak
index 9409935..2df301c 100644
--- a/autoload/surround.kak
+++ b/autoload/surround.kak
@@ -1,24 +1,19 @@
# declare-user-mode surround
# declare-user-mode surround-append
# declare-user-mode surround-delete
-# map global user s ': enter-user-mode surround<ret>'
+# map global user k ': enter-user-mode surround<ret>'
# map global surround a ': enter-user-mode surround-append<ret>'
# map global surround d ': enter-user-mode surround-delete<ret>'
-# define-command define-surround -params 3 %{
-# evaluate-commands %sh{
-# echo "map global surround-append %{${1}} %{i${2}<esc>a${3}}"
-# echo "map global surround-delete %{${1}} %{<a-a>${2}<a-S>d,}"
-# }
+# define-command define-surround -params 4 -docstring ': <trigger> <surrounddesc> <start> <end>' %{
+# map global surround-append %arg{1} %sh{ echo "i${3}<esc>a${4}" }
+# map global surround-delete %arg{1} %sh{ echo "<a-a>${2}<a-S>d," }
# }
-# hook global KakBegin .* %{
-# define-surround ( ( )
-# define-surround [ [ ]
-# # define-surround < < >
-# # define-surround '{' '{' '}'
-# # define-surround '<' '<' '>'
-# # define-surround '`' '`' '`'
-# define-surround '"' '"' '"'
-# # define-surround "'" "'" "'"
-# }
+# define-surround '(' '(' '(' ')'
+# define-surround '[' '[' '[' ']'
+# define-surround '{' '{' '{' '}'
+# define-surround '`' '`' '`' '`'
+# define-surround '"' '"' '"' '"'
+# define-surround "'" "'" "'" "'"
+# define-surround t "c<lt>div,<lt>/div<gt><ret>" "<lt>div<gt>" "<lt>/div<gt>"