通过 Idea 在 Emacs 或 Vim 中打开当前文件

以下 Emacs 为例,Vim 也适用

通过 Idea 从 iTerm2 中 打开 Emacs 并编辑文件

首先 Add tool

Name 填写 Emacs
Des 随意

Program 添加下文脚本

Arg 填写 $FilePath$

Working dir 填写 $FileDir$

保存,随后在 Tool 栏即可看到 emacs 选项

以下是 shell 脚本

#!/bin/sh
echo $1
osascript &>/dev/null <<EOF
      tell application "iTerm"
        activate
        tell current window to set tb to create tab with default profile
        tell current session of current window to write text "emacs -Q -nw $1"
      end tell
EOF

尝试以下,idea 不支持的 emacs 命令,可以通过外部打开

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容