I checked with :version,it is compiled with the "+syntax",and no "syntax
off" in /etc/vim/vimrc.local or files like that.
I don't know where the syntax files should be,but there are syntax files
in /usr/share/vim/vim70/syntax.
Below is the :version result.

:version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Jan 31 2007 17:43:00)
包含补丁: 1-122
编译者 [EMAIL PROTECTED]
大型版本 带 GTK2 图形界面。 可使用(+)与不可使用(-)的功能:
+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
系统 vimrc 文件: "$VIM/vimrc"
用户 vimrc 文件: "$HOME/.vimrc"
用户 exrc 文件: "$HOME/.exrc"
系统 gvimrc 文件: "$VIM/gvimrc"
用户 gvimrc 文件: "$HOME/.gvimrc"
系统菜单文件: "$VIMRUNTIME/menu.vim"
$VIM 预设值: "/usr/share/vim"






Xi Juanjie wrote:
> "syntax on" should be ok.
>
> Please use :version to confirm your vim was compiled with "+syntax"
> function and keep the corresponding syntax file in vim runtime folder.
>
> Also to check if there has any "syntax off" in /etc/vim/vimrc.local.
>
> wangxu wrote:
>   
>> Why don't I have the syntax highlighting when editing files like *.sh
>> *.xml,etc?
>> After commands like "syntax on",still nothing happened.
>> below is my /etc/vim/vimrc,what else should I do to turn the syntax
>> highlighting on?
>> Thanks,
>> shell.
>>
>>
>> set
>> runtimepath=~/.vim,/etc/vim,/usr/share/vim/vimfiles,/usr/share/vim/addons,/usr/share/vim/vim63,/usr/share/vim/vimfiles,/usr/share/vim/addons/after,~/.vim/after
>>
>> set nocompatible " Use Vim defaults instead of 100% vi compatibility
>> set backspace=indent,eol,start " more powerful backspacing
>>
>> set autoindent " always set autoindenting on
>> set textwidth=0 " Don't wrap lines by default
>> set viminfo='20,\"50 " read/write a .viminfo file, don't store more than
>> " 50 lines of registers
>> set history=50 " keep 50 lines of command line history
>> set ruler " show the cursor position all the time
>>
>> set
>> suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
>>
>> if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" || &term =~ "xterm"
>> set t_Co=16
>> set t_Sf=[3%dm
>> set t_Sb=[4%dm
>> endif
>>
>> vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
>>
>>
>> syntax on
>>
>>
>> if has("autocmd")
>> " Enabled file type detection
>> " Use the default filetype settings. If you also want to load indent files
>> " to automatically do language-dependent indenting add 'indent' as well.
>> filetype plugin on
>>
>> endif " has ("autocmd")
>>
>> augroup filetype
>> au BufRead reportbug.* set ft=mail
>> au BufRead reportbug-* set ft=mail
>> augroup END
>>
>> try
>> if filereadable('/etc/papersize')
>> let s:papersize = matchstr(system('/bin/cat /etc/papersize'), '\p*')
>> if strlen(s:papersize)
>> let &printoptions = "paper:" . s:papersize
>> endif
>> unlet! s:papersize
>> endif
>> catch /E145/
>> endtry
>>
>>
>> if filereadable("/etc/vim/vimrc.local")
>> source /etc/vim/vimrc.local
>> endif
>>
>>
>>
>> if &t_Co > 2 || has("gui_running")
>> syntax on
>> set hlsearch
>> endif
>>
>>
>>
>>
>>     
>
>
>   

Reply via email to