Wednesday, April 19, 2023

Re: What are some alternatives of vim-surround

On Di, 18 Apr 2023, Tim Chase wrote:

> On 2023-04-18 07:29, 'Devin Weaver' via vim_use wrote:
> > leads me to wonder what are the "vim --clean" ways to perform the
> > same actions that vim-surround offers.
>
> vim-surround offers a number of features, some easier to replicate,
> others more challenging.
>
> I commonly use
>
> c<motion/object>'<c-r>"'<esc>
>
> to wrap <motion/object> in quotes, using control+r followed by
> double-quote to enter the text of the most recent deletion/yank.
> It's not repeatable with "." (well, it is, but it repeats the
> original replacement, not with the second text).

If you use the small delete register, it is dot-repeatable. So for e.g.
quoting a single word, cw'<c-r>-' works quite well, which for me is the
main surround use case.


Best,
Christian
--
Konsequent ist nur der, der sich selber mit den Umständen wandelt.
-- Winston Spencer Churchill

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ZD/gDZYsx8GyPBDt%40256bit.org.

No comments: