Thursday, September 22, 2011

Re: Complete text object?

On Sep 21, 6:44 pm, AK <andrei....@gmail.com> wrote:
> Is there a plugin to complete a text object?
>
> e.g. where | is cursor:
>
> "one two" "three four" "<c-x><c-z>
>
> "one two" "three four" "three four"
>
> "one two" "three four" "o<c-x><c-z>
>
> "one two" "three four" "one two"
>
> And the same thing for other text objects, of course?
>
> What other neat things might be done with text objects, in theory (I'm
> thinking of ideas for a new plugin)?
>

It looks like you're trying to complete strings. I don't know of a
plugin to do that, but your subject is more interesting to me than
your example, because Vim supports a variety of text-objects
(see :help text-objects) such as sentences, paragraphs, code blocks,
xml-style tags, words, WORDs, strings with ", strings with ', and
more. I think it would be really neat to be able to complete any of
these...but probably fairly difficult to accomplish, especially with
an acceptable level of performance. Maybe if it were limited to a very
small number of buffers (current buffer only? visible buffers only?).

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

No comments: