wting / gitsessions.vim

Auto save/load vim sessions based on directory and git branch.
MIT License
74 stars 17 forks source link

Unable to use gitsessions within tmux #19

Open wting opened 6 years ago

wting commented 6 years ago

@olbrew: Porting this issue from #15.

  1. 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.

wting commented 6 years ago
tmux

I was unable to reproduce this with tmux 2.7 and vim 8.0 on OSX.

@olbrew: What setup are you using? Can you reproduce within vim instead of neovim?