OS: Yosemite iterm2, zsh
When I run "subl ." on my terminal, I can open the file folder, but if I run tmux and "subl project-folder" the folder isn't opened.
➜ ~ whereis subl
/usr/bin/subl
➜ ~ which subl
/usr/local/bin/subl
➜ ~ subl -v
Sublime Text Build 3083
➜ ~ cat .bashrc
export PATH=~/bin:/Users/olleh/bin:/Users/olleh/bin:/Users/olleh/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜ ~ cat .bash_profile
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH=/usr/local/node/bin:$PATH
export MANPATH=/usr/local/node/share/man:$MANPATH
➜ ~ ls -l /usr/local/bin/subl
lrwxr-xr-x 1 root staff 62 Jul 13 09:51 /usr/local/bin/subl -> /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl
# Use vim keybindings in copy mode
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
# Setup 'v' to begin selection as in Vim
# Update default binding of `Enter` to also use copy-pipe
PATH=$PATH:/usr/local/bin/; export PATH
Okay I figured it out. This is because Tmux does not have root access to the file system.
However you can grant access to Tmux, https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.
Here are the steps.
Install this package.brew install reattach-to-user-namespace
Add this to ~/.tmux.conf set-option -g default-command "reattach-to-user-namespace -l zsh"
(change zsh according to your shell)
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With