On Wednesday, December 27, 2017 at 7:21:38 PM UTC, Łukasz Jan Niemier wrote:
> Currently Vim allows only single line completions. This is quite limiting as
> there is also no way to determine beginning and end of the completed text so
> this leaves us in the limbo where we need to do some hackish things to
> achieve things like multiline snippets.
>
> Most obvious way to do such thing would be to make (:h complete-items):
>
> { 'word': "aaa\nbbb" }
>
> to insert 2 lines:
> aaa
> bbb
>
>
> Currently it inserts
> aaa^@bbb
>
>
> Where ^@ is NUL character (:h NL-used-for-NUL).
>
> The problems with multiline completion is that there will be open question
> how to handle indentation.
>
> Alternatively we could allow List as 'word' parameter where each line would
> be one item.
>
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
I would be careful of underestimating the complexity of getting indentation
"right". The main problem being that it is probably highly subjective whether
or not the editor should reformat the completion item just because it contains
newlines.
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.