Thursday, July 13, 2017

Re: Really simple abbreviation I can't do

2017-07-13 22:55 GMT+03:00 <arocker@vex.net>:
>
> I hesitate to ask this question, since it appears to be so simple, but the
> answer ought to be useful to a lot of people.
>
> There are many constructs in most programming languages which involve
> paired characters - {} () [] particularly. It would be helpful for the
> first character (or the pair) to insert both ends, then skip back between
> them and start inserting. (That avoids leaving unbalances around.)
>
> Despite trying all sorts of combinations, I've been unable to achieve an
> abbreviation sequence that doesn't insert a space, either before or
> between the pair. Is there one?

Why do you want exactly abbreviation? Though there is a Eatchar
technique described right above `:h :abbreviate-local` (under `:h
abbreviations`), I normally see this implemented on top of mappings.

Though personally I do not use things like autoclose, instead just
having simple mappings like `,s` inserting `()` with cursor left on
the closing `)` (so typed text will be inserted in the middle).

>
> --
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: