dor*_*emi 41 vim tmux neovim macos-sierra
昨天,我升级到了MacOS Sierra,它在我的tmux + neovim设置中打破了我的剪贴板功能.
这是行为:
每当我在tmux会话中使用vim中的剪贴板时,我都会收到以下vim错误:
clipboard: error:
Run Code Online (Sandbox Code Playgroud)
我.vimrc是巨大的,但这是我认为可能相关的:
set clipboard=unnamed
Run Code Online (Sandbox Code Playgroud)
在我.tmux.conf(为了简洁也截断):
set -g prefix ` # use tilde key as prefix
bind ` send-key ` # insert tilde by pressing twice
set -g history-limit 100000 # set buffer size
set -s escape-time 0 # fix escape key in vim
set -g allow-rename off # keep window names static
set -g default-terminal "screen-256color" # set the TERM to 256 colors
set -g base-index 1 # start window count at 1
set -g pane-base-index 1 # start pane count at 1
set -g default-shell $SHELL # use zsh as shell
Run Code Online (Sandbox Code Playgroud)
编辑:这似乎与此处报告的错误有关:
https://github.com/tmux/tmux/issues/543
https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/issues/53
ilt*_*mpo 59
这似乎是对macOS Sierra的回归.Josh McGinnis 提到了一个对我有用的解决方案https://github.com/tmux/tmux/issues/543:
brew install reattach-to-user-namespace
确保在.tmux.conf中设置以下内容:
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
Run Code Online (Sandbox Code Playgroud)
在.vimrc或〜/ .config/nvim/init.vim(对于Neovim):
set clipboard=unnamed
Run Code Online (Sandbox Code Playgroud)
现在一切都很好,我可以使用vim键绑定和/或系统ctrl + c/ctrl + p在系统< - > vim会话之间复制/粘贴.
升级brew + vim + tmux为我解决了这个问题:
brew update
brew upgrade vim
brew upgrade tmux
Run Code Online (Sandbox Code Playgroud)
笔记:
brew link --overwrite ruby# set-option -g status-utf8 onxcode-select --install事后看来,这可能搞砸了我的react-native安装:/.买家要小心)brew updatebrew时抱怨它没有写访问权限,/usr/local所以我自己就成了/usr/local NON-RECURSIVE的拥有者.更新brew后告诉我,我可以将所有者改回root:wheel.| 归档时间: |
|
| 查看次数: |
6847 次 |
| 最近记录: |