There are apparently ways to do it depending on what terminal you use (seems to work best with urxvt) faq.i3wm.org
Text editor customization
Yeah, I've looked for this before, but all the available solutions fall into these categories:
1. Save the cwd somewhere (either a file, variable, or urxvt seems to have fancy stuff for it), every time you change directory (either by hooking cd, hijacking PS1, or some fancy hook in your shell)
2. Save the cwd in the window's title, have i3 read that through a shitty patch.
3. Look up the PID of the current window, recurse to it's deepest child, get that cwd.
The first two solutions are shitty hacks, using things that shouldn't be used for this purpose, have a lot of weird corner-cases, and simply won't work as well for obvious reasons.
The latter would seem like the best solution to me, and I would use it, if I wasn't using urxvtd, which completely breaks it, since it'll only ever get the cwd of the shell in the terminal with the lowest PID.
I really don't want to resort to that. When projects span more than 3 files, some kind of file manager is a must-have.
The best solution I can see right now is calling "urxvtc -e vim " for every file I want to open. Either from the shell or some kind of file manager like ranger or vifm. That said, a solution for vim itself would be the best. Or if someone has any example of such a setup, that'd be nice.
How do you yank and put between different files if you have them opened in different vim instances?
Use the system's clipboard.
Ensure vim --version has '+clipboard' and add this to your vimrc:
set clipboard=unnamedset clipboard+=unnamedplus
This'll also allow you to copy and paste easily from other programs as well. See this for more info: stackoverflow.com