dhruvasagar / vim-prosession

Handle vim sessions like a pro
254 stars 22 forks source link

Questions about using with git #78

Closed timsofteng closed 2 years ago

timsofteng commented 3 years ago

Hello. May I ask you about using vim-prosession with git?

  1. Can it make new session automatically when I checkout to another git branch?
  2. Can it restore previous session automatically when I checkout back?
dhruvasagar commented 3 years ago

@timsofteng There is an option g:prosession_per_branch which you can enable to direct prosession to create sessions per git branch. You would still have to restart vim to switch.

timsofteng commented 3 years ago

It would be great to have automatically switching feature.

Or just switching to current branch session by some shortcut. It could prevent some faults for unsaved files because you could handle this case and message user about unsaved files.

dhruvasagar commented 3 years ago

@timsofteng I think that's a good suggestion, i'll see if we can do something like this