I started by looking at the feasibility and wound up with a proof of
concept, though I intended to get feedback earlier.

*Feature Proposal*

Enable fold text lines to be hidden, allowing more unfolded lines to be
displayed.

*Use Case*

This feature pairs well with foldmethod=expr. With foldexpr that matches,
for example, a variable name, only lines with that variable are displayed
allowing rapid scanning. In this use case, the fold text tends to get in
the way. If desired, the gaps can be made apparent by turning on line
numbers, ":set nu".

*Precedent*

Xedit, Kedit, and THE editors implement the ALL command that shows only
lines that match a target. By default. a "shadow line" is displayed to
represent excluded lines. The shadow line can be disabled by "SET SHADOW
OFF". I've seen other editors support this but I can't name them.

While searching for an existing workaround or prior attempt at implementing
this feature, I easily found occasional requests for this functionality
going back at least 20 years.

*Status*

I have a proof of concept that I think could be improved with feedback.

Implementation details:

I've implemented a boolean option with window scope provisionally named "
*foldline*" (abbr. "fdln"). This defaults to TRUE, which enables current
behavior. Setting foline to FALSE (:set nofoldline) suppresses the display
of fold text lines. I also considered naming the option "showfoldline", but
I think starting a fold related command with "fold" is expected. I'm not
convinced "foldlin" is the best name, but ":set nofoldline" or ":set
nofdln" has felt okay in use.

*Documentation (could use improvement)*

doc/quickref.txt:

'foldline'       'fdln'    set to display fold text line for a closed line


doc/options.txt

   *'foldline'* *'fdln'* *'nofoldline'* *'nov'*
'foldline' 'fdln' boolean (default on)
local to window
{not available when compiled without the |+folding|
feature}
When off, fold line is not displayed.
See |folding|.


*Code*

https://github.com/jimhark/vim/tree/foldline

*Tests*

Have not been implemented. If this feature is accepted I can write the
tests. These would be a big help:

   1. Pointer to your testing documentation and recommended resources
   2. Example test code:
      1. For a window scope boolean option.
      2. For a feature that changes the way the screen is drawn.

I look forward to feedback and an opportunity to get this feature accepted.

Thanks,

Jim

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/CACZGLe6SRfnokJ5e2_JJsu0ZFO6AJ7e5fHran8A2YkoS4zYDag%40mail.gmail.com.

Raspunde prin e-mail lui