How to open vlide, vlisp or ex
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. 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. 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. 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. 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.
页:
[1]