Is it possible to link the cwd of vim to the cwd of the shell running it, or change the cwd of the parent shell within vim?
I run neovim+tmux with the tmux-resurrect plugin, and it would be nice if I could restore the neovim session associated with the cwd of all the saved tmux session panes/windows upon executing the resurrect restore command. However, the cwd of the shell running neovim is separate from the cwd of the neovim instance. I would like to create an autocommand that triggers on the event DirChanged to accomplish this, but I'm not sure how or if it's even possible to do that.
Thanks!
Linuxbox, you can usually query theprocpseudo-filesystem (commonly mounted at/proc) about process-related information. For example, you can try to changecwdto the parent process'scwdinVimas follows: (1):let b:ppid = split(readfile('/proc/self/stat', '', 1)[0])[3], (2):exec 'lcd /proc/'. b:ppid .'/cwd'. See the manual page ofproc(5).