免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1770 | 回复: 2
打印 上一主题 下一主题

终于可以在gvim下输入中文了 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-06-24 10:19 |只看该作者 |倒序浏览
在自己的用户目录下建一个文件 .gvimrc
然后添加以下内容

set fileencoding=prc
set guifontset=-*-*-medium-r-normal--16-*-*-*-c-*-*-


前提是你正确按装好了字体,设置好环境变量。输入法我用的是fcitx。

论坛徽章:
0
2 [报告]
发表于 2003-06-24 14:38 |只看该作者

终于可以在gvim下输入中文了

I use ~/.exrc as config file, so both vim and gvim will use the same config.
you may also config the font like this code:

  1. set guifontset=-b&h-lucidatypewriter-medium-r-normal-*-*-120-*-*-m-*-iso8859-1,-misc-SimSun-medium-r-normal--14-*-*-*-*-*-gb2312.1980-0
复制代码

you will be able to use west font for iso9959-1 encoding and chinese font for gb2312 encoding...

论坛徽章:
0
3 [报告]
发表于 2003-06-24 14:39 |只看该作者

终于可以在gvim下输入中文了

here is my ~/.exrc, modified from the example .exrc

  1. set guifontset=-b&h-lucidatypewriter-medium-r-normal-*-*-120-*-*-m-*-iso8859-1,-misc-SimSun-medium-r-normal--14-*-*-*-*-*-gb2312.1980-0
  2. set nocp incsearch
  3. set cinoptions=:0,p0,t0
  4. set cinwords=if,else,while,do,for,switch,case
  5. set formatoptions=tcqr
  6. set cindent
  7. syntax on

  8. if version >;= 500

  9.   " I like highlighting strings inside C comments
  10.   let c_comment_strings=1

  11.   " Switch on syntax highlighting if it wasn't on yet.
  12.   if !exists("syntax_on")
  13.     syntax on
  14.   endif

  15.   " Switch on search pattern highlighting.
  16.   set hlsearch

  17.   " For Win32 version, have "K" lookup the keyword in a help file
  18.   "if has("win32")
  19.   "  let winhelpfile='windows.hlp'
  20.   "  map K :execute "!start winhlp32 -k <cword>; " . winhelpfile <CR>;
  21.   "endif

  22.   " Set nice colors
  23.   " background for normal text is light grey
  24.   " Text below the last line is darker grey
  25.   " Cursor is green, Cyan when ":lmap" mappings are active
  26.   " Constants are not underlined but have a slightly lighter background
  27.   highlight Normal guibg=grey90
  28.   highlight Cursor guibg=Green guifg=NONE
  29.   highlight lCursor guibg=Cyan guifg=NONE
  30.   highlight NonText guibg=grey80
  31.   highlight Constant gui=NONE guibg=grey95
  32.   highlight Special gui=NONE guibg=grey95

  33. endif

复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP