E492: Not an editor command: TlistToggle - vim

I am using Vim with cscope, ctags and TagList.
When I open a file with just using vim. I am able to use TagList but when I open a file using cscope, there comes error as:
Error detected while processing /gauravg/.vimrc:
line 9:
E492: Not an editor command: Bundle 'VundleVim/Vundle.vim'
line 13:
E492: Not an editor command: Plugin 'plugin/taglist.vim'
Press ENTER or type command to continue
Below is my .vimrc file:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
" required!
Bundle 'VundleVim/Vundle.vim'
call vundle#end()
"Plugin 'tpope/vim-fugitive'
"Plugin 'steffanc/cscopemaps.vim'
Plugin 'plugin/taglist.vim'
Please help me to resolve this issue.

You should use Plugin instead of Bundle for:
Bundle 'VundleVim/Vundle.vim'
Also, all of your plugins must be added before:
call vundle#end()
See the Quick Start of Vundle for more information.
This .vimrc should work:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
" required!
Plugin 'VundleVim/Vundle.vim'
"Plugin 'tpope/vim-fugitive'
"Plugin 'steffanc/cscopemaps.vim'
Plugin 'plugin/taglist.vim'
" All of your Plugins must be added before the following line
call vundle#end()
filetype plugin indent on

Related

Unable to install powerline in Vim

I have this in my config file:
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'helino/vim-nasm'
Plugin 'elixir-lang/vim-elixir'
Plugin 'powerline/powerline'
call vundle#end()
And then I did this:
:source %
:PluginInstall
But the plugin powerline is still not installed, it's not visible.
https://github.com/powerline/powerline
Powerline only display when plugin like NERDtree is active. If you want to display it every time add this line to your .vimrc file.
set laststatus=2

Vundle does not install vim plugins

I was trying to install vim plugins but it always doesn't work. Here is my .vimrc:
set nocompatible
filetype off
" set up Vundle
" let Vundle manage Vundle
" required!
set rtp+=~/.vim/bundle/Vundle.vim
"plugins list
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
Plugin 'klen/python-mode'
Plugin 'scrooloose/nerdtree'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'jalvesaq/R-Vim-runtime'
call vundle#end()
filetype plugin indent on
syntax enable
syntax on
And when I ran :PluginInstall, only VundleVim/Vundle.vim was installed (see below). I have tried many ways that I can find online but still can't fix it. Any suggestions?
I had the same issue, vim into ~/.vimrc and run :source % and then :PluginInstall worked for me.
I'm on mac os Big Sur, vundle will only instal itself if I type :PluginInstall after edit and saved .vimrc.
:source % or :so % worked for me!

Vim start-up errors

I have a .vimrc file on my desktop, which I put on github. Checked it out to my laptop and I get these errors. Vim 7.4.52, lubuntu
Error detected while processing /home/jcg/.vimrc:
line 5:
E117: Unknown function: vundle#begin
line 8:
E492: Not an editor command: Plugin 'gmarik/Vundle.vim'
line 13:
E492: Not an editor command: Plugin 'bling/vim-airline'
line 16:
E492: Not an editor command: Plugin 'tpope/vim-fugitive'
line 19:
E492: Not an editor command: Plugin 'klen/python-mode'
line 21:
E117: Unknown function: vundle#end
The .vimrc file:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle -- required!
Plugin 'gmarik/Vundle.vim'
" The bundles you install will be listed here
" vim-airline status line from github
Plugin 'bling/vim-airline'
" git from within vim
Plugin 'tpope/vim-fugitive'
" python mode
Plugin 'klen/python-mode'
call vundle#end()
filetype plugin indent on
You need to install Vundle on your laptop. Here are their installation instructions; the part you're missing appears to be
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
The set rtp command is adding ~/.vim/bundle/Vundle.vim to Vim's path, which lets vundle#begin() be found on the next line.
I wanted to come back to my question to perhaps help someone who lands here.
I thought the answer from #Kristjan solved my problem, but it didn't. Then I found this git repository: https://github.com/VundleVim/Vundle.vim
and in step 4 of the README:
Install Plugins:
Launch vim and run :PluginInstall
To install from command line: vim +PluginInstall +qall
This actually was the missing step. When you copy .vim directory and .vimrc you need to install, and I failed to do this

Add plugin from vim.org/scripts/script.php to Vundle in vimrc

I am trying to add the BOOKMARKS plugin from http://www.vim.org/scripts/script.php?script_id=3394 to Vundle in vimrc.
This is from my vimrc:
call vundle#begin()
" let Vundle manage Vundle
Plugin 'gmarik/Vundle.vim'
" supports vim-shell
Plugin 'xolox/vim-misc'
" <F6> mappings to open paths, URLs
Plugin 'xolox/vim-shell'
" mappings to navigate buffers and args
Plugin 'tpope/vim-unimpaired'
" FileBeagle
Plugin 'jeetsukumaran/vim-filebeagle'
" ctrl-P
Plugin 'ctrlpvim/ctrlp.vim'
" BOOKMARKS: Mark & Highlight Full Lines
Plugin 'BOOKMARKS'
call vundle#end() " All of your Plugins must be added before this line
Screen shot of :PluginList:
ctrl-P works, but BOOKMARKS does not.
from https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233
" The following are examples of different formats supported.
...
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
Try this instead (found on http://vimawesome.com) :
Plugin 'Mark-and-Highlight-Full-Lines'
EDIT:
FDinoff is right (as usual) : the plugin moved, so the right line to add is the following:
Plugin 'BOOKMARKS--Mark-and-Highlight-Full-Lines'
Apparently Vundle does not support URI http://www.vim.org/scripts/script.php
So I copied the markHL.vim file to ~/.vim/plugin/ and that worked.

Modular vimrc: how to source vundle Plugins from diffrent files

I want to break down my vimrc in diffrent components. I manage my vim Plugins with Vundle and I want to have one file per plugin that tells vundle to manage it and to set configuration like this:
vundle.vim:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"Plugin in here:
Plugin 'gmarik/Vundle.vim'
call vundle#end()
filetype plugin indent on
"Plugin Options:
and
syntastic.vim:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"Plugin in here:
Plugin 'scrooloose/syntastic'
call vundle#end()
filetype plugin indent on
"Plugin Options:
" - Python:
let g:syntastic_python_checkers = ['pylint', 'flake8']
let g:syntastic_aggregate_errors = 1
and so on.
If I now call this vimrc:
source vundle.vim
source syntastic.vim
only the last Plugin shows up in vundles Plugin list, other configurations are read though.
I guess, vundle calls the 'vundle#begin()'/'vundle#end()' part only upon call (:PluginXXX) and therefore only returns the content of the file last sourced.
How can I solve this problem?
Can I use something like
PLUGINS = "Plugin gmarik/vundle"
PLUGINS = $PLUGINS + "Plugin scrooloose/syntastic"
...
and call
vundle#begin()
$PLUGINS
vundle#end()
in my vimrc?
If so, what is the syntax for vim variables?
~/.vimrc:
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
runtime! config/*.vim
call vundle#end()
filetype plugin indent on
...
~/.vim/config/syntastic.vim
Plugin 'scrooloose/syntastic'
let g:syntastic_python_checkers = ['pylint', 'flake8']
let g:syntastic_aggregate_errors = 1
...
And so on. But that's IMO a lot of work for zero benefit.
I ended up with this:
set nocompatible
filetype off
set rtp+=~/.nvim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'rking/ag.vim'
...
call vundle#end()
filetype plugin indent on
runtime! vundle/*.vim
Which means I get the performance of vundle#begin() and vundle#end() combined with the modularity of having settings for each plugin in their own file. This setup gave the unexpected advantage of having less plugin files to manage, i.e., the Plugin one-liners. Now the only plugin, .vim, files I have are the ones with additional configuration.
The disadvantage of this setup is I have to remove the plugin from two places.
The advantages are: increased performance; you still have fairly modular plugin settings, making them easier to add and remove.

Resources