Wednesday, September 24, 2014

Re: How to force Vim to reconcider abbreviations?

On Wednesday, September 24, 2014 2:20:17 AM UTC-5, toothpik wrote:
> On Wed, Sep 24, 2014 at 09:30:22AM +0300, Gevisz wrote:
>
> > Sorry but your suggestion does not work as <C-R> does not insert the
>
> > deleted text back.
>
>
>
> <C-R> isn't what inserts the text -- <C-R>- is
>

Correct, the full suggestion was:

<C-C>ciW<C-R>-<C-]>

Note the '-' after the <C-R>, to insert the contents of the '-' register *as if typed*.

I actually tested this in a mapping and saw it working, I wasn't sure myself whether it would :-)

Your suggestion using a paste doesn't work, because abbreviations only expand on typed text, not on existing text. This is intentional, to allow you a method to actually type the text of an abbreviation when you don't want to expand it.

--
--
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:

Post a Comment