2

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?

Marcelo
  • 1,702
  • 2
  • 24
  • 42
  • Short answer: go and use Vim instead. – Matt May 02 '22 at 15:55
  • Some people also had that discussion on the VI stack exchange: https://vi.stackexchange.com/questions/19705/how-can-i-emulate-shell-command-in-neovim – 0x9BD0 May 02 '22 at 15:57

0 Answers0