乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 58|回复: 4

[编程交流] How to open vlide, vlisp or ex

[复制链接]

9

主题

49

帖子

41

银币

初来乍到

Rank: 1

铜币
45
发表于 2022-7-5 22:58:59 | 显示全部楼层 |阅读模式
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.
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-5 23:24:07 | 显示全部楼层
Please take a look to STARTAPP function:
  1. (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:
  1. (STARTAPP "C:\\Program Files\\MyEditor\\MyEditor.exe" (findfile "my_lisp.lsp"))
Alternatively check the built-in commands START and SHELL.
回复

使用道具 举报

24

主题

1265

帖子

1028

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
362
发表于 2022-7-5 23:29:59 | 显示全部楼层
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.
回复

使用道具 举报

9

主题

49

帖子

41

银币

初来乍到

Rank: 1

铜币
45
发表于 2022-7-5 23:47:52 | 显示全部楼层
Thanks lads!! After a few experiments I ended up with this:
  1. (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:
  1. (defun olsp(fname) (startapp "C:\\Program Files (x86)\\Vim\\vim73\\gvim.exe" (findfile fname)))
and
 
  1. (olsp "olsp.lsp")
opens olsp.lsp for editing in vim.
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 00:09:27 | 显示全部楼层
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.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-11 03:01 , Processed in 0.607909 second(s), 62 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表