Vim:在后台打开 Firefox 的按键映射绑定

发布于 2024-07-27 03:01:10 字数 407 浏览 0 评论 0 原文

" 打开 firefox - 映射到 Option|Command|f

map <M-D-f> :!/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev

以上可以工作,但在 Vim 中会阻塞。我想做:

map <M-D-f> :!/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev &

但 Firefox 打不开。有关创建从 vim 中打开 firefox 的键绑定的任何建议顺便说一句,我实际上正在使用 macvim。

" Open firefox - maps to Option|Command|f

map <M-D-f> :!/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev

The above works but blocks in Vim. I want to do:

map <M-D-f> :!/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev &

but Firefox does not open. Any suggestions on creating a key binding for opening firefox from within vim in the background? BTW, I'm actually using macvim. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枕头说它不想醒 2024-08-03 03:01:10

尝试

:!open -a Firefox

map <M-D-f> :!open -a Firefox^M

不要忘记输入 CTRL-v Enter 来获取 ^M

我测试过

map <C-f> :!/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev &^M

(因为 在 Terminal.app vim 中似乎对我不起作用),它对我有用。

try

:!open -a Firefox

or

map <M-D-f> :!open -a Firefox^M

Don't forget to type CTRL-v Enter to get the ^M.

I tested

map <C-f> :!/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev &^M

(since <M- and <D- don't seem to work for me inside Terminal.app vim), and it worked for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文