I have the following vimrc file :
syntax on
set nocompatible " be iMproved, required
filetype off " required
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
if &compatible
set nocompatible " Be iMproved
endif
set runtimepath+=/home/mohsen/.vim/bundle/neobundle.vim/
call neobundle#begin(expand('/home/mohsen/.vim/bundle'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'rdnetto/YCM-Generator'
NeoBundle 'Shougo/neosnippet.vim'
NeoBundle 'Shougo/neosnippet-snippets'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'ctrlpvim/ctrlp.vim'
NeoBundle 'flazz/vim-colorschemes'
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
call neobundle#end()
filetype plugin indent on
NeoBundleCheck
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Bundle 'YouCompleteMe'
Plugin 'tpope/vim-fugitive'
Plugin 'command-t'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
call vundle#end() " required
filetype plugin indent on " required
Plugin 'tmhedberg/SimpylFold'
filetype plugin on
set splitbelow
set splitright
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
set foldmethod=indent
set foldlevel=99
nnoremap <space> za
let g:SimpylFold_docstring_preview=1
au BufNewFile,BufRead *.py
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
au BufNewFile,BufRead *.js, *.html, *.css
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2
Plugin 'vim-scripts/indentpython.vim'
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h "match BadWhitespace /\s\+$/
set encoding=utf-8
let g:ycm_autoclose_preview_window_after_completion=1
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
execute pathogen#infect()
Plugin 'vim-syntastic/syntastic'
Plugin 'nvie/vim-flake8'
let python_highlight_all=1
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_python_checkers = ['pylint']
let g:syntastic_php_checkers = ['php', 'phpcs', 'phpmd']
let g:syntastic_tex_checkers = ['lacheck', 'text/language_check']
let g:syntastic_aggregate_errors = 1
let g:syntastic_enable_perl_checker = 1
Plug 'rdnetto/YCM-Generator' , { 'branch': 'stable'}
And my bundle dir is :
ls -l .vim/bundle/
total 68
drwxr-xr-x 6 mohsen mohsen 4096 Sep 19 15:12 command-t
drwxr-xr-x 6 mohsen mohsen 4096 Sep 23 21:23 ctrlp.vim
drwxr-xr-x 4 mohsen mohsen 4096 Sep 19 17:16 indentpython.vim
-rw-r--r-- 1 mohsen mohsen 552 Sep 23 21:23 NeoBundle.lock
drwxr-xr-x 8 mohsen mohsen 4096 Sep 23 21:18 neobundle.vim
drwxr-xr-x 4 mohsen mohsen 4096 Sep 23 21:21 neosnippet-snippets
drwxr-xr-x 12 mohsen mohsen 4096 Sep 23 21:22 neosnippet.vim
drwxr-xr-x 7 mohsen mohsen 4096 Sep 19 17:09 SimpylFold
drwxr-xr-x 6 mohsen mohsen 4096 Sep 19 15:05 sparkup
drwxr-xr-x 8 mohsen mohsen 4096 Sep 22 20:46 syntastic
drwxr-xr-x 5 mohsen mohsen 4096 Sep 23 21:22 vim-colorschemes
drwxr-xr-x 5 mohsen mohsen 4096 Sep 24 16:26 vim-flake8
drwxr-xr-x 7 mohsen mohsen 4096 Sep 19 15:12 vim-fugitive
drwxr-xr-x 7 mohsen mohsen 4096 Sep 23 21:23 vimshell_3787e5
drwxr-xr-x 8 mohsen mohsen 4096 Sep 19 14:42 Vundle.vim
drwxr-xr-x 5 mohsen mohsen 4096 Sep 23 19:55 YCM-Generator
drwxr-xr-x 11 mohsen mohsen 4096 Sep 20 17:50 YouCompleteMe
When I run vim I get the following error:
Error detected while processing /home/mohsen/.vim/vimrc:
line 164:
E464: Ambiguous use of user-defined command: Plug 'rdnetto/YCM-Generator' , { 'branch': 'stable'}
Press ENTER or type command to continue
What's my problem?
pacman,yumandaptto manage packages on your Linux install, right? :) Same thing here. Each plugin manager works toward the same goal, but does so in its own way. Having all 3 intermix simultaneously is begging for problems. – ZeroKnight Sep 24 '18 at 18:11