Vundle not installing plugins correctly - vim

I'm running Arch and I'm trying to use Vundle to install plugins.
Here's my ~/.vimrc
filetype off
set nocompatible
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'
Plugin 'Valloric/YouCompleteMe'
Plugin 'bling/vim-airline'
Plugin 'pangloss/vim-javascript'
call vundle#end()
filetype plugin indent on " Treba nam da Vim prepoznaje filetype
syntax on " Uključujemo syntax highlighting
set tabstop=4 " Broj razmaka koji tab stavlja
set shiftwidth=4 " Razmaci za autoindent
set autoindent " Auto indent!
set expandtab " Stavlja razmake umjesto taba
set smarttab " Dodatna carolija
set number " Line numbers!
set showmatch " Kada je zagrada umetnuta, na sekundu
" skoči do njenog para.
set ruler " Pokazuje Line/column brojeve
set background=dark " Lepo tamno bre
Now when I run vim +PluginInstall +qall it only seems to install VundleVim/Vundle.vim. But when I :so ~/.vimrc and reinstall it does it correctly, but the plugins never show up.
:set rtp also displays all the paths to ~/.vim/bundle but they still don't show up. I've tried reinstalling vim, but to no avail. What should I do?
Edit #1: Updated ~/.vimrc to include VundleVim/Vundle.vim.

According to the Vundle README, before any other plugins, you have to let Vundle manage itself:
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

Typing :VundleInstall worked for me. I spent a long time doing :PluginInstall, but I think once you have Vundle installed (you can check by typing :PluginList), you can do :VundleInstall

I have the error E117 when I exec PluginInstall,because 'set rtp' is not work, the solution is move the runtime! debian.vimcommond to the top of the .vimrc

Related

NeoVim Plugin not getting installed. (Using vim-plug)

Please help me I am facing this weird issue while setting up my init.vim for my NeoVim. So the following is my init.vim file. That does not show any errors. But when I want to install the plugins. After I run :PlugInstall only vim-code-dark is getting Installed. The other Plugins i.e. vim-polyglot and NERDTree isn't getting installed. PLEASE PLEASE PLEASE tell me where have I gone wrong. I am stuck here since like 2 days but can't setup my Vim editor.
" Auto-Install vim-plug
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"autocmd VimEnter * PlugInstall
"autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
"__________________________________________________________________________________________
" Vim-Editor Plugins
call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'sheerun/vim-polyglot'
Plug 'scrooloose/NERDTree'
Plug 'jiangmiao/auto-pairs'
call plug#end()
"__________________________________________________________________________________________
" General Editor Settings
" set leader key
let g:mapleader = "\<ALT>"
" vim basics
set encoding=utf-8
syntax enable
set relativenumber
set noswapfile
set scrolloff=4
set backspace=indent,eol,start
" vim basics
set encoding=utf-8
syntax enable
set relativenumber
set noswapfile
set scrolloff=4
set backspace=indent,eol,start
" indentation
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set fileformat=unix
set incsearch
set ignorecase
set smartcase
set nohlsearch
set nobackup
set nowrap
filetype plugin indent on
" autocompletion
set updatetime=300
"__________________________________________________________________________________________
" Vim Themes
call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'tomasiser/vim-code-dark'
call plug#end()
colorscheme codedark
let g:airline_theme = 'codedark'
You have two plug-blocks, that'll confuse vim-plug. Move vim-code-dark into the earlier plug-block and delete the second one.

Vundle doesn't load plugin

This is my .vimrc located under $HOME/.vimrc. I've installed Vundle.
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()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'dracula/dracula-theme'
call vundle#end() " required
filetype plugin indent on " required
" Put your non-Plugin stuff after this line
I'm able to execute :PluginInstall successfully installing dracula-theme. Unfortunately the theme is not applied and the style remains unchanged? Any clues?
Adding Plugin 'dracula/dracula-theme' to your vimrc and using :PluginInstall make the colorscheme available to Vim but it doesn't say to Vim to use it.
As #dNitro said in the comment you have to use the command colorscheme to set the desired colorscheme. Thus you need to add a line colorscheme dracula to your vimrc after the line " Put your non-Plugin stuff after this line.

A few JSHint/Syntastic questions for Vim

I'm using Vim with Syntastic and JSHint, and there are a few bits of glitchy behavior that I'd like to fix.
Whenever I modify the last character on a line of text and save (:w), I momentarily see "^M" flash after the text before (sometimes) vanishing. Sometimes it sticks around and I have to manually delete it. What's the deal with this and how do I prevent it?
When there is an error in the quickfix view, how do I toggle focus between the quickfix view and the Vim editor window?
Vim crashes maybe once per minute, and I haven't the slightest clue as to why, but it's extremely annoying. The error typically reads "Vim: Caught deadly signal ABRT Vim: Finished. [1]6099 abort vi gulpfile.js" How do I prevent this?
Here is my .vimrc file:
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()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
"Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Avoid a name conflict with L9
"Plugin 'user/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" React.js/JSX syntax highlighting
"Plugin 'mxw/vim-jsx'
"
"JSHint
Plugin 'wookiehangover/jshint.vim'
"Syntastic
Plugin 'scrooloose/syntastic'
"Syntastic configuration
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_html_tidy_exec = 'tidy5'
let g:syntastic_javascript_checkers = ['jshint']
let g:JSHintHighlightErrorLine = 0
syntax on
set t_Co=256
set ai
set shiftwidth=4
set tabstop=4
set number
"colorscheme monokai
colorscheme skittles_berry
Thanks for any help you can provide.
I have no idea where your ^M issue and your crashing issue come from but you don't need such a huge plugin for such a simple task.
Create ~/.vim/after/ftplugin/javascript.vim if it doesn't exist and paste the lines below:
errorformat for jshint
setlocal errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m,%-G%.%#
tell Vim to use jshint for the :make command
setlocal makeprg=jshint
add an autocommand to run :make on the current file upon write, the | silent wincmd p at the end switches the focus back to the editing window once the quickfix window is opened
autocmd! BufWritePost <buffer> silent make % | silent redraw! | silent wincmd p
I've never experienced a single crash with that simple setup, or that ^M issue.
With that in place you should get something like that after :w:
To move the focus from/to the quickfix window, use <C-w>p.
To jump to the previous/next error without using the quickfix window, use :cprevious/:cnext.
Reference:
:help 'errorformat'
:help 'makeprg'
:help autocmd
:help bufwritepost
:help :silent
:help :redraw
:help :wincmd
:help quickfix
Also, check out this great post: The Power of Vim

VIM: .vimrc not working as expected on Mint13 XFCE, works on MacVim

Vim-newbie here...
I've been learning vim at work using a Mac.
I added my .vimrc to my github repo and expected Vundle to
download everything and have vim working the same on my home Mint 13 laptop.
I've linked my ~/.vim/.vimrc to ~/.vimrc.
I followed these instructions for building vim 7.4 and having a working vim.
I know that some parts of the .vimrc file are read, b/c my
remapped esc sequence is working.
Nothing else appears to work, not even line numbers.
vim --version
vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 25 2015 20:30:46)
Included patches: 1-640
vimrc
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()
" alternatively, pass a path where Vundle should install plugins
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" Keep Plugin commands between vundle#begin/end.
Bundle 'nanotech/jellybeans.vim'
Bundle 'tpope/vim-fugitive'
Bundle 'flazz/vim-colorschemes'
Bundle 'fs111/pydoc.vim'
Bundle 'hdima/python-syntax'
Bundle 'scrooloose/nerdtree'
Bundle 'tmhedberg/SimpylFold'
Bundle 'scrooloose/syntastic'
Bundle 'kien/rainbow_parentheses.vim'
call vundle#end() " required
filetype plugin indent on " required
syntax enable
set foldmethod=indent
set foldlevel=99
setlocal foldmethod=indent
set background=dark
set tabstop=4
set expandtab
set shiftwidth=4
set shiftround
set number
let mapleader=","
set hlsearch
set mouse=a
set nojoinspaces
set smarttab
nnoremap <leader>n :NERDTree<CR>
imap fj <Esc>
colorscheme jellybeans
" rainbow parens
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
It would appear, that once again I've been bitten by XFCE.
This link gave me the hint I needed, setting my terminal
colos with:
set t_Co=256
Now more features are working as I expected, except that the color scheme
jellybeans is no longer so great.
Rainbowparens is not working.
EDIT:
Using more colors allows rainbow parens to work...
set t_Co=512

YouCompleteme works but can not complete using TAB

I installed YouCompleteMe using vundle.
Then installed all plugins and installed YCM using
./install.sh --clang-completer
This is how my vimrc looks:
syntax on
set expandtab
set cindent
set tabstop=4
retab
set shiftwidth=4
set hlsearch
set paste
set ic
set number
colorscheme molokai
set t_Co=256
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()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-repeat'
Plugin 'kien/ctrlp.vim'
Plugin 'sjl/gundo.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'Valloric/ListToggle'
call vundle#end() " required
filetype plugin indent on
"options for syntastic"
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_python_checkers=['pep8', 'pylint', 'python']
let g:syntastic_enable_signs=1
let g:syntastic_auto_loc_list=1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_error_symbol = "X"
let g:syntastic_style_error_symbol = ">"
let g:syntastic_warning_symbol = "!"
let g:syntastic_style_warning_symbol = ">"
let g:syntastic_echo_current_error=1
let g:syntastic_enable_balloons = 1
let g:syntastic_auto_jump=1
"Gundo options"
nnoremap <F5> :GundoToggle<CR>
"CtrlP options"
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
"Powerline stuff"
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
set laststatus=2
YCM works but I can't switch between the suggestions using TAB, only using Down and Up arrows and accepting with Enter.
Why is happening this? Is another program using the TAB key?
thanks a lot for the help
By configuring set paste, you're effectively disabling all mappings and abbreviations.
You only need that set when you actually paste text in terminal Vim! It's best to bind this to a key. As mappings cannot be used when the option is set, Vim provides a special option for this:
:set pastetoggle=<F10>
Further commentary
As the ~/.vimrc is sourced at the beginning of Vim startup (when files passed to it haven't yet been loaded), the retab is ineffective; just drop it. If you really want automatic reindenting for opened files, you'd have to employ an :autocmd BufRead * retab for that, but I'd advise against that.
The problem was due to the "set paste" line in my .vimrc
so, I removed it, and when I want to paste large blocks of code in vim, I just write :set paste to enable it or :set nopaste to disable it. This toggle can be also mapped to f10 or any key.

Resources