I have Solarized installed via pathogen and it's been working fine in both terminal and MacVim on my Mac. Today, I tried setting up an Ubuntu box on Linode. I just cloned my dotfiles and symlinked to my .vim and .vimrc folders (this is the same setup as I use on my local machine.
Whenever I try to run vim on the Ubuntu box I get an error
Error detected while processing /root/.vimrc:
line 43:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
I can tell my .vimrc is being loaded because all other setting like line numbers are working.
The related lines in .vimrc are the following:
" settings needed for solarized colorscheme
syntax enable
set background=dark
let g:solarized_termcolors=256
colorscheme solarized
This is the setup of my .vim/bundle directory (incase you suspect I don't actually have solzrized in there!):
~ ls .vim/bundle
ack coffeescript liquid snipmate vim-colors-solarized vim-jst zencoding
closetag html5.vim nerdtree surround vim-javascript vim-rails
One other thing, running echo &t_Co in vim on the ubunto box gets me 256.
Any ideas?
I was running into this problem just now, too. I had my call pathogen#infect() line in my .vimrc just fine, but was getting the
E185: Cannot find color scheme solarized
error, like you. I moved my call pathogen#infect() up to the top of my .vimrc and all is swell now. Try that if you're still having problems!
I know that it is kind of obvious, but did you check the contents of ~/.vim/bundle/vim-colors-solarized? Just in case you are running in the same issue described in Vim: Pathogen not loading
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
for the file "colors/{name}.vim. The first one that
is found is loaded.
You should put solarized.vim in ~/.vim/colors/.
This is what I did;
cp ~/.vim/bundle/vim-colors-solarized/colors/solarized.vim ~/.vim/colors/
I just ran into this problem myself on a new CentOS box where 'vi' was mapped to a version of VIM without syntax support (ie. -syntax) and was giving the E185: Cannot find color scheme solarized error, while 'vim' mapped to a version with syntax support and worked fine with solarized.
Aliasing 'vi' to 'vim' resolved the issue.
For reference:
To check if the version of vim that you are running has support for syntax highlighting, run :version from within vim. -syntax means no support, +syntax means it has support.
To create the alias, append alias vi='vim' to your ~/.bashrc or ~/.bash_profile
To re-source, type source ~/.bashrc or source ~/.bash_profile, whichever is appropriate for your setup.
One step you might be missing is to add
call pathogen#infect()
to your .vimrc file.
Src: http://www.vim.org/scripts/script.php?script_id=2332
I was getting this problem and I fixed it by issuing
cd ~/.yadr
git pull
rake update
I fix it ;)
Found this bug:
https://github.com/altercation/vim-colors-solarized/issues/104
cp ~/.vim/bundle/vim-colors-solarized/colors/solarized.vim ~/.vim/colors/
As Ryan Ransford said:
With the new version of vundle (Vundle.vim),
it appears as though "colorscheme solarized" must
come somewhere after "call vundle#end()".
This works for me!
I have the same issue and resolve it after moving color setting after call vundle#end() in ~/.vimrc
...
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
call vundle#end() " required
filetype plugin indent on " required
if has('gui_running')
set background=dark
colorscheme solarized
else
colorscheme zenburn
endif
Related
I've got a computer with windows 7 in which I've recently installed Git (with Vim inside the Git directory). I tried installed pathogen and apparently it is installed correctly since there are no error messages with pathogen in autoload. My _vimrc is located in Users/Username which is $HOME and it the following is relevant to pathogen.
execute pathogen#infect() //_vimrc starts with this line
call pathogen#helptags()
syntax on
filetype plugin indent on
the path to autoload and bundle is:
C:/progra~1/git/usr/share/vim/vim74/autoload(and vim74/bundle)
When I clone a plugin (ex. NerdTree) to bundle, the following message appears when I open Vim.
Error detected while processing /usr/share/vim/vim74/bundle/nerdtree/plugin/NERD_tree.vim:
line 16:
E15: Invalid expression: exists("loaded_nerd_tree")^M
line 211:
E171: Missing :endif
I also start a session in vim and use
:help NERD_tree.txt
but it returns "Sorry, no help for NERD_tree.txt"
Does anybody know what is causing the problem and has the solution?
First
All your configuration is supposed to happen in $HOME/.vim/ (plugins, colorschemes, etc.) and $HOME/.vimrc (options, mappings, etc.). Note also that, since Vim 7.4, it is possible to have your vimrc directly inside $HOME/.vim/, which makes managing your configuration even easier.
Whatever you did in /usr/share/vim/ should be reverted ASAP.
Second
But your issue is caused by line-endings: the cloning process changed the ones used by the author — lf — to the standard ones on Windows — crlf. Because Vim only accepts lf it was unable to source your plugin.
The cause is most likely the value of core.autocrlf in your Git settings.
The command below should prevent Git from converting lf to crlf upon checkout/clone/pull/etc.:
git config --global core.autocrlf false
I have installed syntastic on gVim using pathogen. I can access syntastic documentation and stuff. But syntastic can't check my files for error. I have setup the path for php even then it wont check
Here is the screenshot of errors- http://i.imgur.com/I5akIkZ.png
After dong lots of googling I figured out the answer myself. The E484 error in VIM refers to the case when Vim is unable to execute system level commands, like creating temp files, directories etc.
To check this run echo system("echo hello")
In my case I couldn't run this successfully. So I went through my _vimrc and found that somewhere I was setting set shell=/bin/bash -> On a windows machine
After this the fix was simple. I just set the shell as
set shell=%System32%\cmd
Hope this helps anyone who is experience this kind of problem.
I'm trying to get vim-ipython working, and have been using this reference guide (https://github.com/ivanov/vim-ipython).
First, I created the following directory:
/Users/***/.vim/ftconfig/python/ipy.vim
However, when I type %edit in IPython, I still get
No default editor available.
Specify a GUI text editor in the `IPythonWidget.editor` configurable to enable the %edit magic
Then, I tried typing the following in IPython:
source ipy.vim
I got an error:
File "<ipython-input-7-505e44392e8d>", line 1
source ipy.vim
^
SyntaxError: invalid syntax
Finally, I edited ipython_qtconsole.config.py to include the following line:
c.IPythonWidget.editor = "/Users/***/.vim/ftplugin/python/ipy.vim"
Still no dice. I can get emacs to work by editing c.IpythonWidge.editor, but I'm not sure how to change it to use vim as the editor.
Any suggestions? Thanks!
I am trying to use the command line to open the the jquery-rails gem. I am using the command: bundle open jquery-rails and I am getting the message returned: To open a bundled gem, set $EDITOR or $BUNDLE_EDITOR
Forgive me if this is totally newb, but how do I set my text editor Notepad++ like the message is telling me to? I am using windows vista/Rails 3.1
Thanks for any advice.
vi ~/.bashrc or ~/.zshrc or whatever you have:
export EDITOR=vim
Because you mentioned Notepad++ I suppose you are working with Windows. You need to set an environment variable called EDITOR containing the path to Notepad++.
If you use zsh on Mac OS X,add this line of code into .zshrc file:
export EDITOR="mvim"
That will make macvim to open the gem.
don't forget to reload your bash session after setting export EDITOR="vim" in ~/bashrc
Im new to Vim and am having trouble installing the sparkup plugin found at https://github.com/rstacruz/sparkup. I've copied the contents of the zip into the ftplugin folder and have tried to expand the div tag by pressing command e but appears.
Im stumped, any assistance would be appreciated
Make sure you have filetype detection enabled. That was the issue I ran into a while back on sparkup, with similar symptoms.
Try adding the following to your ~/.vimrc:
filetype indent plugin on
Most of the time, vim plugins come with specific help files, it does not seem to be the case for that one...
You can check the following things :
This a "file type" plugin : so it will only trigger when you are editing a *.html file. So make sure you're not doing your test on a new buffer but on a previously saved .html file.
Regarding your installation and the path of the sparkup files, make sure than sparkup.py and sparkup.vim are in ~/.vim/ftplugin/html (and not something like ~/vim/vim/ftplugin/html) or it won't work
Type :scriptnames it will list all loaded plugin : so somewhere in that list you should see sparkup.vim, if not it means it is not correctly installed or detected by Vim.
Regarding the shortcut to invoke sparkup, it seems to be <CTRL>e.
You can use vim version of Sparkup tailored for easy installation https://github.com/pyp/vim-sparkup.
With Pathogen
cd ~/.vim/bundle
git clone 'https://github.com/pyp/vim-sparkup.git'
With Vundle. Add this to .vimrc:
Bundle 'pyp/vim-sparkup'