绝想首页

用cygwin

刘彬 [开心] 2013-03-29 19:13:21 星期五 晴天 查看:160 回复:0 发消息给作者

配置cygwin来支持中文

编辑文件
内容如下:
.inputc

# @see:
# 中文環境設定
# http://people.debian.org/~ygh/zh_TW/html/noframes/node3.html
#
# cygwin 汉化即其他新特性
# http://spaces.msn.com/members/homewj/Blog/cns!1pav0HyE-t7RIT4zpRdid3PQ!113.entry
#
# 在 Cygwin B20 环境中使用中文
# http://spaces.msn.com/members/workchris/Blog/cns!1pD9GsmnwBNxXePYWKSHiCfA!126.entry
#
# 关于~/.bashrc
# http://blog.mllm.org/index.php?q=node/56
#

set meta-flag on

# 关闭bash命令行8字节字符转义符的转换
set convert-meta off

# 使bash命令行支持8字节字符输出
set output-meta on

.bash_profile

# @see:
# 中文環境設定
# http://people.debian.org/~ygh/zh_TW/html/noframes/node3.html
#
# cygwin 汉化即其他新特性
# http://spaces.msn.com/members/homewj/Blog/cns!1pav0HyE-t7RIT4zpRdid3PQ!113.entry
#
# 在 Cygwin B20 环境中使用中文
# http://spaces.msn.com/members/workchris/Blog/cns!1pD9GsmnwBNxXePYWKSHiCfA!126.entry
#
# 关于~/.bashrc
# http://blog.mllm.org/index.php?q=node/56
#
# NOTE: If bash command in cygwin.bat look like this
# bash --login -i
# you sould write all the conent in this file, else in .bashrc
#

alias ls='ls --color --show-control-chars'
export LC_ALL=zh_CN.GB23122
export LC_CTYPE=zh_CN.GB2312
export LANG=zh_CN.GB2312
export XMODIFIERS="@im=Chinput"
stty cs8 -istrip
stty pass8
# Update: 少了这个less就不支持中文了
export LESSCHARSET=latin1

 

在cygwin中使用rxvt 首先我先安装rxvt(在shell中).

然后修改cygwin/cygwin.bat文件:
    @echo off
    D:
    chdir D:shareincygwinin
    set EDITOR=vi
    set VISUAL=vi
    set CYGWIN=codepage:oem tty binmode title
    rxvt -fn "Lucida Console-14" -e bash --login -i

并配置rxvt控制台的其他属性,修改~/.Xdefaults文件:
Rxvt*geometry: 100x40
Rxvt*background: gray16
Rxvt*foreground: #ffffbf
!Rxvt*borderColor: Blue
!Rxvt*scrollColor: Blue
!Rxvt*troughColor: Gray
Rxvt*scrollBar: True
Rxvt*scrollBar_right: True
!Rxvt*font: Lucida Console-14
!Rxvt.boldFont: Lucida Console-14
!Rxvt*font: -bitstream-bitstream vera sans mono-*-r-*-*-14-*-*-*-*-*-*-*
!Rxvt*boldFont: -bitstream-bitstream vera sans mono-*-r-*-*-14-*-*-*-*-*-*-*
Rxvt*font: -*-courier-medium-r-*-*-14-140-*-75-*-*-*-*
Rxvt*boldFont: -*-courier-bold-r-*-*-14-140-*-75-*-*-*-*

Rxvt*SaveLines: 2000
Rxvt*loginShell: True
! VIM-like colors
Rxvt*color0:    #000000
Rxvt*color1:    #FFFFFF
Rxvt*color2:    #00A800
Rxvt*color3:    #FFFF00
Rxvt*color4:    #0000A8
Rxvt*color5:    #A800A8
Rxvt*color6:    #00A8A8
Rxvt*color7:    #D8D8D8
Rxvt*color8:    #000000
Rxvt*color9:    #FFFFFF
Rxvt*color10:   #00A800
Rxvt*color11:   #FFFF00
Rxvt*color12:   #0000A8
Rxvt*color13:   #A800A8
Rxvt*color14:   #00A8A8
Rxvt*color15:   #D8D8D8
! eof






emacs.font:  8x16

emacs.paneFont:  8x16

Emacs.pane.menubar.font: 8x16

Emacs.foreground: white

Emacs.background: black

emacs.geometry:  100x32

 


顶一下(32 写日记 1237085 226606
分享排行

 

 

留住已经逝去的峥嵘岁月 记住曾经绽现的万种风情 在记忆即将淡漠的时候 来把这些重新回味

Copyright (C) 2008-2014 www.juexiang.com, All Rights Reserved.

京ICP备2023001011号-3   京公网安备11010802011908号

客服QQ 1017160561 违法和不良信息举报电话 13148464312 邮箱 1017160561@qq.com