Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use absolute path to tmux socket #100

Closed
wants to merge 1 commit into from

Conversation

thejohnfreeman
Copy link
Contributor

Pull default from $TMUX in environment.

Closes #99

I also changed the default pane to :.2 instead of the current pane. If that isn't acceptable, then I think it makes sense to split the config into independent variables instead of packaging them in a struct, so that their defaults can be overridden individually.

@@ -44,26 +44,34 @@ endfunction
" Tmux
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

function! s:TmuxSocket()
" The socket path is the first value in the comma-separated list of $TMUX.
return split($TMUX, ',')[0]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The presence of the TMUX environment variable assumes that we are running VIM inside TMUX. That's not necessarily the case…

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they're configuring slime for use with tmux, I would presume it is, right? In the call graph, this is only ever called from TmuxConfig.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The destination terminal needs to run TMUX. The "source" terminal, where VIM runs, doesn't. In practice, I've used vim-slime in both configurations.

However the configuration can be obtained, I don't think it's a good idea to assume the (TMUX) variable exists.

Pull default from `$TMUX` in environment.

Closes jpalardy#99
@jpalardy
Copy link
Owner

jpalardy commented Jan 4, 2017

Closing this -- not useful for everybody.

@jpalardy jpalardy closed this Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants