Hi list,

I've been writing LaTeX for the last few hours and I have Vim configured to use fold markers and automatically open/close folds as I move the cursor. I mark each \section and \subsection in my LaTeX documents with a trailing comment and fold marker, e.g.:

        \subsection{Mediatheek opdracht} % {{{2

So that when I move the cursor outside of all folded text I get a nice outline of the document which is really useful because LaTeX documents tend to grow quite large. I typed the following line:

        \subs<C-x><C-l>

Expecting to get a completion menu listing all of the existing subsections. What happens however is that Vim draws the menu and completes the first matching line, sees the fold marker that was just introduced in the buffer by completing the first match and folds the text above the new fold marker, which causes the completion menu to close.

In effect this makes it impossible to use the completion menu to complete whole lines containing fold markers when you also have Vim configured to automatically open/close folds.

A seemingly simple workaround would be to disable all automatic text folding while the completion menu is visible. Is this easy to implement in Vim and do others agree this is a more sensible thing to do?

Thanks for your time,

 - Peter Odding

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

Raspunde prin e-mail lui