Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Remove blank lines for AutoCAD AutoLISP Extension #14

Open
carlosmgilp opened this issue May 4, 2021 · 0 comments
Open

Remove blank lines for AutoCAD AutoLISP Extension #14

carlosmgilp opened this issue May 4, 2021 · 0 comments

Comments

@carlosmgilp
Copy link

**Hello Brother how are you.
I use the AutoCAD AutoLISP Extension programming code
VSCode 1.55.2
Windowns 10

I wanted to ask you if there is the possibility of adding some improvements for this programming language.

For example:

For the entire document:
Delete only the empty lines that are inside a function.
And between function and function leave a single empty line.

For a selection:
Delete only the empty lines that are inside the selection.

This is an example of code with empty lines.**

`

;#region funtion area
(defun acirc (r)

(setq a (* (* r r) PI))

(setq a (rtos a))

(princ (strcat "\nArea = " a))

(princ))
;#endregion

;#region dtr
(defun DTR (a)

(* PI (/a 180.0)))
;#endregion

; test
; ang1 and ang2
(defun TEST (/ ANG1 ANG2)
; funtion angle
(setq ANG1 "Monday")
(setq ANG2 "Tuesday")

(princ (strcat "\nANG1 has the value " ANG1))
(princ (strcat "\nANG2 has the value " ANG2))
(princ));defun

`

This is an example of how it should look.

`;#region funtion area
(defun acirc (r)
(setq a (* (* r r) PI))
(setq a (rtos a))
(princ (strcat "\nArea = " a))
(princ))
;#endregion

;#region dtr
(defun DTR (a)
(* PI (/a 180.0)))
;#endregion

; test
; ang1 and ang2
(defun TEST (/ ANG1 ANG2)
; funtion angle
(setq ANG1 "Monday")
(setq ANG2 "Tuesday")
(princ (strcat "\nANG1 has the value " ANG1))
(princ (strcat "\nANG2 has the value " ANG2))
(princ));defun`

These functions will always have an opening parenthesis and a closing parenthesis.
This is how these functions are always defined.

`(defun foo ()

)`

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant