1. First, install the latest cygwin version on the local machine. Otherwise, problems may occur.
2. To display cygwin properly and enter Chinese characters, you must first select Encoding As gb2312, and then modify the configuration file:
-
- . Bashrc
# Chinese Environment Export lang = en_US.UTF-8 Export lc_ctype = "zh_cn" # Chinese display Alias ls = 'ls -- show-control-chars' Alias dir = 'ls -- show-control-chars'
Alias less = 'less -- raw-control-chars'
|
2. inputrc # Chinese Input/Output in bash Set convert-meta off Set input-meta on Set output-meta on |
3. VI color display in cygwin:
In. vimrc, set syntax = on or syntax enable is used. Here, by the way, an article related to cygwin settings: http://hi.baidu.com/5217/blog/item/b67e60d0e85fd088a0ec9cd9.html
Cygwin Chinese garbled Vim syntax highlighted ls Color Display
Enable cygwin for the following configuration1. Execute VI ~ /. Bashrc, add the following content at the end of the row, and save and close the content
Export lesscharset = Latin1 Alias less = '/bin/less-R' Alias ls = '/bin/LS-f -- color = tty -- show-control-chars' Export lc_all = zh_cn.gbk Export lc_ctype = zh_cn.gbk Export lang = zh_cn.gbk Export output_charset = "GBK" 2. Execute VI ~ /. Inputrc, add the following content at the end of the row, and save and close the content Set meta-flag on Set input-meta on Set convert-meta off Set output-meta on Set completion-ignore-case on
Or find the corresponding configuration to remove the comment from the front
3. Execute VI ~ /. Add the following content to vimrc and save and close (The. vimrc file may not exist). This configuration enables Vim syntax highlighting. Syntax enable
Syntax on
4. If you are a domain user, you need to import the user group and user of the domain (the user has renewed the domain when I perform the operation ).
Mkgroup-D>/etc/group Mkpasswd-D-u domain name to be imported>/etc/passwd |
In addition, the VI syntax display is related to the logon term type and the logon term type of cygwin. If the logon term type is VT100, the color cannot be displayed. |