如何在NVIM之外运行命令/脚本?

发布于 2025-01-25 17:31:39 字数 1421 浏览 3 评论 0原文

这是的重写。对我来说,这是一个很难说的问题,请让我知道这是否还不清楚。

我希望我可以像在vim中一样在nvim中运行脚本,通过在编辑器之外而不是内部NVIM终端模拟器运行脚本。

例如,使用ls

在VIM上运行的列表文件:

“

结果:它将编辑器放置在后台,好像在我键入ctrl-z。我需要键入一个键,以将编辑器带回前景。这就是我喜欢它的方式,因为我可以迅速回到终端,看看我愿意的结果是什么。

“

它可以快速解决。不是我想要的。

使用:termial ls

“

它打开了终端模拟器。我可以看到它的优势。我可以轻松地从终端缓冲区复制/粘贴,或者将其保留。这不是我大部分想要的。

您知道如何实现这一目标?

This is a rewrite of this question. For me this is a difficult question to put in words, please let me know if this is still unclear.

I wish I could run scripts in NVIM like in VIM, by running scripts outside the editor and not in the internal NVIM terminal emulator.

For example, listing files with ls

Running running : !ls on vim:

Vim :!ls

Result: It places the the editor in the background, as if I had typed CTRL-Z. I need to type a key to bring the editor back to the foreground. This is how I like it, because I can quickly go back to the terminal and see what was the result of my command, if I want to.

Vim :!ls result

Running running : !ls on vim:

Nvim :!ls

It opens a quick fix. Not what I want.

Nvim :!ls result

Using :termial ls

Nvim :terminal ls

It opens a terminal emulator. I can see the advantages for it. I can easily copy/paste from the terminal buffer, or keep it around. It is just not what I want for the most part.

Nvim :terminal ls result

Do you know how this could be achieved?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文