I have the usual filetype plugin indent on
and syntax on
commands in my .vimrc
and can verify that filetype is correctly recognised. But no syntax highlighting. What can I do? This worked out of the box in Ubuntu.
2 Answers
It turns out I had some stuff in my .vimrc
which did not belong there (copied it from OSX where I use iTerm).
Specifically, this was the problem
" Solarized colorscheme
if !has('gui_running')
let g:solarized_termcolors=256
endif
set background=dark
colorscheme solarized
hi Visual ctermbg=105
hi MatchParen cterm=bold ctermbg=125 ctermfg=0
hi Normal ctermfg=253
I did not investigate which part exactly, but I did not even have the solarized colorscheme installed, so that might be it.
Syntax highlighting does not appear to be enabled in the default build of VIM included with Elementary OS Freya, see below
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:02)
Included patches: 1-52
Modified by [email protected]
Compiled by buildd@
Small version without GUI. Features included (+) or not (-):
+acl -farsi -mouse_sgr -tag_old_static
<snipped>
-ex_extra -mouse_jsbterm -syntax
.vimrc
so it's got tob something different.