Ubuntu 16.04 LTS-无法在VIM中启用xterm_clipboard [英] Ubuntu 16.04 LTS - Can't enable xterm_clipboard in VIM

查看:203
本文介绍了Ubuntu 16.04 LTS-无法在VIM中启用xterm_clipboard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常使用VIM,并且以前能够获得+xterm_clipboard

I use VIM a lot, and have previously been able to get +xterm_clipboard support working by using a script provided in a separate post on StackOverflow. I've re-installed Ubuntu on my machine, and have since migrated from Ubuntu 14.04.4 LTS (Wily) to Ubuntu 16.04 LTS (Xenial).

# Get the compile-dependencies of vim
sudo apt-get build-dep vim
# If you haven't got mercurial, get it
sudo apt-get install mercurial
# Get the source
hg clone https://vim.googlecode.com/hg/ vim_source
# Compile it
cd vim_source
./configure \
    --enable-perlinterp=dynamic \
    --enable-pythoninterp=dynamic \
    --enable-rubyinterp=dynamic \
    --enable-cscope \
    --enable-gui=auto \
    --enable-gtk2-check \
    --enable-gnome-check \
    --with-features=huge \
    --with-x \
    --with-compiledby="Your Name <youremail@domain.com>" \
    --with-python-config-dir=/usr/lib/python2.7/config
make && sudo make install

但是,这不再起作用,并且我无法使用" + y 将缓冲区拉到系统中剪贴板.在.configure输出中看不到任何明显的东西,但是vim --version在构建时始终显示-xterm_clipboard.如何解决此问题?

However, this no longer works, and I can't make use of ",+,y to yank buffers to the system clipboard. I don't see anything obvious in the .configure output, but vim --version always shows -xterm_clipboard when I build it. How do I fix this?

推荐答案

您应该已经注意到,源不再通过Merurial(hg)托管在Google代码上,并且已在生成的错误消息中迁移到GitHub通过提供的脚本.

You should have noticed that the source is no longer hosted on Google code via mercurial (hg) anymore, and has migrated to GitHub in the error messages generated by the provided script.

您将需要使用新的源代码树git,并且需要预先安装一些开发人员库.

You'll need to use the new source tree, git, and some developer libraries will need to be installed in advance.

# Get the compile-dependencies of vim
sudo apt-get -y build-dep vim
# Install the "checkinstall" tool so the "make install" step is
# wrapped and the result is a .deb file that can be removed later by
# your package manager rather than having to hunt down every file deployed
# by "make install", which might not be possible if it overwrites existing
# system files.
sudo apt-get -y install checkinstall
# Install python dev
sudo apt-get -y install python-dev
# Install xorg dev
sudo apt-get -y install xorg-dev
# Install git
sudo apt-get -y install git
# Get the source
git clone https://github.com/vim/vim.git vim_source
# Remove ./configure cache in case we have to run this twice due to permissions
# related issues.
rm vim_source/src/auto/config.cache
# Compile it
cd vim_source
make clean
./configure \
    --enable-perlinterp=dynamic \
    --enable-pythoninterp=dynamic \
    --enable-rubyinterp=dynamic \
    --enable-cscope \
    --enable-gui=auto \
    --enable-gtk2-check \
    --enable-gnome-check \
    --with-features=normal \
    --with-x \
    --with-compiledby="DevNull <darkstar@/dev/null>" \
    --with-python-config-dir=/usr/lib/python2.7/config-$(uname -m)-linux-gnu
# Build quickly (8 parallel jobs, hope your system doesn't get overwhelmed)
make -j8
# Need root to install
sudo checkinstall

这篇关于Ubuntu 16.04 LTS-无法在VIM中启用xterm_clipboard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆