Closed zeitchef closed 3 years ago
Can you try sourcing the default tmux config on Vimleave?
Indeed, this get's me about 95% there:
if !empty($TMUX)
au BufEnter * :OneStatus
au VimLeave * call system('tmux source-file ~/.tmux.conf')
set noshowmode noruler noshowcmd cmdheight=1
set laststatus=0
endif
The only problem is that for any Vim buffer open in any other tmux session, its information is then wiped out. I guess what I'm after is a per-session solution.
One thing I came up with is:
Before onestatus
sets tmux configuration save all default option to a file.
That is achieved by using this command tmux show -g > tempfile.conf
Now source this file on VimLeave
I am working on the implementation details right now. Let me know if find anything I am doing wrong.
The only problem is that for any Vim buffer open in any other tmux session, its information is then wiped out. I guess what I'm after is a per-session solution.
Note: tmux show -g
get incomplete list of option for a complete list use:
tmux show -gw > tempfile.conf
tmux show -w >> tempfile.conf
Hello, It's actually a good feature request, thanks.
I added a new command :OneStatusClean
that will allow to clean git branches, file names and cwd from your status bar here.
Now you can just:
au VimLeave * :OneStatusClean
And as always, thanks for helping @tusqasi, I was very busy with work lately so I could not maintain this project.
@narajaon @tusqasi Thanks for your attention here! I can confirm this is behaving exactly as I expected. Cheers!
Since I usually have multiple projects open in tmux at once, I'd like to not pollute my onestatus with filenames and git branches from other tmux windows if possible.
Is there a way to clear the filename and git branch in the status bar on VimLeave?