[slim-vim] Text properties for Vim?
Larry Clapp
larry at theclapp.org
Tue Jun 27 15:47:18 CDT 2006
On Tue, Jun 27, 2006 at 01:28:34PM -0700, Brad Beveridge wrote:
> On 27/06/06, Larry Clapp <larry at theclapp.org> wrote:
> > On Tue, Jun 27, 2006 at 09:15:58AM -0700, Brad Beveridge wrote:
> > > Any thoughts on all this? Is synAttr etc good enough for what I
> > > want? How about the s-expr style encoding?
> >
> > I think synAttr would be fine, given of course an appropriate
> > syntax file. If the debug window ever gets really big we might
> > have to revisit this; Vim syntax highlighting can be slow on long
> > / wide files.
> >
> > I don't really care for the sexpr-style encoding, as you've
> > described it. If synAttr doesn't work out, I'd rather you stored
> > attributes in some external-to-the-buffer Lisp datastructure. I'd
> > expect the debug-window interaction to be highly stylized (i.e. no
> > arbitrary editing commands allowed), so keeping track of what the
> > buffer looks like shouldn't be too hard.
>
> I have 2 problems with the synAttr idea, though I don't know how
> valid they are
> 1) I don't know how to write syntax files
> 2) I don't know how specific syntax files can get.
Well, likewise (mostly), but there're lots of examples, and a help
file, too. I don't get the impression that they're all that hard.
> For example the restart numbering and the backtrace info will look
> similar (I think), and be of the form
> [x] : String
>
> Ideally, getting the synAttr anywhere on that line will return X.
> Plus, although there is syntax I don't want it coloured. Are syntax
> files flexible enough for this, or is it an uphill battle.
I think you could do that with syntax files, but you probably
shouldn't. Just use the syntax file to get the *type* of the line
(e.g. "stack frame" or "restart" or whatever), and then parse the line
to get the actual *data*.
> Of course, the other thing I can do is look at the whole line the
> cursor is actually on and try to determine what to do based on that
> context, that might also me easy.
Exactly.
-- L
More information about the slim-vim
mailing list