Author Topic: recommend a useful lisp and dcl resource editor  (Read 11994 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12313
  • London, England
Re: recommend a useful lisp and dcl resource editor
« Reply #15 on: July 19, 2013, 07:56:22 AM »
One thing I'd like to see in an editor is a mode that will color code matching pairs of parentheses. I know the IDE will highlight pairs of parens, but if both are not on the same screen that function is not very useful.  If the first level pf parentheses is black, the second level red, the third blue, etc., it is very easy to scroll through code and see where parens do not match.
Usually I use the folding mechanism to get around the issue of matching parens (or even stuff like curly brackets in C/C++/C#, or Begin/End blocks in VB, etc. etc.) when they're too far apart to be seen on one single screen.

With consistent indentation, I find it relatively easy to match parentheses in AutoLISP, however when in doubt, I double-click beside the parenthesis in the VLIDE to quickly view all code enclosed by the parenthesis, e.g.:


irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: recommend a useful lisp and dcl resource editor
« Reply #16 on: July 19, 2013, 08:27:28 AM »
With consistent indentation, I find it relatively easy to match parentheses in AutoLISP, however when in doubt, I double-click beside the parenthesis in the VLIDE to quickly view all code enclosed by the parenthesis, e.g.:
That's a good way too. Even just deleting and retyping the closing paren would jump & highlight the corresponding opening paren temporarily.

But I think the issue is when the group which would be highlighted is larger than your screen.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Lee Mac

  • Seagull
  • Posts: 12313
  • London, England
Re: recommend a useful lisp and dcl resource editor
« Reply #17 on: July 19, 2013, 08:45:30 AM »
But I think the issue is when the group which would be highlighted is larger than your screen.

Scroll  :wink:

hmspe

  • Bull Frog
  • Posts: 338
Re: recommend a useful lisp and dcl resource editor
« Reply #18 on: July 19, 2013, 09:14:42 AM »
But I think the issue is when the group which would be highlighted is larger than your screen.

Exactly.  My start-up lisp is 17548 lines.  Several of the functions are over 1000 lines, and many sub-functions are larger than a single page. 

There are many methods already available for matching parens, but all take a significant amount of time in larger files because they require mouse operations on multiple individual lines.  With color coding and consistent indenting all the parens in column 1 should be black, all the parens in column 3 should be red, etc., and matching pairs should always align by column.  Finding when parens in  a column change colors only requires scrolling through the file.  I find that much faster than having to click through the file.   
"Science is the belief in the ignorance of experts." - Richard Feynman

haibinpro

  • Newt
  • Posts: 47
Re: recommend a useful lisp and dcl resource editor
« Reply #19 on: July 19, 2013, 10:03:04 AM »
The author whrite some helps(write in english) here
https://github.com/everedit/addons/blob/master/help/1033/syntax.md
https://github.com/everedit/addons/blob/master/help/1033/snippet.md
https://github.com/everedit/addons/blob/master/help/1033/mode.md

more (write in chinese) here
https://github.com/everedit/addons/blob/master/help/README.md

the attach is a example of syntax files with some explains.
it show what have define in syntax files.
such as snippet,indent folder,pairs,match region and color define by everedit.

you can find more addons here
https://github.com/everedit/addons

below is the full content,which ref to the everedit wiki
http://wiki.everedit.net/doku.php?id=chinese:syntaxhighlight

Quote

'*******************************************************************************
' EverEdit Syntax File
' Language:    CustomSyntaxTextFile
' Maintainer:  ChenHaibin <258498815@qq.com>
' History:
'   2013/05/05 Created
'   2013/05/06 Updated
'              This files give you the syntax example to show the basic syntax rule and the tips to write for it
' note:
'   It is suggest avoid to use COLOR_FOUND COLOR_PAIR,thest two colors are use by EverEdit itself.If you use it,things are mix up.
'   the right theme make the syntax highlight best.So,custom your own theme if need.
'   COLOR_HIGHLIGHT1-8 are use by EverEdit(the customsign function),when you custom the theme,you should take this into account.
'   the bad design syntax file may cause the program crash.some suddenness may happened too.so,save your files often if need.
'*******************************************************************************
'import syntax basic file
'see mac.mac and vbs.mac for more information
'@example:
' Include(".\vbs.mac")
Include(".\const.mac")

'create parser
Set MySyntax=CreateParser()

'set wordchars
'when you use createword function(and the keywords you ctreate include some chars which are not letters and not digits and noe undelline char"_"),you need to set wordchars(that is:the some chars) to make the autocomplete function works correctly
MySyntax.WordChars="->*:"

'comment
Set rLineComment=MySyntax.CreateRegion(COLOR_COMMENT1,";(?!\|)","$",True)
Set rBlockComment=MySyntax.CreateRegion(COLOR_COMMENT2,"+;|+","(?<!\|)\|;",True)
'all captured matchs need to use the add function to make it works(highlight these captured matchs).It is also require match type.That means AddRegion for CreateRegion and CreateStringRegion,AddItem Capture for CreateItem,AddWord for CreateWord.If you don't abide this rule,the program may crash.
MySyntax.AddRegion(rLineComment)
MySyntax.AddRegion(rBlockComment)
    'add todo... to comment
    Set iTodo=MySyntax.CreateItem(COLOR_HIGHLIGHT2,"\b(TODO|BUG|FIX)\b",False)
    rLineComment.AddItem(iTodo)
    rBlockComment.AddItem(iTodo)

'single quote string and double quote string
Set rString1=MySyntax.CreateStringRegion(COLOR_STRING1,"'","\",False)
MySyntax.AddRegion(rString1)
Set rString2=MySyntax.CreateStringRegion(COLOR_STRING1,"""","\",False)
MySyntax.AddRegion(rString2)

'number
MySyntax.AddItem(MySyntax.CreateItem(COLOR_NUMBER,"\b\d+(\.\d+)?\b",False))

'tags
'as the item(iTag) contain digits that is define by item number:"\b\d+(\.\d+)?\b",to make the iTag highlight correctly.put the Item(iTag) behind item(number)
'if you need highlight item(iTag) inside some specify region(Region or StringRegion),reference the iTodo
Set iTag=MySyntax.CreateItem(COLOR_TAG,"\[\d{1,3}\]",True)
MySyntax.AddItem(iTag)
rBlockComment.AddItem(iTag)

'operator
MySyntax.AddItem(MySyntax.CreateItem(COLOR_OPERATOR,"(?<=\()\+(?=\s)|(?<=\()\-(?=\s)|(?<=\()\*(?=\s)|(?<=\()/(?=\s)|(?<=\()=(?=\s)|(?<=\()<(?=\s)|(?<=\()>(?=\s)|(?<=\()~(?=\s)|(?<=\()<=(?=\s)|(?<=\()>=(?=\s)|(?<=\()/=(?=\s)|(?<=\()1\+(?=\s)|(?<=\()1\-(?=\s)",False))

'function
Set wFunction=MySyntax.CreateWord(COLOR_FUNCTION,"car cdr caar caddr",False)
MySyntax.AddWord(wFunction)
wFunction.AutoCase=True
Set wNewFunction=MySyntax.CreateWord(COLOR_FUNCTION,"vlax-ename->vla-object vl-list* LM:move",False,"->*:")
MySyntax.AddWord(wNewFunction)
wNewFunction.AutoCase=True

'sign
MySyntax.AddItem(MySyntax.CreateItem(COLOR_WORD1,"\b(T|t|nil)\b",False))

'reserved words
MySyntax.AddWord(MySyntax.CreateWord(COLOR_WORD1,"bool double float int long return short sign",True))

'macro
MySyntax.AddItem(MySyntax.CreateItem(COLOR_MACRO,"your_macro_1",False))
MySyntax.AddItem(MySyntax.CreateItem(COLOR_MACRO,"your_macro_2",False))

'error
Set rError=MySyntax.CreateRegion(COLOR_COMMENT1,"\berror:","$",True)
MySyntax.AddRegion(rError)

'capture
'the COLOR_DEFAULT here is behave a non-capturing match
Set iCustomSyntax=MySyntax.CreateItem(COLOR_DEFAULT,"^\s*\(defun\s(?(?=c:)c:([^\(]+)|([^\(]+))\((((\S+|(?R5))\s+)+)?(/((\s+(\S+|(?R9)))+))?(?<!\))\)$",False)
MySyntax.AddItem(iCustomSyntax)'if you don't need highlight the whole item:iCustomSyntax,comment this line.this operate will also make capture 1 2 3 7 lose it's highlight effect.
iCustomSyntax.Capture 1, COLOR_HIGHLIGHT1
iCustomSyntax.Capture 2, COLOR_HIGHLIGHT2
iCustomSyntax.Capture 3, COLOR_WORD1
iCustomSyntax.Capture 7, COLOR_WORD2

'colors no use list at here
'COLOR_URL COLOR_EMAIL COLOR_FOUND COLOR_PAIR COLOR_VAR COLOR_SUBLAN COLOR_IGNORE COLOR_CONCEAL COLOR_CLASS COLOR_ERROR COLOR_LABEL

'set pairs
MySyntax.SetPairs("<>()[]{}''""""")

'set snippet
MySyntax.AddSnippet "MySyntax.snippet"

'set foldtext
MySyntax.FoldText   "\{",False
MySyntax.UnfoldText "\}",False

'set indenttext
MySyntax.IndentText   "^\s*\(((\([^()]*([^()]*|(?R2))[^()]*\))|[^()]*|\([^()]*)*$",False
MySyntax.UnIndentText "^\s*\)$", False

'set comment shortkey
MySyntax.CommentLine  (";")
MySyntax.CommentBlock ";|","|;"
\[\d{1,3}\]
« Last Edit: July 19, 2013, 10:15:21 AM by haibinpro »

haibinpro

  • Newt
  • Posts: 47
Re: recommend a useful lisp and dcl resource editor
« Reply #20 on: July 19, 2013, 11:12:38 AM »
With consistent indentation, I find it relatively easy to match parentheses in AutoLISP, however when in doubt, I double-click beside the parenthesis in the VLIDE to quickly view all code enclosed by the parenthesis, e.g.:
I'm wondering is there a software which can combine two software.
It works like cad specify a texteditor for multiline text edit.(Yes ,I mean spcify a texteditor to replace the original one)

If there is this software.
we can use the powerful textedit to edit code and use vlide to debug.
that wouldbe fun and convinient.

Good news ^_^
The jump out of bracket function will have a big enhance next version.
now we can edit lisp(program with a lot of bracket) more convenient.

the other pic is the select blocktext function made by fans
« Last Edit: July 20, 2013, 01:03:07 AM by haibinpro »

haibinpro

  • Newt
  • Posts: 47
Re: recommend a useful lisp and dcl resource editor
« Reply #21 on: September 06, 2013, 01:20:56 AM »
the calltips function has develop accomplish.
The  state version 3.0 should be outcome before 9.30

you can try beta version at this time.
x86: http://update.everedit.net/everedit300.zip
x64: http://update.everedit.net/everedit300_x64.zip
see http://forum.everedit.net/viewtopic.php?f=3&t=375

I have made the lsp calltips(just the part of official help files,I'll try my best to make a wonderful calltip files for you,just give me some advieser,the way to make calltip files is here http://forum.everedit.net/viewtopic.php?f=3&t=391),see the gif img.
there is also a script for everedit to interact  with autocad,
see http://forum.everedit.net/viewtopic.php?f=5&t=386 for more imformations.

notice:version 3.0 is change to a commerce version(as a shareware),you can use the all function of version 3.0 without any time restrict  before regist.

best regards.
« Last Edit: September 06, 2013, 01:29:42 AM by haibinpro »

haibinpro

  • Newt
  • Posts: 47
Re: recommend a useful lisp and dcl resource editor
« Reply #22 on: September 08, 2013, 11:53:45 PM »
the next release beta version will add a function:
show the current lever content with def background color.
see attach pic for details.
as the last post have 4 attach,i post a new post for attach new one
« Last Edit: September 09, 2013, 01:18:13 AM by haibinpro »

exmachina

  • Guest
Re: recommend a useful lisp and dcl resource editor
« Reply #23 on: September 09, 2013, 02:34:49 AM »
Lisppad
Features:
- Code folding
- Parenthesis checker (up to to down and down to up)
- Auto-completion
- MDI tabs
- Exports colored code to RTF & HTML.
- Print colored code.
- Colors and fonts can be customized (syntax highlighting )
- Codelib: Code library (stores code snippets)
- Integrated web browser
- Bookmarks, navigation..
- Edit tools: Comment code, uncomment code,,increase indexation, decrease indexation, To lowercase, to upper case..
- supports multiple comments  like ;| aeiou |; (syntax highlighting )

Still in development..., but in the forum you can find an old version




RGUS

  • Newt
  • Posts: 95
Re: recommend a useful lisp and dcl resource editor
« Reply #24 on: September 09, 2013, 03:44:58 AM »
Lisppad... oh come on... gives us a link to it...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: recommend a useful lisp and dcl resource editor
« Reply #25 on: September 09, 2013, 04:10:20 AM »
This is an old memory, so ...

I thought Lisppad was written by Tony T and written in (probably) Borland Delphi and included in (one of ) the  Maximizing AutoCAD (probably R13) CD's .


Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

haibinpro

  • Newt
  • Posts: 47
Re: recommend a useful lisp and dcl resource editor
« Reply #26 on: September 10, 2013, 01:30:23 AM »
Lisppad
After search for lisppad,i find a page
http://autocad.xarch.at/news/faq/autolisp.html
but there is not any link to download it.


Quote
[6.1] AutoLISP editors

Visual Lisp by Autodesk
see [5.3]. The best and most recommended tool. With AutoCAD 2000 it is included for free.
Emacs for NT
Huge editor and quite hard to learn but it's written and customizable in elisp, which is very similar to AutoLISP. The mother of all editors. Free, for all platforms. Comes in two flavors, XEmacs or GNU ntemacs.
AutoLisp Mode at http://xarch.tu-graz.ac.at/autocad/lsp_tools/ntemacs.html

Vital LISP outdated by Visual Lisp. Not available anymore. See [5.2] AutoLISP compilers
LispLink 2000
Commercial AutoLISP Editor with Syntax Highlight, Parenthesis Checking, Project Manager, Dialog Preview, and Support for Visual LISP Functions and FAS Compilation. www.caelink.com/
CodeMagic [new]
Freeware text editor with AutoLISP syntax highlighting.

Old Stuff:
LispPad
AutoLISP Editor by Tony Tanzillo.
Visual Lisp by WSSW
Old small Windows Lisp Editor. Version 1.0 was even free. Don't mix it up with Visual Lisp, the new AutoLISP. This is just a small editor. See [1]
WCEDIT 2.02
ADS editor for DOS R12, can evaluate lisp code from within the editor, free.
See [1]
CODEKEY
old commercial DOS IDE, internal pretty printer, protect, unprotect, kelvinator, <availability?>
ALLY 3.0 and CADET
Shareware Lisp Analyzer and Editor.
See [6.2]
pred
free, small dos editor which provides parenthesis highlighting.
At ftp://xarch.tu-graz.ac.at/pub/autocad/lsp_tools/pred.zip A similar editor is ADE.

General customizable programming editors like MultiEdit Pro 7, WinEdit, E!, TextPad, UltraEdit or PFE are widely used also.
They usually don't provide Lisp syntax checking or pretty printing, but (some even regular expression) multi-file search/replace and customizable syntax highlighting.



any one known where is his official site,or just give me a link to download it
i Interest to take a look for it.

btw,I try to make a realtime help system use editor's output windows.

somewhat like this.
but as my poot encoding skill.this may take couple mouths.

en,everedit have the other Features of Lisppad。
just one not include:Exports colored code to RTF & HTML.
this function may include in future version(v3.5 I guess)

I'll try to search forum for this sofeware lisppad and take a try.


I search theswamp with keyword lisppad,and found these
http://www.theswamp.org/index.php?topic=43757.msg490514#msg490514
http://www.theswamp.org/index.php?topic=39368.msg446229#msg446229
there is 2 lisppad,after compare to the lisppad.I found there is also a function everedit doesn't have at this time
when the cursor hover at the collapse rectangle,lisppad will show content while everedit will not.




« Last Edit: September 10, 2013, 03:54:10 AM by haibinpro »

haibinpro

  • Newt
  • Posts: 47
Re: recommend a useful lisp and dcl resource editor
« Reply #27 on: September 10, 2013, 04:46:57 AM »
everedit have publish a new beta version support the show current lever with deff-background color.
see attach img for more imformation.

those anyone could share the lisppad.offcourse i will agree the software'license

I'm interest in the content belows(the debug).
LispPad operates in a manner that is largely consistent with Microsoft Notepad and most other Windows-based editors. It provides all of the same basic functionality as those tools, and adds many functions specifically designed for editing, testing, and debugging AutoLISP and DCL code.

here i give a compare with lisppad and everedit
LispPad have these Features
    Load as Lisp(everedit support,while you need get the script files from official forum and integration it with everedit,support current Select and current file)
    Paste To AutoCAD(I don't know what this function do)
    LispTips(calltips? everedit 3.0 support)
    Goto Definition(everedit not support right now,but it will not difficult to support it,just some script)
    Dialog Box Preview(not support,and i have not idea how to realization )
    Select List(I don't know what this function do)
    Find Matching Parenthesis(support)
    Quick Find Control(support,i suppose)
    Dynamic Parenthesis Counter(I don't know what this function do,and does this function is help in write lsp resource?)
    Send Line(support,just edit the script)
    Dynamic Syntax Display(support well)
    Favorites Folder(support)
    Drag and Drop(support)
    Command Line(support)
    Context Menu(support)
    Smart Comments(support,comment and uncomment)
    Smart Indent(support)

I'll see the next content and getto know what the function i don't know is real do.
and post the rate of progress here.

haibinpro

  • Newt
  • Posts: 47
Re: recommend a useful lisp and dcl resource editor
« Reply #28 on: September 13, 2013, 05:40:34 AM »
I have translate the lispPad feature to chinese,and make a post to sugguest the author to realize some useful feature.
see http://forum.everedit.net/viewtopic.php?f=3&t=339
and i made a calltip(with all common lsp function,vl,vla,vlax,put get method,vlr functions).It is a hardwork.you can use it freely.
have fun.

attach is a part of translate

haibinpro

  • Newt
  • Posts: 47
Re: recommend a useful lisp and dcl resource editor
« Reply #29 on: November 08, 2013, 04:56:44 AM »
the autolisp mode for EverEdit is almost done。
and I'm glad to share the script here and show how the script work.
get fun.
autolisp mode for EverEdit.rar is all the resource

the animation below show the script's behave
Jump to the nesting.mac
Jump to the next expression.mac
Jump over.mac
« Last Edit: November 08, 2013, 05:16:34 AM by haibinpro »