1

I want to use color scheme badwolf for my vim so I downloaded it from here https://github.com/sjl/badwolf and copied colors/badwolf.vim to my ~/.vim/colors directory. But it does not work. It does not do any changes. I have Ubuntu 14.04 now but when I had Ubuntu 15.04 and Ubuntu 15.10 (yes, I had to downgrade my system because of some issues) exactly the same .vimrc and badwolf worked.

I have vim version 7.4.52 and in my .vimrc I have line color badwolf. My uname -a:

Linux dima-UX32LN 4.2.0-35-generic #40~14.04.1-Ubuntu SMP Fri Mar 18 16:37:35 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

My bash verison: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)

PS also Ctrl+End stopped working. I can't navigate to the end of page using it.

My terminal (echo $COLORTERM) is gnome-terminal.

Update

My vim --version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:32)
Included patches: 1-52
Modified by [email protected]
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions 

My .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()

Plugin 'VundleVim/Vundle.vim'

Plugin 'tpope/vim-fugitive'
Plugin 'L9'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'Valloric/YouCompleteMe'

Plugin 'dag/vim2hs'

call vundle#end()            " required
filetype plugin indent on    " required

" YCM settings {{{
let g:clang_library_path = "/usr/lib64/"
let g:clang_complete_copen = 0
let g:clang_hl_errors = 1
let g:clang_snippets = 1
let g:clang_snippets_engine = "ultisnips"
let g:clang_close_preview = 1
let g:clang_complete_macros = 1

let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:ycm_use_ultisnips_completer = 1
let g:ycm_key_list_select_completion=[]
let g:ycm_key_list_previous_completion=[]

let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py"
" }}}

syntax on

color badwolf
set cursorline
" hi CursorLine term=bold cterm=bold guibg=Grey40

let python_highlight_all = 1

set autoread
set ruler
set ignorecase
set incsearch
set number
set hlsearch " Enable search highlighting

set expandtab
set smarttab
set shiftwidth=4
set tabstop=4

set ai
set si

set encoding=utf8

set fileformat=unix
set ffs=unix,dos,mac

vnoremap <silent> # :call VisualSelection('b')<CR>

set laststatus=2

set pastetoggle=<F2>

map <F5> :edit!<cr>
map <c-s> :w<cr>
map <c-z> :undo<cr>
nmap \M :set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4<CR>
nmap \t :set expandtab tabstop=4 softtabstop=4 shiftwidth=4<CR>

" open tagbar
nmap <F8> :TagbarToggle<CR>
" open nerdtree
nmap <F7> :NERDTreeToggle<CR>
" open it automatically
" autocmd vimenter * NERDTree

nnoremap <C-S-tab> :tabprevious<CR>
nnoremap <C-tab>   :tabnext<CR>
nnoremap <C-t>     :tabnew<CR>

au BufNewFile *.cpp 0r ~/.vim/template.cpp | let IndentStyle = "cpp"

command Compile !g++ -O2 -std=c++11 -Wall -Wextra -DLOCAL -Wpedantic %:t
execute pathogen#infect()
call pathogen#helptags()
8
  • @muru it's 7.4.52
    – PepeHands
    Apr 16, 2016 at 12:45
  • @muru added this info to ** update ** section
    – PepeHands
    Apr 16, 2016 at 12:48
  • I cannot reproduce with the same version of Vim on 14.04. What colorscheme do you get when you start Vim? Are you sure you don't have a plugin or other configuration which sets the colorscheme later on?
    – muru
    Apr 16, 2016 at 12:59
  • @muru I also added my .vimrc
    – PepeHands
    Apr 16, 2016 at 13:06
  • @muru sorry, did not notice your question. I have just standard color scheme
    – PepeHands
    Apr 16, 2016 at 15:43

1 Answer 1

2

Finally found the answer. The problem was that by default full color support in ~/.bashrc and ~/.vimrc is disabled. I did not face this problem on Ubuntu 15. I found a fix here: How do I enable full-color support in Vim?. So all I had to do is to insert

if $COLORTERM == 'gnome-terminal'
    set t_Co=256
endif

in my ~/.vimrc

UPDATE

As @muru said it's better to insert

if [ "$COLORTERM" == "gnome-terminal" ]; then
    export TERM=xterm-256color
fi

in your .bashrc (see why in a link above)

1
  • 1
    You should set export TERM=xterm-256color instead.
    – muru
    Apr 20, 2016 at 22:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .