Bundle管理Vim插件

前端之家收集整理的这篇文章主要介绍了Bundle管理Vim插件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
1. 什么是Vundle?
Vundle(https://github.com/VundleVim/Vundle.vim)的全称是Vim Bundle,它是一款Vim插件管理工具。Vundle让你可以非常轻松地安装、更新、搜索和清理Vim插件。它还能管理你的运行时环境,并帮助标记。我在本教程中将介绍如何安装和使用Vundle。


2. 安装Vundle


首先,在~/.vim目录下创建一个bundle目录


然后,下载Vundle.vim到~/.vim/bundle目录下


命令:
$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim




3. 配置Vundle


对~/.vimrc文件进行如下配置
  1. " All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by
  2. " the call to :runtime you can find below. If you wish to change any of those
  3. " settings,you should do it in this file (/etc/vim/vimrc),since debian.vim
  4. " will be overwritten everytime an upgrade of the vim packages is performed.
  5. " It is recommended to make changes after sourcing debian.vim since it alters
  6. " the value of the 'compatible' option.
  7.  
  8. " This line should not be removed as it ensures that varIoUs options are
  9. " properly set to work with the Vim-related packages available in Debian.
  10. runtime! debian.vim
  11.  
  12. " Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc.
  13. " This happens after /etc/vim/vimrc(.local) are loaded,so it will override
  14. " any settings in these files.
  15. " If you don't want that to happen,uncomment the below line to prevent
  16. " defaults.vim from being loaded.
  17. " let g:skip_defaults_vim = 1
  18.  
  19. " Uncomment the next line to make Vim more Vi-compatible
  20. " NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
  21. " options,so any other options should be set AFTER setting 'compatible'.
  22. "set compatible
  23.  
  24. " Vim5 and later versions support Syntax highlighting. Uncommenting the next
  25. " line enables Syntax highlighting by default.
  26. if has("Syntax")
  27. Syntax on
  28. endif
  29.  
  30. " If using a dark background within the editing area and Syntax highlighting
  31. " turn on this option as well
  32. "set background=dark
  33.  
  34. " Uncomment the following to have Vim jump to the last position when
  35. " reopening a file
  36. "if has("autocmd")
  37. " au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
  38. "endif
  39.  
  40. " Uncomment the following to have Vim load indentation rules and plugins
  41. " according to the detected filetype.
  42. "if has("autocmd")
  43. " filetype plugin indent on
  44. "endif
  45.  
  46. " The following are commented out as they cause vim to behave a lot
  47. " differently from regular Vi. They are highly recommended though.
  48. set showcmd " Show (partial) command in status line.
  49. set showmatch " Show matching brackets.
  50. set ignorecase " Do case insensitive matching
  51. set smartcase " Do smart case matching
  52. "set incsearch " Incremental search
  53. "set autowrite " Automatically save before commands like :next and :make
  54. "set hidden " Hide buffers when they are abandoned
  55. set mouse=a " Enable mouse usage (all modes)
  56.  
  57. " Source a global configuration file if available
  58. if filereadable("/etc/vim/vimrc.local")
  59. source /etc/vim/vimrc.local
  60. endif
  61.  
  62. set nocompatible
  63. "filetype off
  64.  
  65. " set runtime path
  66. set rtp+=~/.vim/bundle/Vundle.vim
  67.  
  68. " vundle initialize
  69. call vundle#begin()
  70.  
  71. Plugin 'gmarik/Vundle.vim'
  72. "Plugin 'powerline/powerline'
  73. Plugin 'Lokaltog/vim-powerline'
  74.  
  75. Plugin 'altercation/vim-colors-solarized'
  76. Plugin 'tomasr/molokai'
  77.  
  78. Plugin 'ctrlpvim/ctrlp.vim'
  79. Plugin 'tacahiroy/ctrlp-funky'
  80. Plugin 'terryma/vim-multiple-cursors'
  81.  
  82. Plugin 'scrooloose/nerdcommenter'
  83.  
  84. Plugin 'scrooloose/nerdtree'
  85.  
  86. Plugin 'majutsushi/tagbar'
  87.  
  88. call vundle#end()
  89.  
  90. " 显示当前的行号列号
  91. set ruler
  92.  
  93. " 设置文内智能搜索提示
  94. " 高亮search命中的文本
  95. set hlsearch
  96. " 打开增量搜索模式,随着键入即时搜索
  97. set incsearch
  98. " 搜索时忽略大小写
  99. set ignorecase
  100. " 有一个或以上大写字母时仍大小写敏感
  101. set smartcase
  102.  
  103.  
  104. set cursorline
  105. set number
  106.  
  107. " 自动缩进
  108. set autoindent
  109. set cindent
  110.  
  111. " tab兼的宽度
  112. set tabstop=4
  113. set softtabstop=4
  114. set shiftwidth=4
  115.  
  116. " set vim-linestatus
  117. set laststatus=2
  118. let g:Powerline_symbols='unicode'
  119.  
  120. " set colorscheme
  121. set background=dark
  122. "set background=light
  123. let g:solarized_termcolors=256
  124. colorscheme solarized

猜你在找的Bash相关文章