先把我的配置文件出来看一下:
解决方法:gedit /usr/share/vim/vim71/tutor/tutor.zh.euc
然后另存为打开路径,用UTF8编码保存,替换掉原文件。
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
" au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
" \| exe "normal g'\"" | endif
"endif
" Uncomment the following to have Vim load indentation rules according to the
" detected filetype. Per default Debian Vim only load filetype specific
" plugins.
"if has("autocmd")
" filetype indent on
"endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd " Show (partial) command in status line.
"set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching
"set smartcase " Do smart case matching
"set incsearch " Incremental search
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes) in terminals
" Source a global configuration file if available
" XXX Deprecated, please move your changes here in /etc/vim/vimrc
" add by yys
" 配色方案,任选一种即可
"colorscheme elflord
"colorscheme darkblue
colorscheme evening
"colorscheme murphy
"colorscheme torte
"colorscheme desert
" 设置(软)制表符宽度为4:
set tabstop=4
set softtabstop=4
" 设置缩进的空格数为4
set shiftwidth=4
" 设置使用C/C 语言的自动缩进方式
set cindent
" 设置C/C++语言的具体缩进方式
set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s
" 如果想在左侧显示文本的行号,可以用以下语句
set nu
" 设定文件编码类型,彻底解决中文编码问题
let &termencoding=&encoding
set fileencodings=utf-8,gbk,ucs-bom,cp936
"缓冲区写入文件的时候自动检查文件类型
au BufWritePost * filet detect
" 最后,如果没有下列语句,就加上吧
if &term=="xterm"
set t_Co=8
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif
" end add by yys
|
阅读(808) | 评论(0) | 转发(0) |