|
楼主 |
发表于 2007-1-26 16:53:21
|
显示全部楼层
看到被设置成了78。不过,我的配置文件应该没问题呀,我设置了textwidth。- " initialisation file for vim editor.
- " $Header: /home/taviso/.vimrc,v 1.1 2004/05/13 17:40:31 taviso Exp $
- set ai nocp digraph ek hid ru sc wmnu noet nosol si
- set bs=2 fo=cqrt ls=2 shm=at ww=<,>,h,l ts=4 sw=4
- set com=s1:/*,mb:*,ex:*/,://,b:# syn=on filetype=on
- set vi=%,'50,"50,:50 lcs=tab:>-,trail:.,extends:>
- set pt=<F5> shm=I tm=750 nomore modelines=5 hls!
- syn on
- ino <Down> <C-O>gj
- ino <Up> <C-O>gk
- nno <Down> gj
- nno <Up> gk
- nno <F2> :set hls!<bar>set hls?<CR>
- nno <F3> :syn clear <CR>
- nno <F4> :set nu!<bar>set nu?<CR>
- if has("gui_running")
- colo blue
- set gfn=Bitstream\ Vera\ Sans\ Mono\ 10
- else
- colo elflord
- endif
- "文件编码的设置
- "关于文件编码的一些注释
- "from http://www-128.ibm.com/developerworks/cn/linux/l-tip-vim1/
- " * 环境变量 LANG(使用的语言);
- " * 环境变量 LC_CTYPE(使用的内部编码);
- " * Vim 选项 encoding(Vim 的内部编码);
- " * Vim 选项 termencoding(Vim 在与屏幕/键盘交互时使用的编码);
- " * Vim 选项 fileencoding(Vim 当前编辑的文件在存储时的编码);
- " * Vim 选项 fileencodings(Vim 打开文件时的尝试使用的编码);
- " * Vim 选项 ambiwidth(对“不明宽度”字符的处理方式;Vim 6.1.455 后引入)。
- "
- " 设置多编码文本
- "set fileencodings=utf-8,cp936,big5,euc-jp,euc-kr,latin1,ucs-bom
- "set fileencodings=utf-8,gbk,cp936,big5,latin1
- set encoding=utf-8
- "set fileencoding=chinese
- set fileencodings=ucs-bom,utf-8,chinese
- " multi-encoding setting
- " http://www.linuxsir.cn/bbs/showthread.php?t=142149
- " from carlos
- "if has("multi_byte")
- "set bomb
- " set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
- " CJK environment detection and corresponding setting
- " if v:lang =~ "^zh_CN"
- " Use cp936 to support GBK, euc-cn == gb2312
- " set encoding=cp936
- " set termencoding=cp936
- " set fileencoding=cp936
- " elseif v:lang =~ "^zh_TW"
- " cp950, big5 or euc-tw
- " Are they equal to each other?
- " set encoding=big5
- " set termencoding=big5
- " set fileencoding=big5
- " elseif v:lang =~ "^ko"
- " Copied from someone's dotfile, untested
- " set encoding=euc-kr
- " set termencoding=euc-kr
- " set fileencoding=euc-kr
- " elseif v:lang =~ "^ja_JP"
- " Copied from someone's dotfile, untested
- " set encoding=euc-jp
- " set termencoding=euc-jp
- " set fileencoding=euc-jp
- " endif
- " Detect UTF-8 locale, and replace CJK setting if needed
- " if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
- " set encoding=utf-8
- " set termencoding=utf-8
- " set fileencoding=utf-8
- " endif
- "else
- " echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
- "endif
- " 自动补全命令时候使用菜单式匹配列表
- set wildmenu
- " 启用鼠标
- set mouse=a
- " 设置为与PEAR编码规范一致
- set tabstop=4
- set shiftwidth=4
- " 自动将制表符展开为空格
- set expandtab
- " 在'{'后自动缩格
- set autoindent
- set smartindent
- " 显示行号
- set number
- " taglist
- nnoremap <silent> <F8> :Tlist<CR>
- " 我使用gvim,当行长度超过一定值时英文空格转换为换行,如何取消?
- set textwidth=0
- set nolinebreak
复制代码 |
|