The colorschemes i set on my .vimrc don't get loaded everytime i start VIM. Once i'm in VIM, typing :colo colorschemename the color scheme loads perfectly. Why does the colorscheme don't get loaded upon starting VIM.
I have enabled 256 colors in my xterm. and i have CSApprox Plugin
echo $TERM //report xterm-256terminal
tput colors//256
ON VIM: entering this command
set t_Co? //256
Another thing is loading the preinstalled colorschemes in VIM works perfectly. E.g (evening, desert,.etc)
It works perfectly before. The things that i did before it went wrong. Sorry i'm a newbie in Linux.
*customization: -color
XTerm*termName: xterm-256color
xrdb -merge $HOME/.Xresources
Btw, on Gvim the colorscheme loads correctly. I'm Using Ubuntu 12.04LTS
Here's what my .vimrc under $HOME/.vimrc
"**********************************************"
" VUNDLE SETTINGS "
"**********************************************"
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
filetype plugin indent on " required!
"**********************************************"
" PLUGINS "
"**********************************************"
"EasyMotion
Bundle 'Lokaltog/vim-easymotion'
"Sparkup
Bundle 'tristen/vim-sparkup'
"Surround
Bundle 'tpope/vim-surround'
"CsApprox
Bundle 'godlygeek/csapprox'
"**********************************************"
" COLOR SCHEMES "
"**********************************************"
" Distinguised
Bundle 'Lokaltog/vim-distinguished'
" Github
Bundle 'endel/vim-github-colorscheme'
" VividChalk
Bundle 'tpope/vim-vividchalk'
" Pyte
Bundle 'therubymug/vim-pyte'
" Vibrantink
Bundle 'vim-scripts/vibrantink'
"**********************************************"
" MAP LEADER "
"**********************************************"
let mapleader = ","
"**********************************************"
" SYNTAX "
"**********************************************"
syntax enable
"**********************************************"
" VIM SCRIPTS "
"**********************************************"
if has('gui_running')
colorscheme github
else
colorscheme pyte
endif
"**********************************************"
" CUSTOM SETTINGS "
" "
"**********************************************"
set hidden
" Show what mode you're currently at
set showmode
" Enable enhanced command line completion
set wildmenu
" Don't redraw while executing macros
set lazyredraw
" Indentation settings (SOFT TABS)"
set shiftwidth=4
set softtabstop=4
set smarttab
set expandtab "enable this to use spaces instead of tabs
" show line number
set nu
" hightlight as you type
set incsearch
" ignore case when searching
set ignorecase
" set statusline
set laststatus=2
"**********************************************"
" NOTE don't map <c-s> and <c-q> "
"**********************************************"
"**********************************************"
" KEYMAPS "
"**********************************************"
"*******NORMAL MODE MAPPING********"
"map for editing .vimrc
nnoremap <leader>ev :e $MYVIMRC<cr>
"map for sourcing vimrc
nnoremap <leader>sv :so $MYVIMRC<cr>
"map for switching windows
"_ in this keymap is to jump for a line with a nonblank char
nnoremap <space> <c-w><c-w>_
"*******INSERT MODE Mapping********"
"map for escape while in insert mode
inoremap <leader>; <esc>
"map for ins-completion
inoremap <leader>x <c-x>
"*********COMMAND MODE Mappings*******
"exit out of command line mode
cnoremap <leader>; <c-c>
Edit
It seems like the colorsheme is indeed loaded. Upon first loading, Typing :colorscheme reports the correct colorscheme which i set on my .vimrc. But it doesn't take effect the first time. I have to either type on VIM
:colo 'colorschemename'*
or source it again to activate the colorscheme using
:so $MYVIMRC
But after exiting VIM, the colorscheme again doesn't take effect but it is loaded upon starting VIM.
I've executed this on the terminal:
/usr/share/terminfo/d/darwin-256x96
/usr/share/terminfo/d/darwin-256x96-m
/usr/share/terminfo/E/Eterm-256color
/usr/share/terminfo/p/putty-256color
/usr/share/terminfo/r/rxvt-unicode-256color
/usr/share/terminfo/r/rxvt-256color
/usr/share/terminfo/k/konsole-256color
/usr/share/terminfo/s/screen-256color-s
/usr/share/terminfo/s/screen-256color-bce-s
/usr/share/terminfo/g/gnome-256color
/usr/share/terminfo/v/vte-256color
/usr/share/terminfo/x/xnuppc+256x96
/usr/share/terminfo/x/xterm+256color
/usr/share/terminfo/x/xnuppc-256x96-m
/usr/share/terminfo/x/xnuppc-256x96
/usr/share/terminfo/m/mrxvt-256color
/usr/share/terminfo/m/mlterm-256color
NOTE: I've installed ncurses-term. Is it correct that the xterm is xterm+256color instead of xterm-256color
Btw. I've already edited my question.
Thanks in advance.
I found the solution. I think i have to answer my own question. I'm really on despair so i went on to removing the plugins one by one through BundleClean! in Vundle to check if there's any plugin misbehaving.
It was not a problem with my .vimrc after all. It was a conflict with EasyMotion and CSApprox plugins.
I had my EasyMotion configuration before CSApprox on Vundle I followed the instructions on this one.
https://github.com/Lokaltog/vim-easymotion/issues/55
Here's another one that might help others with the same issues as mine.