1
votes

The directories in my ~/.vim directory are

autoload  bundle  colors

autoload contains pathogen.vim

bundle contains nerdtree tagbar vim-colors-solarized

colors contains adobe.vim autumnleaf_modified.vim autumnleaf.vim codeburn.vim tango-desert.vim wood.vim

Now my .vimrc contains the following lines

execute pathogen#infect()
set t_Co=16
set background=light
let g:solarized_termcolors=256
colorscheme solarized
set background=dark

The line colorscheme solarized chooses the colorscheme solarized from bundle folder.

If I were to open the editor vim test.c and then set

:color wood

it selects wood color scheme from colors folder.

What is the difference between the colors for VIM chosen from colors folder and bundle folder?

1
:colorscheme solarized, :color solarized, :colo solarized are all exactly the same, they just have the command name abbreviated to different degrees. - glts

1 Answers

5
votes

Vim has something called runtimepath: a list of top level directories where to look for runtime files.

By default, Vim will look for a number of subdirectories under the directories in runtimepath but, as you can see from the list under :help rtp, there's no default bundle/ directory: that bundle/ directory is a Pathogen convention.

What Pathogen does is relatively simple in theory: it adds whatever directory it finds directly under bundle/ to the runtimepath, making their content available to Vim.

Each plugin directory you add to your bundle/ directory acts like a mini $HOME/.vim/: it may contain any or all of the default directories Vim expects to find in $HOME/.vim/ like colors/, autoload/, after/, …

Your plugins are all located under the same directory, each in its own subdirectory, sandboxed, easy to remove, modify or update, tidy.

Thanks to Pathogen, Vim is thus able to look for color schemes in bundle/whatever/colors/ as well as in the default colors/.

Practically speaking, the only difference between those color schemes is their location.