1

I currently am using a command within a larger bash script to start an instance of NeoVim with some options:

nvim -c "terminal"

What I would like to do is be able to execute a terminal command from the NeoVim terminal that is opened with this command. In particular, I want to execute a specific version of a Python interpreter.

Something like this:

nvim -c "terminal:~/environments/env1/bin/python"

Can something like this be achieved with NeoVim?

2

As described in :help :terminal, you can specify a command that will run in the terminal buffer.

nvim -c 'terminal ~/environments/env1/bin/python'

When :terminal isn't given an explicit command to run, it runs the shell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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