博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vim简单配置
阅读量:4669 次
发布时间:2019-06-09

本文共 2835 字,大约阅读时间需要 9 分钟。

目录:

一、安装插件管理神器:Vundle

源码地址

安装方法:

1、克隆到本机

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

2、在本机用户目录下创建.vimrc文件

set nocompatible              " be iMproved, requiredfiletype off                  " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" alternatively, pass a path where Vundle should install plugins"call vundle#begin('~/some/path/here')" let Vundle manage Vundle, requiredPlugin 'VundleVim/Vundle.vim'" The following are examples of different formats supported." Keep Plugin commands between vundle#begin/end." plugin on GitHub repoPlugin 'tpope/vim-fugitive'" plugin from http://vim-scripts.org/vim/scripts.html" Plugin 'L9'" Git plugin not hosted on GitHubPlugin 'git://git.wincent.com/command-t.git'" git repos on your local machine (i.e. when working on your own plugin)Plugin 'file:///home/gmarik/path/to/plugin'" The sparkup vim script is in a subdirectory of this repo called vim." Pass the path to set the runtimepath properly.Plugin 'rstacruz/sparkup', {
'rtp': 'vim/'}" Install L9 and avoid a Naming conflict if you've already installed a" different version somewhere else." Plugin 'ascenator/L9', {'name': 'newL9'}" All of your Plugins must be added before the following linecall vundle#end() " requiredfiletype plugin indent on " required" To ignore plugin indent changes, instead use:"filetype plugin on"" Brief help" :PluginList - lists configured plugins" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate" :PluginSearch foo - searches for foo; append `!` to refresh local cache" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal"" see :h vundle for more details or wiki for FAQ" Put your non-Plugin stuff after this line

使用方法:

//需要安装插件的时候,在.vimrc文件中加入一行:Bundle 'your/script/path'//进入vim后运行以下命令:PluginInstall//或者在终端执行vim +PluginInstall +qall//卸载时只需://去除配置文件中的 Bundle 'your/script/name'//在VIM中运行 :PluginClean

二、配色方案:

当前最受欢迎的是 Solarized 

源码地址

安装方法:

//克隆源码git clone git://github.com/altercation/vim-colors-solarized.git//复制到指定目录cp -rf vim-colors-solarized/colors/  ~/.vim/

然后在.vimrc文件中加入以下代码:

syntax enableset background=darkcolorscheme solarized

三、插件列表:

导航与搜索

自动补全

语法

四、遇到的问题:

问题1:

安装插件YouCompleteMe之后,报错“YouCompleteMe unavailable: requires Vim compiled with Python (2.6+ or 3.3+) support...

解决方法:

sudo apt install vim-python-jedi

问题2:

安装插件YouCompleteMe之后,报错“the ycmd server shut down(restart wit . . . ”

解决方法:

//安装开发工具和CMake:sudo apt-get install build-essential cmake//确保安装了Python-dev:sudo apt-get install python-dev python3-dev//编译YCM cd ~/.vim/bundle/YouCompleteMe./install.py

问题3:

将vim中的内容复制到系统剪贴板

解决方法: 

安装图形化界面的vim,或者重新编译vim

sudo apt-get install vim-gnome

 

 

参考资料:

转载于:https://www.cnblogs.com/minglex/p/9468269.html

你可能感兴趣的文章
CTF/web
查看>>
第五章上 首次登陆
查看>>
第5堂:看到词句就会读-上
查看>>
Phpcms V9全站伪静态设置方法
查看>>
POJ 2176 Folding(区间DP)
查看>>
Dynamic Clock in Terminal.
查看>>
C# 中的委托和事件
查看>>
SHT30 Linux标准 i2c-dev 读取程序
查看>>
wpf TabControl控件的用法
查看>>
centos7忘记密码处理办法
查看>>
正确停掉 expdp 或 impdp
查看>>
Image Captioning代码复现
查看>>
UE4 打包C++项目到win32平台报错 could not find mspdbcore.dll
查看>>
sed系列:行或者模式匹配删除特定行
查看>>
python常见面试题(三)
查看>>
回文日期(NOIP2016 普及组第二题)
查看>>
[jQuery]回到顶部
查看>>
用Github做一个静态网页(GithubPages)
查看>>
Win7下修改Hosts文件
查看>>
Linq to sql并发与事务
查看>>