Samuel Learning

  • 联系
  •  
  • 管理

文章分类(203)

  • 01 ASP/HTML(6)
  • 02 Script/CSS(16)
  • 03 C/C++
  • 04 XML(4)
  • 05 微软编程(26)
  • 06 J2EE(60)
  • 09 Linux(14)
  • 10 Database(27)
  • 11 报表打印
  • 12 打包安装(1)
  • 13 模式重构(2)
  • 14 系统架构
  • 15 敏捷开发(11)
  • 16 案例分析(30)
  • 17 Workflow(1)
  • 18 配置管理(1)
  • 19 项目管理
  • 20 英语(4)

新闻分类(52)

  • CXF学习
  • Hibernate学习(1)
  • iBatis学习(16)
  • Struts1学习(1)
  • Struts2学习(34)

.NET资源

  • adxmenu
  • C# Open Source
  • DNN Directory
  • M2Land
  • Windows Form FAQ
  • 中国DNN
  • 中国DNN联盟

Ajax

  • DoJo
  • GWT
  • JQuery
  • jquery autocomplete
  • jquery flexgrid
  • JQuery Form
  • jquery masked input
  • JQuery UI
  • jquery validation
  • Jquery 图表
  • jquery报表
  • jquery插件集合
  • Qooxdoo
  • Tibco GI
  • YUI
  • YUI-EXT
  • ZeroKode

Java开源

  • ABLE
  • Agile Tao
  • Ajax4JSF
  • Alfresco
  • AppFuse
  • Compiere
  • Equinox
  • Findbugs
  • Geronimo
  • Grails
  • Harmony
  • Hibernate论坛
  • JAG
  • Java开源大全
  • Java视线论坛
  • jBPM工作流
  • JSFTutorials
  • Nereide ERP
  • Ofbiz ERP
  • Opentaps ERP
  • operamasks
  • Petstore
  • Prototype.js
  • RIFE
  • Runa
  • SpringSide
  • Struts Menu
  • Sun Glassfish
  • Trails
  • YUI4JSF
  • 满江红

Mobile

  • Sencha

WEB资源

  • DHTML中心
  • DHTML参考手册
  • DHTML文档
  • EclipsePlugin
  • Firebug
  • GRO Clinux
  • jMaki
  • JSTL文档
  • LoadIcon
  • Openlaszlo
  • Struts Menu 展示
  • Web Test Tools
  • WebCtrs
  • Webdeveloper
  • 中国RIA开发者论坛

Workflow

  • E-Workflow
  • JBPM
  • OpenWFE
  • OSWorkflow
  • WFMC
  • Workflow Research

其他连接

  • confach
  • CPP
  • ejay
  • Giovanni
  • 丹佛
  • 交大e-learning
  • 交大研究生院
  • 可恶的猫
  • 天天@blog
  • 我的相册
  • 阿飞

大牛人

  • 32篇JBPM
  • David.Turing
  • HongSoft@业务集成
  • Joel
  • Koen Aers
  • Martinfowler
  • Raible Matt
  • Raible Wiki
  • Scott W.Ambler
  • Tom Baeyens
  • Uncle Bob
  • 一个世界在等待
  • 子在川上曰
  • 小布老师
  • 小明
  • 差沙
  • 徐昊
  • 江南白衣
  • 汪博士
  • 汪小金
  • 银狐999

开源软件

  • 2Bizbox ERP
  • CompiereCRM&ERP
  • EGW
  • Vtiger CRM
  • webERP

敏捷

  • Canoo
  • Cruisecontrol
  • DBUnit
  • EL4Ant
  • Extreme Programming
  • Fit
  • Fitnesse
  • JFrog
  • Liquibase
  • Maven
  • MockObjects
  • Selenium
  • Squish
  • xpairtise
  • XPlanner
  • XProgramming
  • 敏捷联盟

数据库

  • Oracle 中国
  • Oracle-ERP
  • Oracle在线社区

未归类

  • Aquarius Orm Studio
  • mambo建站系统
  • Oracle产品下载
  • 远程同步管理工具Capivara

经典框架

  • Apache Shale
  • formdef-struts
  • FreeMarker 主页
  • JBoss Seam
  • JSF 中心
  • JSF 入门应用
  • JSF中国
  • MyFaces官方
  • Spring 社区
  • Spring专业网站
  • Spring中文论坛
  • Spring参考手册
  • Spring官方网站
  • strecks-struts
  • Struts1
  • Struts2
  • Struts-layout
  • StrutsWiKi
  • Tapestry WIKI
  • Tapestry 官方
  • Tapestry4开发指南
  • Tapestry中文文档
  • Webwork2文档
  • Wicket

网络教程

  • Laliluna
  • RoseIndia
  • Sang Shin
  • Visualbuilder

著名站点

  • Buildix
  • Dev2Dev
  • IBM dev中国
  • InfoQ
  • ITPub
  • Java Eye
  • Java Research
  • JavaRead
  • JavaWorldTW
  • Matrix
  • PHP100
  • PHPX
  • SpringSideWiKi
  • TheServerSide
  • TWPHP
  • 中国工作流论坛

项目管理

  • 管理人网

最新评论

View Post

Cygwin控制台中文化

编辑3个文件:.bashrc,.inputrc,.vimrc
内容分别如下:
1, .bashrc
# base-files version 3.7-1

# To pick up the latest recommended .bashrc content,
#
 look in /etc/defaults/etc/skel/.bashrc

# Modifying /etc/skel/.bashrc directly will prevent
#
 setup from updating it.

# The copy in your home directory (~/.bashrc) is yours, please
#
 feel free to customise it to create a shell
#
 environment to your liking.  If you feel a change
#
 would be benificial to all, please feel free to send
#
 a patch to the cygwin mailing list.

# User dependent .bashrc file


# Shell Options
#
 #############

# See man bash for more options

# Don't wait for job termination notification
#
 set -o notify

# Don't use ^D to exit
#
 set -o ignoreeof

# Use case-insensitive filename globbing
#
 shopt -s nocaseglob

# Make bash append rather than overwrite the history on disk
#
 shopt -s histappend

# When changing directory small typos can be ignored by bash
#
 for example, cd /vr/lgo/apaache would find /var/log/apache
#
 shopt -s cdspell


# Completion options
#
 ##################

# These completion tuning parameters change the default behavior of bash_completion:

# Define to access remotely checked-out files over passwordless ssh for CVS
#
 COMP_CVS_REMOTE=1

# Define to avoid stripping description in --option=description of './configure --help'
#
 COMP_CONFIGURE_HINTS=1

# Define to avoid flattening internal contents of tar files
#
 COMP_TAR_INTERNAL_PATHS=1

# If this shell is interactive, turn on programmable completion enhancements.
#
 Any completions you add in ~/.bash_completion are sourced last.
#
 case $- in
#
   *i*) [[ -f /etc/bash_completion ]] && . /etc/bash_completion ;;
#
 esac


# History Options
#
 ###############

# Don't put duplicate lines in the history.
#
 export HISTCONTROL="ignoredups"

# Ignore some controlling instructions
#
 export HISTIGNORE="[   ]*:&:bg:fg:exit"

# Whenever displaying the prompt, write the previous line to disk
#
 export PROMPT_COMMAND="history -a"


# Aliases
#
 #######

# Some example alias instructions
#
 If these are enabled they will be used instead of any instructions
#
 they may mask.  For example, alias rm='rm -i' will mask the rm
#
 application.  To override the alias instruction use a \ before, ie
#
 \rm will call the real rm not the alias.

# Interactive operation
#
 alias rm='rm -i'
#
 alias cp='cp -i'
#
 alias mv='mv -i'

# Default to human readable figures
#
 alias df='df -h'
#
 alias du='du -h'

# Misc :)
#
 alias less='less -r'                          # raw control characters
#
 alias whence='type -a'                        # where, of a sort
#
 alias grep='grep --color'                     # show differences in colour

# Some shortcuts for different directory listings
#
 alias ls='ls -hF --color=tty'                 # classify files in colour
#
 alias dir='ls --color=auto --format=vertical'
#
 alias vdir='ls --color=auto --format=long'
#
 alias ll='ls -l'                              # long list
#
 alias la='ls -A'                              # all but . and ..
#
 alias l='ls -CF'                              #


# Functions
#
 #########

# Some example functions
#
 function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; }
#
##################### 以下为添加部分 ################################
#
 cygwin中取\usr\share\locale\zh_CN\LC_MESSAGES中*.mo文件,如果提示信息中
#
 的字符集为utf8则会显示有误(不知何解?,magiclinux无类似情况),为gb2312
#
 则正常,大概与gettext这个模块有关,这个模块的作用是使linux程序提示信息
#
 区域话,即不同地区用不同语言,即常说的i18n;像我们设置的zh_CN.GBK,“.”
#
 之前部分“zh_CN”表示地区即“中国大陆”,后面部分“GBK”表示字符集编码,
#
 像我们下面的设置,当程序调用时会到\usr\share\locale\目录中查找,发现地
#
 区为“zh_CN”则到该目录中查找程序对应的*.mo文件,*.mo文件的名称是在调用
#
 的程序中设置了的。然后取该语种的对应提示,然后按编码(在mo文件中指明了)
#
 处理该文字。
#
 当然这些不是自动处理的,要在程序中调用像setlocale、textdomian、gettext
#
 这样的函数处理。
#
 在cygwin中有些程序,做了下面的设置,因为对应的mo文件中编码为utf8而无法
#
 显示,我是直接将它删除,之后程序会因为找不到mo文件而用默认的英文来显示
#
 的。(下面的编码设置并没有错,应该是cygwin程序中的BUG,只是设置了LC_ALL
#
 就没必要设LANG了,有的文档上面这样写的:))
export set LC_ALL=zh_CN.GBK
export set LANG
=zh_CN.GBK
#export set LC_CTYPE=zh_CN.UTF-8
#
export set CHARSET=UTF-8
#
 解决ls中文显示问题
alias ls='ls --show-control-chars -hF --color=tty'
alias dir
='ls --show-control-chars'
alias less
='less --raw-control-chars'
alias ll
='ls -l'                              # long list
alias la='ls -A'                              # all but . and ..
alias l='ls -CF' 

# 添加清屏处理
alias clear='clearn'
alias clr
='clearn'
# 添加whereis的别名
alias whereis='which'
2,.inputrc
# base-files version 3.7-1

# To pick up the latest recommended .inputrc content,
#
 look in /etc/defaults/etc/skel/.inputrc

# Modifying /etc/skel/.inputrc directly will prevent
#
 setup from updating it.

# The copy in your home directory (~/.inputrc) is yours, please
#
 feel free to customise it to create a shell
#
 environment to your liking.  If you feel a change
#
 would be benifitial to all, please feel free to send
#
 a patch to the cygwin mailing list.

# the following line is actually
#
 equivalent to "\C-?": delete-char
"\e[3~": delete-char

# VT
"\e[1~": beginning-of-line
"\e[4~": end-of-line

# kvt
"\e[H": beginning-of-line
"\e[F": end-of-line

# rxvt and konsole (i.e. the KDE-app)
"\e[7~": beginning-of-line
"\e[8~": end-of-line

# VT220
"\eOH": beginning-of-line
"\eOF": end-of-line

# Allow 8-bit input/output
#
set meta-flag on
#
set convert-meta off
#
set input-meta on
#
set output-meta on
#
$if Bash
  # Don't ring bell on completion
  #set bell-style none

  
# or, don't beep at me - show me
  #set bell-style visible

  
# Filename completion/expansion
  #set completion-ignore-case on
  #set show-all-if-ambiguous on

  
# Expand homedir name
  #set expand-tilde on

  
# Append "/" to all dirnames
  #set mark-directories on
  #set mark-symlinked-directories on

  
# Match all files
  #set match-hidden-files on

  
# 'Magic Space'
  # Insert a space character then performs
  # a history expansion in the line
  #Space: magic-space
#
$endif
#
##################### 以下为添加部分 ################################
#
 关闭bash命令行8字节字符转义符的转换
set convert-meta off
# 使bash命令行支持8字节字符输入
set input-meta on
# 使bash命令行支持8字节字符输出
set output-meta on
# 让bash的命令行已vi模式执行,屏蔽掉下面一行,BASH的命令行操作
#
 就像vi中编辑文本一样,默认为INSERT模式,可以在BASH启动后直接
#
 输入:set -o vi,来启动该开关,set +o vi关闭该模式,但在cygwin
#
 中调用set +o vi关闭时会出现一些乱码,估计也是一个BUG
#
set editing-mode vi
3,.vimrc
" 显示语法高亮度
:syntax on
" 设置字符编码,可使显示中文光标移动和字符删除操作变为双字节
"
:set encoding=cp936
"
 设置vim中TAB缩进为4个空格
"
:set ts=4


posted on 2007-04-18 23:09 MingIsMe 阅读(470) 评论(0)  编辑  收藏 所属分类: 09 Linux

 
Powered by:
BlogJava
Copyright © MingIsMe