single-line string?
Jesse Phillips
jessekphillips+D at gmail.com
Thu Apr 14 10:58:47 PDT 2011
spir Wrote:
> I
> would like to know how & how well other editors deal with all of that
> (especially but not only emacs and vim).
Vim's heritage is line based editing. For this reason operations are performed by line and it does processing by line. However as it is visual its buffer consists of more than the line being edited.
Highlighting is done once again on a per line basis and only of the visible area (give but never take a few). To handle multiple lines Vim uses synchronization. It makes use of specific structures which it can use to 'anchor' how the lines below will be highlighted, and again it only needs to process till the end of the visible area (it will continue processing as you scroll down).
You can specify how many lines back Vim will look for an anchor before it gives up. Right now I think comments are the only anchor for D and it looks back like 300 lines. This does mean that highlighting can be incorrect. If you jump from the top to the bottom (not scrolling) and there was an open quote/comment that was never closed you will end up with code which highlights as though it wasn't in a quote/comment.
More information about the Digitalmars-d
mailing list