1

When in (Vim) terminal mode, I can use and then :e! fileName to open a file. Note that without the !, the following error message is displayed "E948: Job still running (add ! to end the job)".

How can I use the (awesome) fzf commands :Buffers, :Files etc., from the terminal buffer (as if they were run with an !)?

2
  • Why not switch to a non-terminal buffer first? I often split a terminal above my current file (the default behavior). If i want to edit a new file, i switch windows back to the file and start editing.
    – D. Ben Knoble
    Feb 16, 2019 at 19:10
  • That is exactly what I am trying to avoid. Feb 16, 2019 at 19:32

1 Answer 1

2

The error E948 only occurs if hidden is not set. In this case vim does not allow to move a modified buffer out of view (lingua Vim: "abandon"). A terminal buffer with a running process (e.g. the shell) is handled like a modified file.

Add

set hidden

to your vimrc. This allows to abandon a modified buffer and a terminal with a running process.

See :help hidden.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.