The Visual LISP code formatter arranges the text of AutoLISP expressions in a style that improves appearance and readability.
Note: The Visual LISP IDE is available on Windows only.
The code formatter works automatically as you enter code in the text editor window, but can also be used to format text copied from other editors, or for reformatting your code in a different style.
As code is entered in the text editor window, the Visual LISP Smart Indent feature works in the background and arranges the indentation of the program code automatically. The indent is evaluated up to the current AutoLISP parenthesis nesting level. If the current expression is preceded by only a sequence of completed top-level AutoLISP expressions, the indentation will be zero.
You can also explicitly invoke the formatter to rearrange
-
Selected lines of text. If you select text to be formatted, the selection must contain valid AutoLISP expressions or the formatter will issue an error message.
-
All text in the current text editor window.
Note: If the formatter finds unbalanced parentheses in your code, an message box is displayed. Based on your response to the message box, code formatter will or will not add parentheses where it thinks they belong. While the code formatter can balance the number of parentheses, it might not insert the missing parentheses in the correct places.
When formatting text, keep the following in mind:
- The formatter relies on a fixed window font and a particular tab size. To change font settings, click Window Attributes Font; to change tab settings, click Window Attributes Configure Current.
- The formatter is available only within Visual LISP text editor windows.
- Existing Space and Tab characters placed outside of inline comments and strings will not influence the formatting result.