[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: State-machine based syntax highlighting
From: |
address@hidden |
Subject: |
Re: State-machine based syntax highlighting |
Date: |
7 Dec 2006 10:35:58 -0800 |
User-agent: |
G2/1.0 |
Stefan Monnier wrote:
>
> Actually, font-locking *is* implemented in C. The elisp part usually takes
> a negligible amount of time. The problem start appearing when the
> functionality of the C code is not sufficient and you start trying to parse
> the code in elisp, which is slow.
Good to know. I thought font-lock was implemented in elisp and didn't
bother to check.
BTW, I checked the situation in the enemy camp and seems they also have
problems with performance:
- The colors are wrong when scrolling bottom to top.
Vim doesn't read the whole file to parse the text. It starts parsing
wherever you are viewing the file. That saves a lot of time, but
sometimes the colors are wrong. A simple fix is hitting CTRL-L. Or
scroll back a bit and then forward again.
For a real fix, see |:syn-sync|. Some syntax files have a way to make
it look further back, see the help for the specific syntax file. For
example, |tex.vim| for the TeX syntax.
...
Displaying text in color takes a lot of effort. If you find the
displaying
too slow, you might want to disable syntax highlighting for a moment:
:syntax clear
When editing another file (or the same one) the colors will come back.
http://vimdoc.sourceforge.net/htmldoc/usr_06.html
- State-machine based syntax highlighting, address@hidden, 2006/12/07
- Re: State-machine based syntax highlighting, Robert Thorpe, 2006/12/07
- Re: State-machine based syntax highlighting, address@hidden, 2006/12/07
- Re: State-machine based syntax highlighting, Robert Thorpe, 2006/12/07
- Re: State-machine based syntax highlighting, address@hidden, 2006/12/07
- Re: State-machine based syntax highlighting, Robert Thorpe, 2006/12/07
- Re: State-machine based syntax highlighting, address@hidden, 2006/12/07
- Re: State-machine based syntax highlighting, Stefan Monnier, 2006/12/07
- Message not available
- Re: State-machine based syntax highlighting,
address@hidden <=
- Re: State-machine based syntax highlighting, Robert Thorpe, 2006/12/07
- Re: State-machine based syntax highlighting, Perry Smith, 2006/12/07
- Re: State-machine based syntax highlighting, address@hidden, 2006/12/08
- Re: State-machine based syntax highlighting, Tim X, 2006/12/08
- Re: State-machine based syntax highlighting, address@hidden, 2006/12/08
- Re: State-machine based syntax highlighting, Robert Thorpe, 2006/12/08
- Re: State-machine based syntax highlighting, address@hidden, 2006/12/08
- Re: State-machine based syntax highlighting, Stefan Monnier, 2006/12/08
- Re: State-machine based syntax highlighting, Stefan Monnier, 2006/12/08
- Re: State-machine based syntax highlighting, Lennart Borgman, 2006/12/08