-
Notifications
You must be signed in to change notification settings - Fork 17
Description
First of all I would like to thank you for your work! I have long been looking for some sane session management in vim and your plugin is the best option I have found so far. Unfortunately I have found some bugs though. I've been trying at fixing them myself but since I don't know any viml this would be non-trivial for me. I'll just list them here in one list but if you want me to split them up in more scoped bugs I'd be happy to do that too.
- It works with Neovim but the sessions dir is hardcoded to
~/.vimdirectory on *nix systems.
Neovim uses the xdg default of~/.config/nvimso it would be great to use that directory when neovim is detected. - When I then tried the option for setting an absolute path with
let g:gitsessions_dir = '/absolute/path/'tolet g:gitsessions_dir = '~/.config/nvim/sessions/'it didn't work either.
It looks like the~is not properly expanded or escaped because the sessions directory will again be created under.vimwith an empty~directory.
Setting the complete path with/Users/username/...works but using~is easier and a habit for many people.
Porting the tmux issue into a separate ticket: #19
3. When saving form inside a Tmux session the session file gets a faulty name. In my case: ?Ptmux\;\e\e\]50\;CursorShape=0\cg\emaster. The contents of the file look good but it cannot be loaded afterwards because of the faulty filename.
I think a hashing strategy would fix or avoid some of these errors and also avoid some of the overhead of creating all the shadow directories in the sessions dir.
For example:
if git:
session_string = fully_qualified_path + git_branch_name
else:
session_string = fully_qualified_path
session_hash = hash(unique_session_string)
function save(session_hash):
write(sessions_dir/session_has.vim)
function restore(session_hash):
read(sessions_dir/session_has.vim)
What do you think? I don't know if this is even possible in viml but I think this would definitely solve some problems.