vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] visual-matches


From: Thomas Dickey
Subject: Re: [vile] visual-matches
Date: Fri, 11 Oct 2013 17:41:40 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Oct 11, 2013 at 04:50:09PM -0400, Wayne Cuddy wrote:
> I have a file that is only about 30k lines. The command 'g/pattern/d'
> takes a very long time when visual-matches is enabled and is almost
> instant when set to 'none'. I'm curious to what would cause this? Is the
> match highlighter being executed after each line is remove when visual
> matching is enabled? Is there a way to have the g/v and other commands

yes - it is inefficient.  Essentially

        a) when the search command is issued, vile scans the whole file,
           computing the highlighting as a linked list
           (think of it as a transparent overlay).

        b) as it displays a page, vile looks in the list for chunks that
           fall on the page.

        c) doing an edit or other change that requires repainting the screen
           adds the overlay as in (c)

The same issue exists with syntax highlighting, though solving this one
seems less complicated.  (On the other hand, syntax highlighting
can be turned with the autocolor setting - that doesn't apply to
visual matches). 

> that modify text save, disable and re-enable visual matches so
> that I don't have to remember to do it?
> 
> Thanks,
> Wayne
> 
> _______________________________________________
> vile mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/vile

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]