Vundle - Plugins installed but not loading

9,679
  1. Never do anything in /etc/vim

    • Because Vim follows a strict loading order and messing with the default files and directories will make Vim unstable. Some of the things you may do may work, others may not… it's only you and your luck.

    • Because subsequent upgrades will overwrite some or all of your changes, making them pointless.

    • Because it is customary and good practice on every operating system — and, well… in real life too — to do your configuration in your $HOME.

  2. You must create ~/.vim/ and ~/.vimrc yourself.

    Because it is well behaved, Vim doesn't do anything in your $HOME upon installation. It is your responsibility to create the files and directories necessary for customization:

    $ cd
    $ mkdir .vim
    $ touch .vimrc
    

    At that point, you should have an empty ~/.vim directory and an empty ~/.vimrc file. You seem to already have a ~/.vim/ directory so you can skip that step.

  3. Revert /etc/vim to its pristine state.

    Remove anything you added to /etc/vim. If unsure, uninstalling and re-installing the vim-gnome or vim-gtk package should help.

  4. Redo all your configuration in $HOME.

    If you insist on using Vundle, this is what your ~/.vimrc should look like:

    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
    
  5. Actually install your plugins.

    Write your ~/.vimrc to disk and quit Vim with:

    :wq
    

    and issue the following command:

    $ vim +PluginInstall
    

As a new Vim users you should find more productive ways to spend your time and brain cells than messing with the pointless plugins you are trying to install using a similarly pointless plugin manager, especially if you don't have a good knowledge of the UNIX command-line. Here is a non-exhaustive list of suggestions:

  • get more familiar with the command-line and the UNIX way in general,
  • follow $ vimtutor at least a couple of times,
  • read the first 30 or so lines of :help and commit them to memory as they are the most useful Vim commands you'll ever learn,
  • read :help usr_01.txt through, at least, :help usr_08.txt.

Until you are more comfortable with the whole thing I'd advise you to stay away from plugins (and unnecessary plugin managers) so that you can concentrate on Vim itself.

Share:
9,679

Related videos on Youtube

CS Student
Author by

CS Student

Updated on September 18, 2022

Comments

  • CS Student
    CS Student over 1 year

    I've installed vundle on my ubuntu box but when I load vim none of the plugins load. My 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
    

    :PluginList outputs...

    " My Plugins                        
    Plugin 'gmarik/Vundle.vim'                                           
    Plugin 'reedes/vim-thematic'                                          
    Plugin 'bling/vim-airline' 
    

    I haven't changed any other settings, this is my first attempt at using Vim plugins.

    • Admin
      Admin almost 10 years
      You are supposed to do your configuration in the ~/.vimrc file and the ~/.vim/ directory.
    • Admin
      Admin almost 10 years
      @romainl I'm not too sure what you mean. I've edited my vimrc in /etc/vim but I'm not sure what you mean.
    • Admin
      Admin almost 10 years
      I mean "don't do anything in /etc/vim". It doesn't work, it's unreliable and it will be overwritten during the next update.
    • Admin
      Admin almost 10 years
      @romainl I see. When I cd to ~/.vim/ all I have is a directory named bundle. I'm not sure where the vimrc is I need to edit.
    • Admin
      Admin almost 10 years
      It's ~/.vimrc.
    • Admin
      Admin almost 10 years
      @romainl I don't have a dir called vimrc, cd fails to find one named that. :(
    • Admin
      Admin almost 10 years
      As I said, it's a file, not a directory. If it doesn't exist, create it.
    • Admin
      Admin almost 10 years
      @romainl the only vimrc I can find is in /etc/vim
    • Admin
      Admin almost 10 years
      Create that file.
    • Admin
      Admin almost 10 years
      @romainl I have copied vimrc from /etc/vim to ~/. but still Vim isn't loading any plugins.
    • Admin
      Admin almost 10 years
      @romainl vim still isn't showing my plugins even with the .vimrc file in my home directory. I've tried reinstalling but that didn't work, also vim is loading my plugins but not showing them (vim-airline).