AutoYADM commit: 2025-05-21 15:43:56
This commit is contained in:
parent
327e2877cf
commit
b7c63d5b72
3 changed files with 29 additions and 3 deletions
|
@ -5,7 +5,7 @@ map global normal n "j"
|
||||||
map global normal e "k"
|
map global normal e "k"
|
||||||
map global normal i "l"
|
map global normal i "l"
|
||||||
map global normal h "i"
|
map global normal h "i"
|
||||||
map global normal k "m"
|
# map global normal k "m"
|
||||||
map global normal j "n"
|
map global normal j "n"
|
||||||
map global normal l "e"
|
map global normal l "e"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
declare-user-mode surround
|
||||||
declare-user-mode surround-add
|
declare-user-mode surround-add
|
||||||
define-command -override surround-add-pair -params 2 %{
|
define-command -override surround-add-pair -params 2 %{
|
||||||
evaluate-commands -draft -save-regs '"' %{
|
evaluate-commands -draft -save-regs '"' %{
|
||||||
|
@ -27,15 +28,38 @@ define-command surround-delete %{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define-command -hidden surround-replace-sub -params 1 %{
|
||||||
|
on-key %{
|
||||||
|
evaluate-commands -no-hooks -draft %{
|
||||||
|
execute-keys "<a-a>%arg{1}"
|
||||||
|
enter-user-mode surround-add
|
||||||
|
execute-keys %val{key}
|
||||||
|
}
|
||||||
|
|
||||||
|
surround-delete-key %arg{1}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
define-command surround-replace %{
|
||||||
|
on-key %{
|
||||||
|
surround-replace-sub %val{key}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
map global surround-add ( ':surround-add-pair ( )<ret>' -docstring 'surround with parenthesis'
|
map global surround-add ( ':surround-add-pair ( )<ret>' -docstring 'surround with parenthesis'
|
||||||
map global surround-add ) ':surround-add-pair ( )<ret>' -docstring 'surround with parenthesis'
|
map global surround-add ) ':surround-add-pair ( )<ret>' -docstring 'surround with parenthesis'
|
||||||
map global surround-add [ ':surround-add-pair [ ]<ret>' -docstring 'surround with brackets'
|
map global surround-add [ ':surround-add-pair [ ]<ret>' -docstring 'surround with brackets'
|
||||||
map global surround-add ] ':surround-add-pair [ ]<ret>' -docstring 'surround with brackets'
|
map global surround-add ] ':surround-add-pair [ ]<ret>' -docstring 'surround with brackets'
|
||||||
map global surround-add { ':surround-add-pair { }ret>' -docstring 'surround with braces'
|
map global surround-add { ':surround-add-pair { }<ret>' -docstring 'surround with braces'
|
||||||
map global surround-add } ':surround-add-pair { }<ret>' -docstring 'surround with braces'
|
map global surround-add } ':surround-add-pair { }<ret>' -docstring 'surround with braces'
|
||||||
map global surround-add < ':surround-add-pair < >ret>' -docstring 'surround with angles'
|
map global surround-add < ':surround-add-pair "<" ">"<ret>' -docstring 'surround with angles'
|
||||||
map global surround-add > ':surround-add-pair < ><ret>' -docstring 'surround with angles'
|
map global surround-add > ':surround-add-pair < ><ret>' -docstring 'surround with angles'
|
||||||
map global surround-add "'" ":surround-add-pair ""'"" ""'""<ret>" -docstring 'surround with quotes'
|
map global surround-add "'" ":surround-add-pair ""'"" ""'""<ret>" -docstring 'surround with quotes'
|
||||||
map global surround-add '"' ":surround-add-pair '""' '""'<ret>" -docstring 'surround with double quotes'
|
map global surround-add '"' ":surround-add-pair '""' '""'<ret>" -docstring 'surround with double quotes'
|
||||||
map global surround-add * ':surround-add-pair * *<ret>' -docstring 'surround with asteriks'
|
map global surround-add * ':surround-add-pair * *<ret>' -docstring 'surround with asteriks'
|
||||||
map global surround-add _ ':surround-add-pair _ _<ret>' -docstring 'surround with undescores'
|
map global surround-add _ ':surround-add-pair _ _<ret>' -docstring 'surround with undescores'
|
||||||
|
|
||||||
|
map -docstring 'surround' global normal k ': enter-user-mode surround<ret>'
|
||||||
|
map -docstring 'add surrounding' global surround s ': enter-user-mode surround-add<ret>'
|
||||||
|
map -docstring 'delete surrounding' global surround d ':surround-delete<ret>'
|
||||||
|
map -docstring 'replace surrounding' global surround r ':surround-replace<ret>'
|
||||||
|
|
|
@ -116,3 +116,5 @@ map -docstring 'pick unopened file' global peneira F ': peneira-files -hide-open
|
||||||
map -docstring %{
|
map -docstring %{
|
||||||
pick line in buffer
|
pick line in buffer
|
||||||
} global peneira '/' ': peneira-lines<ret>'
|
} global peneira '/' ': peneira-lines<ret>'
|
||||||
|
|
||||||
|
# source "%val{config}/autoload/surround.kak"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue