OT: Vim masks (hides) multiple lines with a comment

Ben Woods woodsb02 at gmail.com
Tue Nov 1 11:41:19 UTC 2016


On 1 November 2016 at 19:28, Anton Shterenlikht <mexas at bris.ac.uk> wrote:

> This is an OT question, on Vim in general.
> (This is on linux, not FreeBSD, where there is no nvi, just Vim.)
>
> Sometimes Vim would mask some lines of text like this:
>
>  55 **!*********************************************************
> **************
>  56 *DEPVAR, delete=15
>  57 +-- 19 lines: 18----------------------------
> ----------------------------------------------------
>  76 ** ALL ZERO initially, EXCEPT 15
>  77 *INITIAL CONDITIONS,TYpe=SOLUTION
>  78 +--  3 lines: ALL, 0, 0, 0, 0, 0, 0, 0-----------------------------
> -----------------------------
>  81 **
>  82 ** >>>>> END   OF USER MATERIAL PART <<<<<<
>  83 **
>
> I cannot find a setting or a command to
> unblock the hidden lines. The only workaround
> I know is to launch Vim as "ex -v".
>
> If I go into the edit mode on hidden lines,
> then they are unmasked, but this is not an
> acceptable workaround, as I don't want to
> edit, just see and check.
>
> I searched online multiple times but cannot
> see anything relevant. Maybe my search phrase
> is not right.
>
> Please advise
>
> Thanks
>
> Anton
>


I think the search phrase you are looking for is code "folding".

These should get you started:
http://vim.wikia.com/wiki/Folding
http://unix.stackexchange.com/questions/141097/how-to-enable-and-use-code-folding-in-vim

Regards,
Ben


More information about the freebsd-questions mailing list