From f69a19a4bd00ad92843b903db3d5967d11095edd Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 30 Oct 2025 09:24:20 +0530 Subject: Dumb snippets --- autoload/surround.kak | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'autoload/surround.kak') 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' +# map global user k ': enter-user-mode surround' # map global surround a ': enter-user-mode surround-append' # map global surround d ': enter-user-mode surround-delete' -# define-command define-surround -params 3 %{ -# evaluate-commands %sh{ -# echo "map global surround-append %{${1}} %{i${2}a${3}}" -# echo "map global surround-delete %{${1}} %{${2}d,}" -# } +# define-command define-surround -params 4 -docstring ': ' %{ +# map global surround-append %arg{1} %sh{ echo "i${3}a${4}" } +# map global surround-delete %arg{1} %sh{ echo "${2}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 "cdiv,/div" "div" "/div" -- cgit v1.3.1