VundleVim / Vundle.vim

Vundle, the plug-in manager for Vim
http://github.com/VundleVim/Vundle.Vim
MIT License
23.92k stars 2.58k forks source link

e492: Not an editor command #486

Closed Yneth closed 10 years ago

Yneth commented 10 years ago

I get this error(e492: Not an editor command) when I call :PluginInstall. Here is .vimrc file:

set nocompatible              " be iMproved, required
filetype off                  " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() 

" let Vundle manage Vundle, required 
Plugin 'gmarik/Vundle.vim' 

" Plugins 
Plugin 'tpope/vim-fugitive' 

" Color schemes 

" All of your Plugins must be added before the following line 
call vundle#end()            " required 
filetype plugin indent on    " required 

" Tabulation settings 
set tabstop=4 
set softtabstop=4 
set shiftwidth=4 
set noexpandtab

and here is my tree

/home/user/.vim/
...
├── bundle
│   └── Vundle.vim
│       ├── autoload
│       │   ├── vundle
│       │   │   ├── config.vim
│       │   │   ├── installer.vim
│       │   │   └── scripts.vim
│       │   └── vundle.vim
│       ├── changelog.md
│       ├── CONTRIBUTING.md
│       ├── doc
│       │   └── vundle.txt
│       ├── LICENSE-MIT.txt
│       ├── README.md
│       └── test
│           ├── files
│           │   └── test.erl
│           ├── minirc.vim
│           └── vimrc
...
lucc commented 10 years ago

your vimrc works for me. maybe there is a problem with your clone of vundle (there is no .git folder in your listing but maybe you just did not paste it to the browser)

try to update vundle from the commandline or make a new clone:

cd ~/.vim/bundle/Vundle.vim
git pull

or

cd ~/.vim/bundle
rm -rf Vundle.vim
git clone https://github.com/gmarik/Vundle.vim
Yneth commented 10 years ago

I have a git folder there but it is hidden.

Anyway

cd ~/.vim/bundle/Vundle.vim
git pull

replies --> Already up-to-date.

Yneth commented 10 years ago

Here is the full tree:(.git folder is hidden !!!!)

/home/rasdel/.vim/
├── autoload
│   ├── mmtemplates
│   │   └── core.vim
│   └── mmtoolbox
│       ├── cmake.vim
│       ├── doxygen.vim
│       ├── helloworld.vim
│       ├── make.vim
│       └── tools.vim
├── bundle
│   └── Vundle.vim
│       ├── autoload
│       │   ├── vundle
│       │   │   ├── config.vim
│       │   │   ├── installer.vim
│       │   │   └── scripts.vim
│       │   └── vundle.vim
│       ├── changelog.md
│       ├── CONTRIBUTING.md
│       ├── doc
│       │   └── vundle.txt
│       ├── LICENSE-MIT.txt
│       ├── README.md
│       └── test
│           ├── files
│           │   └── test.erl
│           ├── minirc.vim
│           └── vimrc
├── c-support
│   ├── codesnippets
│   │   ├── calloc_double_matrix.c
│   │   ├── calloc_int_matrix.c
│   │   ├── main.c
│   │   ├── main.cc
│   │   ├── Makefile
│   │   ├── Makefile.multi-target.template
│   │   ├── Makefile.pro
│   │   ├── print_array.cc.noindent
│   │   ├── print_double_array.c.noindent
│   │   └── print_int_array.c.noindent
│   ├── doc
│   │   ├── ChangeLog
│   │   ├── c-hotkeys.pdf
│   │   └── c-hotkeys.tex
│   ├── rc
│   │   ├── customization.cpp.vim
│   │   ├── customization.ctags
│   │   ├── customization.gvimrc
│   │   ├── customization.indent.pro
│   │   ├── customization.vimrc
│   │   ├── project
│   │   │   └── in.vim
│   │   └── sample_template_file
│   ├── README.csupport
│   ├── scripts
│   │   └── wrapper.sh
│   ├── templates
│   │   ├── c.comments.template
│   │   ├── c.cpp.template
│   │   ├── c.idioms.template
│   │   ├── cpp.comments.template
│   │   ├── cpp.cpp.template
│   │   ├── cpp.idioms.template
│   │   ├── cpp.preprocessor.template
│   │   ├── cpp.statements.template
│   │   ├── c.preprocessor.template
│   │   ├── c.statements.template
│   │   ├── doxygen.template
│   │   ├── help.template
│   │   ├── snippets.template
│   │   └── Templates
│   └── wordlists
│       ├── c-c++-keywords.list
│       ├── k+r.list
│       └── stl_index.list
├── doc
│   ├── csupport.txt
│   ├── templatesupport.txt
│   ├── toolboxcmake.txt
│   ├── toolboxdoxygen.txt
│   ├── toolboxmake.txt
│   └── toolbox.txt
├── ftplugin
│   ├── c.vim
│   └── make.vim
├── plugin
│   └── c.vim
└── syntax
    └── template.vim
lucc commented 10 years ago

Very strange. Some wild guesses:

Yneth commented 10 years ago
  1. Posted a full .vimrc file. Actually, I am new to vim and I do not understand what means minimal version.
  2. I am using vim version 7.4.52 on 14.04 xubuntu.
Yneth commented 10 years ago

Figured it out. I had 2 .vimrc files( found this out through :version) here is the problem I had:

system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"

Anyway, thanks for response!

KelvinMutuma commented 10 years ago

@Yneth I have the same problem and running

:version 

returns

   system vimrc file: "$VIM/vimrc"
   user vimrc file: "$HOME/.vimrc"
   2nd user vimrc file: "~/.vim/vimrc"
   user exrc file: "$HOME/.exrc"
   fall-back for $VIM: "/usr/share/vim"

I'm not sure if I'm supposed to delete one of the vimrc files

Premitium commented 9 years ago

@Yneth I have the same issue here. However I cannot find the files in windows explorer and they show in vim under :version

How did you resolve it?

gordonmslai commented 9 years ago

@Yneth same here as well. Would you mind letting us know what you did to resolve the issue?

Shougo commented 9 years ago

@gordonmslai @Premitium I think you should expand ~ character. In windows, it is not expanded automatically.

set rtp+=$HOME/.vim/bundleVundle.vim
Yneth commented 9 years ago

I have deleted 2nd user vimrc file.

googlx commented 8 years ago

@Yneth Thks for your guide, but how to delete the 2nd vimrc file?:P

migsan commented 8 years ago

Hi, I'm having the same issue, however I dont have the 2nd vimrc file. When doing :version mine looks like this:

system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" fall-back for $VIM: "/usr/share/vim"

How do I fix this issue? thanks in advance.

migsan commented 8 years ago

Thanks a lot @nfischer I found the issue, it was the global config of the eol on my machine. Just changed it to input (I'm on OSX) using: git config --global core.autocrlf input, deleted the vundle folder, re cloned repo and created a new .vimrc file and working like a charm now.

ryanoasis commented 7 years ago

Added here: https://github.com/VundleVim/Vundle.vim/wiki/Common-Issues

Feel free to tweak and/or add more details

abelncm commented 7 years ago

Hi, put your .vimrc file in your home(~) folder instead of .vim folder

clayms commented 6 years ago

Same problem, but I am not sure if it will work with my version of vim:

:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 30 2014 10:56:55)
Included patches: 1-160
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>
Small version without GUI.  Features included (+) or not (-):
+acl             -cscope          -folding         -menu            -path_extra      -statusline      -visualextra
-arabic          -cursorbind      -footer          -mksession       -perl            -sun_workshop    -viminfo
-autocmd         -cursorshape     +fork()          -modify_fname    -persistent_undo -syntax          -vreplace
-balloon_eval    -dialog          -gettext         -mouse           -printer         -tag_binary      +wildignore
-browse          -diff            -hangul_input    -mouse_dec       -profile         -tag_old_static  -wildmenu
+builtin_terms   -digraphs        +iconv           -mouse_gpm       -python          -tag_any_white   +windows
-byte_offset     -dnd             -insert_expand   -mouse_jsbterm   -python3         -tcl             +writebackup
-cindent         -ebcdic          +jumplist        -mouse_netterm   -quickfix        +terminfo        -X11
-clientserver    -emacs_tags      -keymap          -mouse_sgr       -reltime         -termresponse    -xfontset
-clipboard       -eval            -langmap         -mouse_sysmouse  -rightleft       -textobjects     -xim
-cmdline_compl   -ex_extra        -libcall         -mouse_urxvt     -ruby            -title           -xsmp
+cmdline_hist    -extra_search    -linebreak       -mouse_xterm     -scrollbind      -toolbar         -xterm_clipboard
-cmdline_info    -farsi           -lispindent      +multi_byte      -signs           -user_commands   -xterm_save
-comments        -file_in_path    -listcmds        -multi_lang      -smartindent     -vertsplit       -xpm
-conceal         -find_in_path    -localmap        -mzscheme        -sniff           -virtualedit
-cryptv          -float           -lua             -netbeans_intg   -startuptime     +visual
   system vimrc file: "/etc/virc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches   -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -Wl,-z,relro  -L/usr/local/lib -Wl,--as-needed -o vim        -lm  -lselinux -lncurses -lacl -lattr -ldl

Can it work with this version of vim?

ryanoasis commented 6 years ago

@clayms It should work yeah. What issue are you seeing? The same error?

Have you looked at: https://github.com/VundleVim/Vundle.vim/wiki/Common-Issues ?

Michal-Mikolas commented 6 years ago

I've tried to :set fileformat=unix :w inside of Vim but it says Unknown option: :w.

How can I fix "Not an editor command" issue? Please help.

jnesis commented 6 years ago

I had this issue in cygwin. Resolved the issue by opening all the .vim files under ~/.vim/bundle/Vundle.vim/autoload and ~/.vim/bundle/Vundle.vim/autoload/vundle folders and removed carriage returns.

lozybean commented 6 years ago

I had this issue in centos, just because I have vi and vim, set alias vi='vim' and fix it.

xuxintao commented 5 years ago

@migsan thanks this works for me.

ShoufaChen commented 5 years ago

thanks to @wsdjeg

rm .vimrc

rm -rf .vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

copy this to your .vimrc

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
call vundle#end()
filetype plugin indent on
A-Sam commented 5 years ago

Faced this today and found out that it's caused by default non-correct vim version used by applications.

sudo update-alternatives --config editor Then choose the vim version that has the vundle installed! I had /usr/bin/vim.tiny is used which was the wrong vim.

ryanoasis commented 4 years ago

It'd be nice to capture some of these solutions in the wiki

inalto commented 4 years ago

Hello, I am trying to make it work globally for a centos 7 server.

I created a /etc/vim/bundle directory and cloned inside Vundle.vim

git clone https://github.com/VundleVim/Vundle.vim.git /etc/vim/bundle/Vundle.vim

then created the /etc/virc

set nocompatible
filetype off
set rtp+=/etc/vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
call vundle#end()
filetype plugin indent on

i get this error

Error detected while processing /etc/virc:
line    5:
E492: Not an editor command: Plugin 'VundleVim/Vundle.vim'
Press ENTER or type command to continue

seems that

set rtp+=/etc/vim/bundle/Vundle.vim

is not loading vundle, double checked the permissions of the runtime

Any suggestion? Thank you!

alnzng commented 4 years ago

When I run git commit command, I faced the similar issue E492: Not an editor command: Plugin 'VundleVim/Vundle.vim'.

Fixed it by specifying vim as the editor for git explicitly: git config --global core.editor vim

mefengl commented 3 years ago

Figured it out. I had 2 .vimrc files( found this out through :version) here is the problem I had:

system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"

Anyway, thanks for response!

also solves my problem. Here is centos 7.8. When I locate the '.vimrc'file, I found it in the '.pyenv' dictionary.

hemant-rao commented 3 years ago

if it's show in after type wrong command in CMP panel, then just press esc and then type again your command, that you want to run.

geekdenz commented 2 years ago

For me it was DOS file line endings.

TheGreatSimo commented 1 year ago

I had the same issue but it turns out that double .vimrc is not the real cause, at least in my case I made a mistake by copying the URL without properly directing it to the correct directory, as I did not fully read the documentation. do git clone URL ~/.vim/bundle/Vundle.vim instead of git clone URL

future-mike commented 1 year ago

So just updating vundle.vim can solve this problem?