CS *_*ent 7 plugins vim vimrc vim-plugins
我已经在我的 ubuntu 机器上安装了 vundle,但是当我加载 vim 时,没有任何插件加载。我的vimrc:
runtime! debian.vim
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
"set rtp+=~/.vim/bundle
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'reedes/vim-thematic'
Plugin 'bling/vim-airline'
" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - list configured plugins
" :PluginInstall(!) - install (update) plugins
" :PluginSearch(!) foo - search (or refresh cache first) for foo
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" """""""""""""""""""""""""""""""""""""ORIGINAL STUFF BELOW"""""""
" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by
" the call to :runtime you can find below. If you wish to change any of those
" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim
" will be overwritten everytime an upgrade of the vim packages is performed.
" It is recommended to make changes after sourcing debian.vim since it alters
" the value of the 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
" runtime! debian.vim
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
"if has("syntax")
syntax on
set number
set ruler
"endif
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
" filetype plugin indent on
"endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd " Show (partial) command in status line.
"set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching
"set smartcase " Do smart case matching
"set incsearch " Incremental search
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes)
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
Run Code Online (Sandbox Code Playgroud)
:PluginList 输出...
" My Plugins
Plugin 'gmarik/Vundle.vim'
Plugin 'reedes/vim-thematic'
Plugin 'bling/vim-airline'
Run Code Online (Sandbox Code Playgroud)
我没有更改任何其他设置,这是我第一次尝试使用 Vim 插件。
永远不要做任何事情 /etc/vim
因为 Vim 遵循严格的加载顺序,弄乱默认文件和目录会使 Vim 不稳定。你可能做的一些事情可能会奏效,其他的可能不会……这只是你和你的运气。
因为后续升级会覆盖您的部分或全部更改,使它们变得毫无意义。
因为这是习惯和良好做法每个操作系统-和,嗯......在现实生活中太-做你在配置你的 $HOME
。
你必须创造~/.vim/
和~/.vimrc
你自己。
因为它表现良好,所以 Vim在安装时不会在你的文件中做任何事情$HOME
。这是你的责任,以创建文件和必要的目录进行自定义:
$ cd
$ mkdir .vim
$ touch .vimrc
Run Code Online (Sandbox Code Playgroud)
此时,您应该有一个空~/.vim
目录和一个空~/.vimrc
文件。您似乎已经有一个~/.vim/
目录,因此您可以跳过该步骤。
恢复/etc/vim
到原始状态。
删除您添加到的任何内容/etc/vim
。如果不确定,卸载并重新安装 vim-gnome 或 vim-gtk 包应该会有所帮助。
在$HOME
.
如果你坚持使用 Vundle,你~/.vimrc
应该是这样的:
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'reedes/vim-thematic'
Plugin 'bling/vim-airline'
call vundle#end()
filetype plugin indent on
Run Code Online (Sandbox Code Playgroud)实际安装您的插件。
写入~/.vimrc
磁盘并退出 Vim:
:wq
Run Code Online (Sandbox Code Playgroud)
并发出以下命令:
$ vim +PluginInstall
Run Code Online (Sandbox Code Playgroud)作为一个新的 Vim 用户,你应该找到更有效的方式来消磨你的时间和脑细胞,而不是使用类似的无意义插件管理器来弄乱你试图安装的无意义插件,特别是如果你对 UNIX 命令没有很好的了解-线。以下是一份非详尽的建议清单:
$ vimtutor
至少关注几次,:help
并将它们牢记在心,因为它们是您将学习到的最有用的 Vim 命令,:help usr_01.txt
,至少,:help usr_08.txt
。在您对整个事情感到更舒服之前,我建议您远离插件(和不必要的插件管理器),以便您可以专注于 Vim 本身。
归档时间: |
|
查看次数: |
9434 次 |
最近记录: |