VIM插件安装

系统信息:

# cat  /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
#  uname -a
Linux localhost.localdomain 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
# cat /proc/version
Linux version 3.10.0-327.22.2.el7.x86_64 ([email protected]) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Jun 23 17:05:11 UTC 2016
[[email protected] ~]# cat /etc/issue

安装

(先安装vundle,再通过这个插件管理器安装管理其它插件)

cd ~
mkdir .vim

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

vim .vimrc

if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,latin1
endif

set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start " allow backspacing over everything in insert mode
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo=‘20,\"50 " read/write a .viminfo file, don‘t store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time

" Only do this part when compiled with support for autocommands
if has("autocmd")
augroup redhat
autocmd!
" In text files, always limit the width of text to 78 characters
" autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("‘\"") > 0 && line ("‘\"") <= line("$") |
\ exe "normal! g‘\"" |
\ endif
" don‘t write swapfile on most commonly used directories for NFS mounts or USB sticks
autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
" start with spec file template
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
augroup END
endif

if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add $PWD/cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif

filetype plugin on

if &term=="xterm"
set t_Co=8
set t_Sb=dm
set t_Sf=dm
endif

" Don‘t wake up system with blinking cursor:
" http://www.linuxpowertop.org/known.php
let &guicursor = &guicursor . ",a:blinkon0"
set go=
"color desert
"set background=light
colorscheme molokai
syntax on
set number
set ts=4
set softtabstop=4
set autoindent

set nocompatible
filetype off

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin ‘gmarik/Vundle.vim‘
Bundle "scrooloose/nerdtree"
Bundle ‘Valloric/YouCompleteMe‘
Bundle ‘tpope/vim-rails‘
Bundle "tomasr/molokai"
Bundle "Lokaltog/vim-powerline"

call vundle#end()
filetype plugin indent on

nmap <F5> :NERDTreeToggle<cr>

vim .vimrc

:bundleinstall

安装完成

其他命令:

:BundleUpdate   #更新
:BundleClean     #清除.vimrc里面没有的插件
:BundleList         #列出插件
:BundleSearch   #查找插件
时间: 2024-08-10 19:16:01

VIM插件安装的相关文章

vim插件安装——使用vundle管理插件(重点是第三节,前面两节可放肆跳过)

时间:2014.08.06 地点:宿舍 ------------------------------------------------------------------------------------- 今晚决定把vim环境搭起来,主要是各种插件,然后就可以过上幸福的生活了. 一.安装插件管理插件pathogen 1. pathogen是一个插件管理插件,方便管理vim中的插件,有了它,一切都变得容易.下载pathogen,https://github.com/tpope/vim-pat

python学习-vim插件安装

centos7上自带python2.7,我们需要优化一下python环境. 一.使用豆瓣源加速软件安装 pip install -i   flask    #使用-i 选项 mkdir ~./pip && vim pip.conf        #修改pip的配置文件 [global] index-url = https://pypi.douban.com/simple/ 二.修改.vimrc文件 主要增加一些配置选项,例如显示行号,一键执行等 vim .vimrc set nocompa

MarkDown的vim插件安装

作用:可以使markdown语法高亮.1.安装.使用pathogen插件管理.    cd ~/.vim/bundle    git clone https://github.com/plasticboy/vim-markdown.git2.配置,安装完成后,由pathogen自动生效,但是markdown写Jekyll博客,需要对yaml语法做个配置.在~/.vimrc中添加以下配置:    let g:vim_markdown_frontmatter=13.markdown代码补全工具sni

2018-2019-1 20189206 vim.c插件安装

vim插件安装 vim插件安装 由于今天在安装vim.c插件耗费了很多时间,配置文件一直不生效,特此记录以下安装插件的方法. 安装vim.c按照博客的方法 第一步:创建目录~/.vim 这个目录是用来存放插件的地方,第一次安装需要创建目录mkdir ~./vim mkdir src cd src git clone https://github.com/WolfgangMehner/c-support.git cp -r ./c-support/ .. 第二步:在配置文件中启用插件 由于我们的虚

vim插件管理器Vundle

1.vim为什么需要插件管理器 按照正常的vim插件安装包括去官网下载.解压.拷贝到VIM的安装目录以及运行:help tags这几个步骤.这些步骤已经足够复杂,更加无法想象的是要更新或者删除一个插件时,因为它的文件分布在各个目录下,就比如Windows上的安装路径,Applicationdata,用户数据,注册表等等,除非你对VIM的插件机制和要删的插件了如直掌,否则你能难将它删除干净.所以一段时间之后,VIM的安装目录下简直就是一团乱麻,管理插件几乎成为了一项不可能完成的任务.插件管理器也是

ubuntu 12.04 下 Vim 插件 YouCompleteMe 的安装

作者:jostree 转载请注明出处 http://www.cnblogs.com/jostree/p/4137402.html 1.需要保证vim的版本大于7.3.584,否则的话需要更新vim 可以通过第三方源更新: 在终端输入下面的代码: $ sudo add-apt-repository ppa:fcwu-tw/ppa $ sudo apt-get update $ sudo apt-get install vim 升级得到vim7.4 2.需要有clang3.2以上的库 可以再此处下载

vim 常用插件安装使用

ctags 安装:yum install ctags 配置:在项目根目录下执行 ctags -R *   ,这时会生成tags文件,在 .vimrc文件末尾处添加 set tags=/workspace/weather/tags     2. cscope 安装:yum install  cscope 配置:下载cscope_map.vim ,把cscope_map.vim里从 if has("cscope")  到 endif里边的内容复制到.vimrc里边去 在项目根目录下执行 c

vim插件详细安装过程

1 写在前面   Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Linux牛人, 黑客之类的也都不用IDE. 但是对我等从Windows平台转移过来的Coder来说, 一个好用的IDE是何等的重要啊, 估计很多人就是卡在这个门槛上了, "工欲善其事, 必先利其器"嘛, 我想如果有一个很好用的IDE, 那些Linux牛人也会欢迎的. 这都是劳动人民的美好愿望罢了, 我今天教大家把gvim改装成一个简易IDE, 说它"简易"是界面上看起来&quo

vimball,帮你安装vba格式的vim插件

<p>vimball是一个vim插件,可以很方便地帮你安装vba格式的插件.</p><p>首先安装vimball,下载后解压到与gvim.exe相同的目录下面,貌似vim自带有vimball,这样安装可以覆盖掉自带的旧版本.</p><p>安装完毕后,直接用vim打开vba格式的文件,输入:so %即可安装,然后:q退出.</p><p>删除插件也很方便,直接在vim里输入:RmVimball 插件名</p> vi