# declare-user-mode surround # declare-user-mode surround-append # declare-user-mode surround-delete # 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 4 -docstring ': ' %{ # map global surround-append %arg{1} %sh{ echo "i${3}a${4}" } # map global surround-delete %arg{1} %sh{ echo "${2}d," } # } # define-surround '(' '(' '(' ')' # define-surround '[' '[' '[' ']' # define-surround '{' '{' '{' '}' # define-surround '`' '`' '`' '`' # define-surround '"' '"' '"' '"' # define-surround "'" "'" "'" "'" # define-surround t "cdiv,/div" "div" "/div"