
Instalei o vundle na minha caixa do Ubuntu, mas quando carrego o vim, nenhum dos plug-ins é carregado. Meu 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
:Saídas de PluginList...
" My Plugins
Plugin 'gmarik/Vundle.vim'
Plugin 'reedes/vim-thematic'
Plugin 'bling/vim-airline'
Não alterei nenhuma outra configuração, esta é minha primeira tentativa de usar plug-ins do Vim.
Responder1
Nunca faça nada em
/etc/vim
Como o Vim segue uma ordem de carregamento estrita e mexer nos arquivos e diretórios padrão tornará o Vim instável. Algumas das coisas que você pode fazer podem funcionar, outras não... é só você e sua sorte.
Porque as atualizações subsequentes substituirão algumas ou todas as suas alterações, tornando-as inúteis.
Porque é costumeeboas práticas emtodosistema operacional - e, bem... na vida real também - para fazerseuconfiguração emseu
$HOME
.
Você deve criar
~/.vim/
e~/.vimrc
você mesmo.Por ser bem comportado, o Vim não fazqualquer coisaem sua
$HOME
instalação. Isso éseuresponsabilidade de criar os arquivos e diretórios necessários para customização:$ cd $ mkdir .vim $ touch .vimrc
Nesse ponto, você deve ter um
~/.vim
diretório vazio e um~/.vimrc
arquivo vazio. Parece que você já tem um~/.vim/
diretório, então pode pular essa etapa.Reverta
/etc/vim
ao seu estado original.Remova tudo o que você adicionou ao arquivo
/etc/vim
. Se não tiver certeza, desinstalar e reinstalar o pacote vim-gnome ou vim-gtk deve ajudar.Refaça toda a sua configuração em
$HOME
.Se você insiste em usar o Vundle, você
~/.vimrc
deve ficar assim: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
Na verdade, instale seus plug-ins.
Escreva
~/.vimrc
no disco e saia do Vim com::wq
e emita o seguinte comando:
$ vim +PluginInstall
Como um novo usuário do Vim, você deve encontrar maneiras mais produtivas de gastar seu tempo e células cerebrais do que mexer com plug-ins inúteis que está tentando instalar usando um gerenciador de plug-ins igualmente inútil, especialmente se você não tiver um bom conhecimento do comando UNIX -linha. Aqui está uma lista não exaustiva de sugestões:
- familiarize-se mais com a linha de comando e o modo UNIX em geral,
- siga
$ vimtutor
pelo menos algumas vezes, - leia as primeiras 30 linhas
:help
e guarde-as na memória, pois são os comandos Vim mais úteis que você aprenderá, - leia
:help usr_01.txt
, pelo menos:help usr_08.txt
,.
Até que você se sinta mais confortável com tudo isso, aconselho você a ficar longe de plug-ins (e gerenciadores de plug-ins desnecessários) para poder se concentrar no próprio Vim.