I'm trying to create my first own .vimrc
file. I'm having some trouble when trying to load plugins with Vundle. For example, I want to use vim-airline
, so I have (in the correct place I believe) in my .vimrc
file this:
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
I installed them using :PluginInstall
succesfully. However, when I try to set the theme for the airline plugin, using in my .vimrc
:
AirlineTheme luna
It doesn't work; vim says on startup E492: Not an editor command: AirlineTheme luna
. When I continue and manually do :AirlineTheme luna
while vim is running, it works. So for some reason, I can't use any commands provided by the plugins in the .vimrc
file. What do I do wrong, or how do I circumvent this issue?
For reference, here is a stripped version of my .vimrc
:
" ====== Load Plugins ======
set nocompatible " be iMproved, required
filetype off " required
" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Vundle manages itself
Plugin 'VundleVim/Vundle.vim'
" Add other plugins to Vundle
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
call vundle#end()
filetype plugin indent on
" ======= Allow for project specific .vimrc files =======
set exrc
set secure
" ====== Configure Plugins ======
" Airline Theme
set laststatus=2
AirlineTheme luna
Note that it is the very last line that does not work.