1

Same question for surrounding with bracket and braces as well. I'd like visually highlighted text to be surrounded without any added whitespace.

Currently ves( on text will result in ( text ) whereas ves) will result in (text). Because I will never need the spaces I'd just like to make ves({[ act like their closing parens/bracket/braces counterpart.

4

You can change the variable evil-surround-pairs-alist, which (for me) holds the following:

((40 "( " . " )")
 (91 "[ " . " ]")
 (123 "{ " . " }")
 (41 "(" . ")")
 (93 "[" . "]")
 (125 "{" . "}")
 (35 "#{" . "}")
 (98 "(" . ")")
 (66 "{" . "}")
 (62 "<" . ">")
 (116 . evil-surround-read-tag)
 (60 . evil-surround-read-tag)
 (102 . evil-surround-function))

If you change (40 "( " . " )") to (40 "(" . ")"), the parentheses are inserted without spaces. This can also be done using M-x customize.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.