Using vim, I use :term to open the terminal emulator. After cd /path/to/project within the terminal emulator, I have a file called foo.txt. If I did vim foo.txt to open it as I would in a normal terminal, it would open vim within vim which causes a variety of issues. I see two potential solutions:
Does anyone have tips on either solution?
Inside Vim's builtin terminal, do
vim --remote foo.txt
This assume that your Vim was compiled with the +clientserver option. You can check with :version or :echo has('clientserver').
vim --remote works on vim, but neovim compiles without clientserver. neovim-remote seems to be an alternative for neovim.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With