Closed myarcana closed 1 year ago
Not a built-in, but you can create it yourself: see :help surround-customizing
.
Adding let g:surround_124 = "|\r|"
(char2r("|")
is 124) doesn't seem to change the behaviour of my editor. ysiw|
still works just like before, but ci|
still doesn't work
See :help text-objects
. Specifically, note that it doesn't mention i|
anywhere.
Adding a clarification b/c it wasn't clear to me right away: vim-surround doesn't define text objects like those, e.g. the same "issue" exists for ,
where you can ds,
but not ci,
.
However as mentioned in #305, a good alternative is vim-textobj-between (see: https://github.com/kana/vim-textobj-user/wiki).
Some popular languages, e.g. ruby and rust, use
|one, two, three|
-esque expressions as common syntax.ds|
seems to work, deletes the surrounding|
characters successfully, andcs|)
also seems to work (changes them to other types of "surrounders"), as doescs)|
.However,
ysi|
,ci|
,vi|
all don't work.