By making use of the remote feature in vim, is it possible to reuse an instance of vim to load up multiple files as needed.
It will be nice to have that facility from within the same terminal instance.
I am more keen to have a tab based interface, which available in vim 7+
The scenario should be
- Open terminal
- vim file1.cpp
- Edit – Save – Ctrl+Z to get to prompt
- open another file
- vim file2.cpp
- Now we have file1.cpp and file2.cpp open in the same editor
Is that possible?!
I have a couple suggestions for you, though neither is exactly what you’re talking about. The first is NERD Tree, which gives you a nice tree-based file browser for opening other files. Very handy. I also set up a hot key (
ctrl+o) to open NERD Tree for me. I keep an alias of whatever project I’m on in~/curr/trunk, so this always works for me:The other thing that I would suggest is to do away with ctrl+z. It’s somewhat clunky, and everyone I know who uses that method tends to get lost and end up with 3 or 4 vim’s running in the background. Take a look at how to open a shell for yourself. I use a map for ;s to execute a shell script:
Which executes:
I also have a bit of magic in my .profile for making it obvious I’m in VIM:
</2 cents>