Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I took the following steps on an Ubuntu 10.04 machine.

First install some necessary dependencies:

$ sudo apt-get build-dep vim-gnome

Make sure you've got Mercurial and Python installed. Then create a directory to put the source in:

$ mkdir ~/.build/hg
$ cd ~/.build/hg

Then clone the repository:

$ (date && hg clone https://vim.googlecode.com/hg/ vim) 2>&1 |tee hg-vim.log

Start yer compilers!

$ make

Then install it in a certain location (I don't understand this completely):

$ sudo make install

Then create a symlink to make that Vim binary available everywhere. To do that, first remove the existing symlink:

$ sudo rm /usr/bin/vim

Then create the new one:

$ ln -s /usr/local/bin/vim /usr/bin/vim

If I start my Vim now, it is the latest version (7.3.495) and it reads my .vimrc (I know because some settings in it are working). Doing

echo $MYVIMRC

Also gives me the path of my .vimrc.

Starting this version of Vim does not give me working colorschemes. The line numbers and background are colored but the text is not.

How could I further debug this?

Edit The dump of

vim --version

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr 11 2012 11:13:46)
Included patches: 1-495
Compiled by niels@niels-desktop
Huge version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +fork() +gettext 
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall 
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname 
+mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm 
-mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme 
+netbeans_intg +path_extra -perl +persistent_undo +postscript +printer +profile
 -python -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs 
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
 +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim 
+xsmp_interact +xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim   -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -    curses -    sl  -lselinux -lacl -lattr -lgpm           
share|improve this question
    
Have you tried different color schemes? Type :colorscheme and then tab your way through some available schemes (e.g. probably "default", "desert", ...) and see if they work (if none are found: try downloading a color scheme and put it in ~/.vim/colors/). Perhaps you specify a non-standard color scheme in your ~/.vimrc and the mainline Vim installation can't find it. –  Daniel Andersson Apr 11 '12 at 10:07
    
I did try that, to no avail. Only line numbers and background colors worked. I definitely also tried the default colorschemes (blue, desert, elflord etc..). –  Niels Bom Apr 11 '12 at 10:51
    
Give the output of vim --version in your question to show your compile-time options. –  Daniel Andersson Apr 11 '12 at 13:25
    
@DanielAndersson I added the output of vim --version –  Niels Bom Apr 11 '12 at 14:27
    
Not related to the original question but to the installation method: the steps sudo rm /usr/bin/vim and ln -s /usr/local/bin/vim /usr/bin/vim should not have been necessary and probably do not have any effect since /usr/local/bin should come before /usr/bin in your PATH. –  garyjohn Apr 11 '12 at 15:07

1 Answer 1

From your description, it sounds like syntax highlighting is not activated. Your compile time options include +syntax, so that is not the problem.

Open a file that shoud be syntax highlighted and try the command :syntax on and see if anything happens.

You can also try to open a new document, enter

echo "hi there"

and then execute :set ft=sh. This should highlight the line according to shell script syntax.

Report any weirdness.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.