Vundle for VIM is not working on Ubuntu
Asked Answered
M

7

17

I installed Vundle via the instructions given at this blog http://web.archive.org/web/20120731003342/http://www.charlietanksley.net/philtex/sane-vim-plugin-management

but when trying to run :BundleInstall I get a VIM error

E492: Not an editor command: BundleInstall

Here is my tree ~/.vim

/home/max/.vim
└── bundle
    └── vundle
        ├── autoload
        │   ├── vundle
        │   │   ├── config.vim
        │   │   ├── installer.vim
        │   │   └── scripts.vim
        │   └── vundle.vim
        ├── doc
        │   └── vundle.txt
        ├── LICENSE-MIT.txt
        ├── README.md
        └── test
            ├── files
            │   └── test.erl
            ├── minirc.vim
            └── vimrc

Also when starting up VIM I get a slew of E492s like so

Error detected while processing /home/max/.vimrc:
line    6:
E117: Unknown function: vundle#rc
line   10:
E492: Not an editor command: Bundle 'gmarik/vundle'
line   15:
E492: Not an editor command: Bundle 'tpope/vim-fugitive'
line   16:
E492: Not an editor command: Bundle 'Lokaltog/vim-easymotion'
line   17:
E492: Not an editor command: Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
line   19:
E492: Not an editor command: Bundle 'surround.vim'
line   20:
E492: Not an editor command: Bundle 'snipMate'
line   21:
E492: Not an editor command: Bundle 'tComment'
line   22:
E492: Not an editor command: Bundle 'mru.vim'
line   23:
E492: Not an editor command: Bundle 'The NERD tree'
line   24:
E492: Not an editor command: Bundle 'matchit.zip'
line   25:
E492: Not an editor command: Bundle 'Vimball'
line   26:
E492: Not an editor command: Bundle 'ScrollColors'
line   27:
E492: Not an editor command: Bundle 'L9'
line   28:
E492: Not an editor command: Bundle 'FuzzyFinder'
line   30:
E492: Not an editor command: Bundle 'git://git.wincent.com/command-t.git'

And here is my .vimrc

set nocompatible

filetype off  " required!

set rtp+=~/.vim/vundle.git/ 
call vundle#rc()

" let Vundle manage Vundle
" required! 
Bundle 'gmarik/vundle'

" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" vim-scripts repos
Bundle 'surround.vim'
Bundle 'snipMate'
Bundle 'tComment'
Bundle 'mru.vim'
Bundle 'The NERD tree'
Bundle 'matchit.zip'
Bundle 'Vimball'
Bundle 'ScrollColors'
Bundle 'L9'
Bundle 'FuzzyFinder'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'


" Shortcuts


noremap <C-Up> <C-W>+
noremap <C-Down> <C-W>-
noremap <C-Left> <C-W>>
noremap <C-Right> <C-W><

nnoremap ,v <C-w>v
nnoremap ,h <C-w>s
nnoremap ,, <C-w>w

map <F11> <Esc>:call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<CR> 
nmap gf <S-g>
nmap f :FufFile <CR>
vmap c gc 
nmap c gcc
nmap tt :tabnew <CR>
nmap tc :tabclose <CR>
nmap ml :MRU <CR>
nmap s :w <CR>
nmap q :q! <CR>
syntax on
set mouse=a "enables mouse

" Selecting different color schemes
map <silent> ,3 :NEXTCOLOR<cr>
map <silent> ,2 :PREVCOLOR<cr>
map <silent> ,1 :SCROLL<cr>

" Directory Set up

set backup "backs up files
set backupdir=$HOME/.vimbackup
set directory=$HOME/.vimswap
set viewdir=$HOME/.vimviews
"
" silent execute '!mkdir -p $HOME/.vimbackup'
" silent execute '!mkdir -p $HOME/.vimswap'
" silent execute '!mkdir -p $HOME/.vimviews'

" au BufWinLeave * silent! mkview "makes vim save view state
" au BufWinEnter * silent! loadview "makes vim load view state

" Appearance

set columns=60

set guifont=Monaco:h11

map <F11> <Esc>:call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<CR>
map <silent> ,m :e ftp://mitemiu.com/public_html/wp-content/themes/Mitemiu/<CR>
" map <silent> ,c :e ftp://www.caeious.com/public_html/wp-content/themes/caeious/<CR>
map <silent> ,c :e ftp://www.caeious.com/public_html/<CR>


color jellybeans
set tabpagemax=10 "show only 10 tabs
set background=dark

set number

set scrolloff=3 "minimum lines to keep above/below cursor
set foldenable "auto fold code

" Behaviour
" set nowrap "wrap long lines
set linebreak
:filetype plugin indent on  " lets filetype plugins be used

" if bufwinnr(1)
"   map <kPlus><C-W>+
"   map <kMinus><C-W>-  
"   map <kDivide><c-w><
"   map <kMultiply><c-w>>
" endif

set autoindent
set smartindent                                
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
set spell

set showmatch "shows matching parens, brackets

set winminheight=0

set go-=T "eliminates tool bar in gVim
set go-=m "eliminates menu bar in gVim
set go-=r "eliminates right scroll bar
set lines=50 "50 lines of text instead of 24

set backspace=2 "makes backspace work like normally it does
:fixdel

set vb t_vb= "prevents vim from beeping when command is bad. instead it flashes screen.            

set ruler "shows statusline, displays curor position

set incsearch "vim searches text as you enter it
" set hlsearch "hilights searched items
set ignorecase "case insensitive search
set smartcase "case sensetive when using captials
set wildmenu "shows list instead of completing
set wildmode=list:longest,full "command <TAB> completeiton, lists matches,
set virtualedit=all "lets cursor freely roam anywhere like in command mode

Obviously Vundle has not been installed properly. How do I make Vundle work?

Moureaux answered 29/8, 2012 at 13:57 Comment(0)
H
34

Vundle is installed in

~/.vim/bundle/vundle

so this line

set rtp+=~/.vim/vundle.git/

should be

set rtp+=~/.vim/bundle/vundle

~/.vim/vundle.git/

is the path of a folder containing everything that makes a Git repository a Git repository. You can't really expect Vim to find usable scripts there.

Harrietteharrigan answered 29/8, 2012 at 14:48 Comment(3)
Well, you actually didn't follow the instructions as the correct line is given at step two. Why did you change it?Harrietteharrigan
actually I was wrong. I was first following another tutorial charlietanksley.net/philtex/sane-vim-plugin-management and had assumed it was an exact copy of gmarik's. I will correct it in my post.Moureaux
Also, this .vimrc worked well for me: github.com/wavded/vim-stylus/issues/26#issuecomment-13114948Ogren
S
8

I had this problem using git commit or crontab -e

These commands seemed to invoke vi instead of vim

setting this in my .bashrc fixed this

export EDITOR=vim
Sankhya answered 2/12, 2013 at 10:35 Comment(1)
Thanks, i met this problem too, and fixed by git config --global core.editor vimRedwine
T
2

I just met the problem and I resolved it after reading

https://github.com/gmarik/vundle/issues/168

It says.

This might happen if you call the vi editor explicitly (to avoid any aliases) by /usr/bin/vi instead of vim. A plain "git commit" would do this for me before I configured it to use vim instead. (git config --global core.editor "vim")

Tamar answered 25/8, 2013 at 6:5 Comment(1)
Exactly my issue. Did not get errors when calling vim directly but only when calling git commit. Thanks!Mclaren
L
2

I encountered the same problem. After tried all the methods mentioned recommended by others and failed. Finally, I found that on our Ubuntu 14.04.1 service, VIM is not installed as default!

It is hard to realize this problem, since VIM users like me just used to type "vi" instead of "vim", and it shows a "VIM - improved VI" welcome page.

So make sure you have installed VIM:

whereis vim

Or just type:

vim

If it is not installed, do as it recommends:

sudo apt-get install vim
Lavellelaven answered 20/8, 2016 at 0:23 Comment(0)
S
1

vi ~/.gitconfig

and

[core]

 autocrlf = false

set

[core]

 autocrlf = true

then $rm -rf ~/.vim/bundle/vundle

and $git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

Sedative answered 21/3, 2014 at 16:6 Comment(1)
My problem didn't involve the ~/.gitconfig, but removing the bundle and reinstalling it again made the problem go away, cheers.Ladybird
M
1

as @romainl said my vundle installed in .vim/bundle/Vundle.vim/, so you need to change line : set rtp+=~/.vim/vundle.git/

to set rtp+=~/.vim/bundle/Vundle.vim/

yeah thank you ~

Muriah answered 18/5, 2016 at 7:5 Comment(0)
O
0

The .vimrc here worked for me: https://github.com/wavded/vim-stylus/issues/26#issuecomment-13114948

Ogren answered 5/2, 2013 at 18:44 Comment(1)
I'd send the original link (it was posted on a blog) but I can't for the life of me find it : (Ogren

© 2022 - 2024 — McMap. All rights reserved.