[slim-vim] Text properties for Vim?

Brad Beveridge brad.beveridge at gmail.com
Tue Jun 27 11:15:58 CDT 2006


Emacs has a nice feature that Slime uses, text properties.  Slime uses
this feature to invisibly mark up text.  For example in the debugger
each restart is marked with its restart number.  I'd like to do
something similar with Vim text.  I looked at synID, etc - but I'm not
sure that it is flexible enough and I don't know how to set those
properties.  If synID, synAttr, etc could be made to store meta-data
about the text (without changing the look of the text) then I think
that is the ideal solution.

Failing that I think that I'd like to add extra meta-data text to the
output & somehow make it invisible, leaving an easy to parse s-expr
syntax.  The debugger will look like

Slime (Debugger
(Condition
 FOO is unbound)
-----------------------------------
(Restarts
   ([0] : Return to Slime debugger)
   ([1] : Abort request)
)
)

except that the () braces would be invisible, of course we could use
any pair of non-visible delimiters.  In this way you can quickly
determine context of the cursor no matter where it is, and hitting
<RET> on a restart will invoke that restart.  BTW, simple line number
lookup is probably not good enough because as you expand the backtrace
with local variable information it would get screwed up.

Any thoughts on all this?  Is synAttr etc good enough for what I want?
 How about the s-expr style encoding?

Cheers
Brad


More information about the slim-vim mailing list