tmux-resurrect
tmux-resurrect copied to clipboard
Source nvim session from some other directory
I prefer storing session.vim files outside my project directory , is there any way by which tmux could source this file from another directory link ~/.config/nvim/sessions/
Gaining the ability to source vim sessions from not exactly ./Session.vim would be a great benefit for me because it'd allow having different vim sessions in the same directory concurrently. (Happens, for example, when I'm in a session with a window for the module-being-worked-on, a window for all the parts of the code where I insert quick hacks, and one for testing). With plain ":mks! all the time", these would overwrite each other.
@ankitpal1029, do you already have a mechanism that sets you up the sessions in ~/.config/nvim/sessions (or ~/.local/share/nvim/sessions but whatever)?
@chrysn there is this vim plugin called vim-workspace that offers this but i couldn't quite get the source the session file automatically on startup to work . If you get this to work on your system do let me know , it infact does provide what you need in the sense that you can just hop into the code without a flag (that restores your session) and with a flag (which opens a fresh non recorded session)
This way the session file doesn't get overwritten each time you just get into vim for making a small edit.
Maybe not exactly the solution but I think its better to use startify or Auto-session to manage sessions in vim/neovim. There's also the dashboard plugin that I haven't tested out myself. One advantage of this method is that your can restore from all kinds sessions in your directory of choice automatically or manually. I use tmux resurrect purely for tmux sessions and windows and the dedicated vim/nvim plugins for extending their functionalities.