Groleo Marius wrote:
On 8/24/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
1. Do you have the required features compiled-in?

        :version

The output should include +autocmd +eval +syntax

If it doesn't, install a Vim version which has them. I recommend Big or
Huge features.

vim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Jul 11 2006 03:28:12)
Included patches: 1-35
Compiled by [EMAIL PROTECTED]
Big 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
+cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
+netbeans_intg -osfiletype +path_extra -perl +postscript +printer -profile
-python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
-sniff +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/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-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/glib-2.0 -I/usr/lib/glib-2.0/include     -O2 -g -Wall
Linking: gcc   -L/usr/local/lib -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext
-lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0
-lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lXt -lncurses -lgpm



2. Are you detecting filetypes?

        :filetype

If the answer does not include "detection:ON" then

        :filetype plugin on
In .vimrc I have
filetype on         " enable filetype detection
filetype plugin on  "


3. Have you enabled syntax highlighting in general?

Yes. If I use the normal :tab sball command, the syntax highlighting behave as
expected

        <F1>    (i.e., hit the F1 key)

If the helpfile is displayed in plain black-and-white, then

        :syntax on

4. If files newly loaded are now being highlighted, but files previously
loaded aren't, then

        :silent! tabdo windo e

The steps I do to obtain this is:
:!ctags -R   " in a directory where you have some c files
:au BufNewFile,BufAdd * :tab sball

CTRL-] on a function defined in another source file, so vim will open another buffer. The second opened buffer lacks the syntax highli....(too long word )

--
Regards, Groleo!



I think it is may be consequence of the fact that autocommands (except when "nested" is used) are not triggered from within autocommands (does ":sball" trigger the BufRead autocommand, which sets the filetype? Maybe, for buffers which haven't yet been read-in).

Try
        :au BufAdd,BufNewFile * nested tab sball

See ":help autocmd-nested".


Best regards,
Tony.

Reply via email to