# declare-user-mode surround # declare-user-mode surround-append # declare-user-mode surround-delete # map global user s ': 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,}" # } # } # hook global KakBegin .* %{ # define-surround ( ( ) # define-surround [ [ ] # # define-surround < < > # # define-surround '{' '{' '}' # # define-surround '<' '<' '>' # # define-surround '`' '`' '`' # define-surround '"' '"' '"' # # define-surround "'" "'" "'" # }