Jump to content

Recommended Posts

Posted

I want to open a lisp file for editing from command line. I can find the file using (findfile "my_lisp.lsp"), but how can I call vlide, vlisp or an external editor (vim) with "my_lisp.lsp" as the parameter? I want to get directly into editing instead opening vlide, navigating to the directory with my lisp files, finding the file and finally editing it.

Posted

Please take a look to STARTAPP function:

(STARTAPP "NOTEPAD" (findfile "my_lisp.lsp"))

Please note that for this the targeted application call must be registered in Acad.PGP file; otherwise use full path:

(STARTAPP "C:\\Program Files\\MyEditor\\MyEditor.exe" (findfile "my_lisp.lsp"))

Alternatively check the built-in commands START and SHELL.

Posted

Also, the (findfile) function is only good if the lisp file is stored within a directory that is in your support file search path. You may need the full path there also.

 

There is no way to pass the name of a file to the VLIDE as far as I know.

Posted

Thanks lads!! After a few experiments I ended up with this:

(startapp "C:\\Program Files (x86)\\Vim\\vim73\\gvim.exe" (findfile 
"ctag.lsp")

MSasu, your ninja edit answered my question: "vim" alone wasn't working.

 

Thanks!

 

Shortcut:

(defun olsp(fname)
 (startapp "C:\\Program Files (x86)\\Vim\\vim73\\gvim.exe" (findfile fname))
)

and

 

(olsp "olsp.lsp")

opens olsp.lsp for editing in vim. :D

Posted

I have a shortcut on the desktop which is my main lisp directory open this then just double click lsp required use associate with NOTEPAD to open. Grab directory in explorer and drag to desktop.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...