A.J.Mechelynck wrote:
Charles E Campbell Jr wrote:
[...]
Unfortunately, IMHO, inline folding didn't get enough votes during
vim 7.0's development, and Bram is uncomfortable with the idea of
inline folding because it, naturally enough, suppresses information
(Vince's patch typically folds all lines but the current one). At
least, that's how I understand the state of things.
Regards,
Chip Campbell
Doesn't linewise folding also suppress information? Yet Vim has had
that for quite some time. It is true that it doesn't make the folds
disappear completely; rather, each outer closed fold is replaced by
one line. That wouldn't work for inline folding; but maybe it could
use the 'foldcolumn' or something to draw attention to the fact that
something has been hidden.
And BTW, the Hidden highlight group (guibg=bg guifg=bg) also
suppresses whatever uses it, yet IIUC it is used a lot in helpfiles.
I'm not sure about netrw, but the older Explorer plugin also used it
to hide its sort key.
That wasn't my objection; I rather like inline folding. Also, perhaps I
may not have stated Bram's objection correctly, or perhaps I
misunderstood it.After all, he does have the following note in the
todo.txt:
- Add 'hidecomment' option: don't display comments in /* */ and after //.
Or is the conceal patch from Vince Negri a more generic solution?
Vince Negri's patch could certainly be used to hide comments but leave
the comment start designators visible. It basically allows one to
extend syntax highlighting to include the conceal option, so one can
specify things to inline conceal.
Vince's folding patch supports the notion of conceallevel; taken from
his patch to options.txt:
'conceallevel'Effect
0Text is shown normally
1Each block of concealed text is replaced with the
character defined in 'listchars' (default is a dash)
and highlighted with the Conceal highlight group.
2Concealed text is completely hidden unless it has a
custom replacement character defined (see
|syn-cchar|.
3Concealed text is completely hidden.
Even conceallevel==3 isn't actually completely hidden; instead, the
current line (the one the cursor is on and where presumably editing may
occur) has its text shown normally (ie. no inline folding on the current
line).
Regards,
Chip Campbell