My Vim plugins (installed with Vundle) aren’t loading - vim

I'm trying to install the vim-scala and vim-sensible plugins using Vundle. I followed the directions here: https://github.com/gmarik/Vundle.vim
In my ~/.vim directory I have: a folder named 'bundle' with a Vundle.vim directory I downloaded from the tutorial.
In my ~/.vimrc I have:
set nocompatible
filetype off
" 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 'gmarik/Vundle.vim'
Plugin 'tpope/vim-sensible'
Plugin 'derekwyatt/vim-scala'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
Then I open Vim, type
:PluginInstall
and my plugins are shown to be successfully installed. However, when I open Vim again, nothing changes.
Edit: I should note that I had the same problems using Pathogen, so I don't think this is a bug in Vundle.
Edit: My .vim and .vimrc are in /root/.vim; I am running on Linux.

According to the asker jeffrey, he resolved his problem. His plugins were loading, but he just did not realize it, because the plugins were not changing any obvious, visible Vim settings.

Related

Vim does not load plugins in edit window but loads them in help or other system windows

Background
I wanted to use some vim plugins (used it plain vanilla before). I installed
vundle (my .vimrc is at the bottom).
I ran PluginInstall and it went ok, PluginList shows:
" My Plugins
Plugin 'VundleVim/Vundle.vim'
Plugin 'sjl/badwolf'
Plugin 'itchyny/lightline.vim'
Plugin 'tomtom/tcomment_vim'
Plugin 'easymotion/vim-easymotion'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'junegunn/fzf'
Problem
When I open vim, the status bar from lightline does not show. However, if I do
:help or :PluginList, these windows have the status bar from lightline.
This has been driving me insane and I have uninstalled/installed vim countless
times now, to no avail, so any help will be hugely appreciated!
.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
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'sjl/badwolf'
Plugin 'itchyny/lightline.vim'
Plugin 'tomtom/tcomment_vim'
Plugin 'easymotion/vim-easymotion'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'junegunn/fzf'
call vundle#end() " required
filetype plugin indent on " required
:help 'laststatus'
(In the comments, I mistakenly pointed the OP towards 'statusline'.)
'laststatus' 'ls' number (default 1)
The value of this option influences when the last window will have a status line:
0: never
1: only if there are at least two windows
2: always
The screen looks nicer with a status line if you have several windows, but it takes another screen line. |status-line|
The default value of 'laststatus' means that the status line will only show if there are at least two windows, and it usually only shows up in the last window.
To show it always, add
set laststatus=2
to your vimrc.

Attempting to use Vundle, but vundle#begin() is an unknown function. Runtimepath is correct

I am trying to use Vundle to manage gVim plugins, but I can't get past an error when starting up Vundle in my gvimrc file. "unknown function: vundle#begin()"
This is usually some runtimepath problem, but I can clearly see that the directory of Vundle.vim is in my runtimepath.
My gvimrc file is in C:\Users\Username, and my vim installation is in C:\Program Files (x86)\Vim. My Vundle installation is in C:\Users\Username\.vim\bundle\Vundle.vim... and my run time path variable clearly includes this file path.
Here is the relevant text of my gvimrc:
set nocompatible
syntax on
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=C:\Users\username\\.vim\bundle\Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'path etc.'
call vundle#end()
filetype plugin indent on
I can successfully run PluginInstall and install some plugins, but I can't get vim to use Vundle. What more can I do?
Maybe it's caused by Windows path, try this:
let $vundle='C:/Users/username/.vim/bundle/Vundle.vim'
set rtp+=$vundle

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!

Installing Floobits with VIM

I'm trying to install the VIM Floobits plugin, but I'm having a lot of difficulty.
First off, I installed VIM from the VIM website and then I tried using Vundle to install the VIM Floobits Plugin.
The issue was that when I tried running the:PluginInstallcommand, I got the message "Sorry, the Floobits Vim plugin requires a Vim compiled with +python"
I'm not really sure what that means. So I looked that up and tried to use MinGW to compile vim with +python. That did not work. Next I tried building VIM from the sources, but the configure command does not work on Windows.
Does anyone know how to properly install Floobits for console VIM?
Oh, and here's the lines from my ~/.vimrc that pertain to Vundle:
" VUNDLE
set nocompatible " required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim " set the runtime path to include Vundle and initialize
call vundle#begin() " begin vundle
Plugin 'gmarik/Vundle.vim' " let Vundle manage Vundle, required
Plugin 'Floobits/floobits-vim' " add the floobits plugin
call vundle#end() " required; all plugins must be added before this line
You can find proper Vim builds for Windows here:
https://tuxproject.de/projects/vim/
http://solar-blogg.blogspot.ca/p/vim-build.html

What is "autocmd FileType go compiler go" supposed to do?

I was trying to add the functionality that a plugin in vim statically analyses my current go (golang) file and catches errors.
What I tried was doing the instructions in the readme.txt file in $GOROOT/misc/vim. There it had the following suggestion:
Vim compiler plugin
-------------------
To install the compiler plugin:
1. Same as 1 above.
2. Copy or link compiler/go.vim to the compiler directory underneath your vim
runtime directory (normally $HOME/.vim/compiler).
3. Activate the compiler plugin with ":compiler go". To always enable the
compiler plugin in Go source files add an autocommand to your .vimrc file
(normally $HOME/.vimrc):
autocmd FileType go compiler go
Godoc plugin
------------
I did all they said but:
autocmd FileType go compiler go
doesn't do anything when I save my file. What is it supposed to do? I clearly have errors in my code:
package main
import "fmt"
//This is my first go program!
//cool hu? Hope I can render this.
func main(){
jhjkahsdjkh //<-----------------ERROR HERE
fmt.Print("Hello World\n")
}
I don't know what to expect cuz I don't know what autocmd FileType go compiler go is supposed to do.
This is how my vim file looks like:
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 'gmarik/Vundle.vim'
" 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'}
Plugin 'commentary.vim'
"Plugin 'fatih/vim-go'
"Plugin 'Syntastic'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
""""------------------------------------
syntax on
" filetype plugin on
" filetype indent on
autocmd FileType go compiler go
" autocmd FileType go autocmd BufWritePre <buffer> Fmt
I also tried this by installing 'fatih/vim-go' plugin and doing the command :GoBuild. That kind of worked, but instead of pointing me to my errors in the current file in went to other files in other packages to that are in development and obviously have errors, but I don't want to see those, I only want to see the errors in my current file. Is there a plugin that does this? Is there a way for my vim to do this on save or something?
autocmd FileType go compiler go
only tells Vim what compiler and settings to use when doing :make. You can read about :compiler in :help :compiler and the linked :help write-compiler-plugin.
If you want Vim to show errors in your code, you need to issue the :make command.
Note that the Syntastic plugin, that's commented in your ~/.vimrc, comes with Go support and does its magic on write.
It looks like you are installing quite a lot of go-related plugins and, possibly, making your life more complicated than it should.

Resources