Ubuntu16.04安装vim8
Ubuntu16.04安装vim8
在Ubuntu16.04下编译安装vim8,并配置vim-plug插件管理器,以及安装YouCompleteMe等插件。
安装依赖
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \
python3-dev ruby-dev liblua5.1 lua5.1-dev libperl-dev git
需要注意的是在Ubuntu16.04中Lua应该为liblua5.1-dev,而在其它版本中应为lua5.1-dev
删除已有vim相关包(可选)
如果是多人使用的机器,最好还是不要轻易apt删除vim,其他人可能受到影响。如果是只有自己一个用户,可以随性:
dpkg -l | grep vim
sudo apt remove vim vim-common vim-runtime vim-tiny
下载最新vim并编译安装
这里安装到个人路径;考虑到远程xshell使用,没有gui,则编译时需要--disable-gui以及--without-x
git clone https://github.com/vim/vim.git
#!/bin/bash
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-cscope \
--disable-gui \
--without-x \
--prefix=/home/zz/soft/vim8
make -j$(nproc) VIMRUNTIMEDIR=/home/zz/soft/vim8/share/vim/vim81
sudo make install
配置vim
不配置vim的话会比较难用,增加一些插件和个人习惯性的定制能提升编码效率。
在下载安装vim插件这件事儿上,Vundle很慢,基于异步的vim-plug则非常快。上手吧:vim ~/.vimrc, 输入vim指令:set paste,将如下内容粘贴到.vimrc中:
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'Valloric/YouCompleteMe', { 'do': './install.py' }
" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'
" Initialize plugin system
call plug#end()
"" 个人定制的一些配置,不喜欢、不习惯可以自行修改
set nu
set tags=./.tags;.tags
set cursorline
set showmatch
set hlsearch
set incsearch
hi CursorLine cterm=NONE ctermbg=black ctermfg=green guibg=NONE guifg=NONE
关闭vim,再次vim ~/.vimrc,敲入:PlugInstall,开始下载插件:可以看到各个插件是同时在下载的,速度很快。
其中YouCompleteMe因为有很多submodule,很容易下载失败,所以手动处理一下:
cd ~/.vim/plugged/YouCompleteMe
git submodule update --init --recursive
python install.py
参考
Ubuntu16.04安装vim8的更多相关文章
- Ubuntu 16.04安装Vim8.0
Ubuntu 16.04安装Vim8.0 https://www.aliyun.com/jiaocheng/131859.html sudo add-apt-repository ppa:jonath ...
- ubuntu16.04安装jdk,tomcat
ubuntu16.04安装jdk,tomcat 最近装了一下tomcat,网上的教程很多,我也试了很多次,但是有一些教程关于tomcat配置是错误的,让我走上了歧途.差点重装系统,还好王总及时出手帮助 ...
- Ubuntu16.04 安装openjdk-7-jdk
Ubuntu16.04 安装openjdk-7-jdk sudo apt-get install openjdk-7-jre 或者sudo apt-get install openjdk-7-jdk ...
- Ubuntu16.04安装GTK3主题:OSX-Arc
Ubuntu16.04安装GTK3主题:OSX-Arc GTK3主题:OSX-Arc描述: 前几个月,Gnome3.20升3.22的时候,出现了大量主题崩溃的现象,其中包括Arc.Flatabulou ...
- Ubuntu16.04安装opencv for python/c++
Ubuntu16.04安装opencv for python/c++ 网上关于opencv的安装已经有了不少资料,但是没有一篇资料能让我一次性安装成功,因此花费了大量时间去解决各种意外,希望这篇能给一 ...
- ubuntu16.04安装不上有道词典的解决办法
转自:http://www.linuxdiyf.com/linux/21143.html ubuntu16.04安装不上有道词典,提示: le@hu-pc:~/下载$ sudo dpkg -i you ...
- Ubuntu16.04安装mongodb
Ubuntu16.04安装mongodb copy from: http://blog.csdn.net/zhushh/article/details/52451441 1.导入软件源的公钥 sudo ...
- 【Tools】ubuntu16.04安装搜狗输入法
Ubuntu16,04 安装搜狗输入法 1.下载搜狗输入法的安装包 下载地址为:http://pinyin.sogou.com/linux/ 2.按键Ctr+Alt+T打开终端,输入以下命令切换到下载 ...
- Ubuntu16.04安装cuda9.0+cudnn7.0
Ubuntu16.04安装cuda9.0+cudnn7.0 这篇记录拖了好久,估计是去年6月份就已经安装过几遍,然后一方面因为俺比较懒,一方面后面没有经常在自己电脑上跑算法,比较少装cuda和cudn ...
随机推荐
- CF1091E New Year and the Acquaintance Estimation
题目地址:CF1091E New Year and the Acquaintance Estimation 首先,易知 \(ans\) 的奇偶性与所有给出的数的和的奇偶性相同 其次,易证 \(ans\ ...
- (转载)经典计算机视觉论文笔记——DeepFace\DeepID\DeepID2\DeepID3\FaceNet\VGGFace汇总
1. DeepFace:Closing the Gap to Human-Level Performance in Face Verification 最早将深度学习用于人脸验证的开创性工作.Face ...
- Python运维开发基础05-语法基础【转】
上节作业回顾(讲解+温习90分钟) #!/usr/bin/env python # -*- coding:utf-8 -*- # author:Mr.chen import os,time Tag = ...
- EF 常见异常总结
问题:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invoca ...
- FFmpeg configure: rename cuda to ffnvcodec 2018-03-06
FFmpeg version of headers required to interface with Nvidias codec APIs. Corresponds to Video Codec ...
- 用Go的风格实现素数筛选
package main import ( "fmt" "time" ) func source(ch chan<- int) { ; i < En ...
- Linux mem/swap/buffers/cached 区别
Free free 命令相对于top 提供了更简洁的查看系统内存使用情况: $ free total used free shared buffers cached Mem: 255268 23833 ...
- opensips redis配置记录
说明:本配置目的:增加opensips对 Redis 的支持. 一.步骤: 1.Redis Server 安装. 2.Hiredis Client 安装.Hiredis 是 Redis 官方指定的C语 ...
- LabVIEW将字符串转化为十进制
(1)作用:将ASCII当做成十六进制来表示,并计算这个十六进制数对应的十进制大小 例如:008A本身对应的ASCII码用十六进制表示为为30 30 38 41,但有些协议中将008A当成0x008A ...
- ubuntu 问题
1.打开ubuntu之后的开启页面出现:所选模式均不匹配可能的模式:为 CRTC 63 尝试模式CRTC 63:尝试 800x600@60Hz 模式输出在 1366x768@60Hz (通过 0)CR ...