Author Topic: SublimeText 3 Config file for VisualLisp  (Read 4134 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
SublimeText 3 Config file for VisualLisp
« on: July 18, 2013, 11:22:19 PM »

Has anyone put together a Sublime Text 3 Config file for VisualLisp & AutoLisp ??
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: SublimeText 3 Config file for VisualLisp
« Reply #1 on: July 19, 2013, 01:49:55 AM »
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

danallen

  • Guest
Re: SublimeText 3 Config file for VisualLisp
« Reply #2 on: July 19, 2013, 04:39:52 PM »
Sublime text looks pretty interesting. Is anyone using that regularly?

I've been using textpad for a long time, but always attracted by the shiny & new....

matthewj

  • Newt
  • Posts: 42
  • Vanilla
Re: SublimeText 3 Config file for VisualLisp
« Reply #3 on: August 01, 2013, 09:06:07 PM »
This is the one I've been using for the past year.  Hope it helps.

danallen

  • Guest
Re: SublimeText 3 Config file for VisualLisp
« Reply #4 on: September 14, 2013, 02:03:32 AM »
Just started using sublime tonight, mainly because I was fed up with Textpad not searching across newlines with . (dot) character

Using matthewj's syntax file - thanks! I noticed that multi-line comments are not recognized - example ;| stuff to be commented |;

I thought I'd mess around with the syntax file, but I couldn't easily figure it out, for example I copied

Code: [Select]
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.lisp</string>
</dict>
</dict>
<key>match</key>
<string>(;).*$\n?</string>
<key>name</key>
<string>comment.line.semicolon.lisp</string>
</dict>

and added a copy for the multi-line

Code: [Select]
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.lisp</string>
</dict>
</dict>
<key>match</key>
<string>(;|([\s\S]*?)|;)</string>               ;;; this line changed
<key>name</key>
<string>comment.line.semicolon.lisp</string>
</dict>

but I clearly don't know what I'm doing because it grayed out all my lisp code as if it was a comment...

has anyone resolved this in their syntax file?

matthewj

  • Newt
  • Posts: 42
  • Vanilla
Re: SublimeText 3 Config file for VisualLisp
« Reply #5 on: September 14, 2013, 07:40:00 PM »
Hey danallen,

I've updated the language file to include multi-line comments.  You can find it attached.

Sublime uses Textmate-style grammar, which is daunting to edit unless you know whats going on.  I modify it so infrequently that I have to relearn how it works every time.  Interestingly enough, most people convert the XML file to JSON using the AAApackageDev sublime edit package, edit it, and then convert it back to the XML plist file.

Here is a dense overview of the syntax:  http://docs.sublimetext.info/en/latest/reference/syntaxdefs.html.

I like this guide-like overview better (its kinda old): http://sublimetext.info/docs/en/extensibility/syntaxdefs.html

If you enjoy programming, I recommend reading through it as a learning exercise, as it is a very smart system that scales well with increasingly complex languages.  If you're unfamiliar with JSON and regex, it can be frustrating to get working at first.

Hope this helps.  -M

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: SublimeText 3 Config file for VisualLisp
« Reply #6 on: September 14, 2013, 10:13:40 PM »

I've updated the language file to include multi-line comments.  You can find it attached.

 < .. >
Hope this helps.  -M

Thanks Matthew.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

danallen

  • Guest
Re: SublimeText 3 Config file for VisualLisp
« Reply #7 on: September 15, 2013, 01:39:44 AM »
Thanks Matthew. BTW I'm using sublime 3 beta and they changed the package format to be read from a zip file with renamed extension. I created a flat zip file (no subfolders) of the files you've provided, attached for anyone's use.

Dan