Recently, PHP development requires the application of vi, but the PHP file must support Chinese characters. so I consulted my colleagues and found some results. Previously it was the application putty to connect to freebsd server, but it seems to be entered in Chinese with a title, so the application F-SecureSSHClient5.4, application
Recently, PHP development requires the application of vi, but the PHP file must support Chinese characters. so I consulted my colleagues and found some results.
Previously, putty was used to connect to the freebsd server, but it seems that there is a title in the Chinese language. Therefore, F-Secure SSH Client 5.4 can also be used, which is better than putty, but it is not that convenient.
To highlight the code in vi, it seems that bash is to be applied. freebsd uses csh by default, so you need to fix it:
% Chpass heiyeluren
# Changing user database information for heiyeluren.
Shell:/usr/local/bin/bash
Full Name: heiyeluren
Office Location:
Office Phone:
Home Phone:
Other information:
If your shell is csh, you can change it to Shell:/usr/local/bin/bash.
In the beginning, you will be able to see different colors. for example, you will be able to see different colors.
Then, the. bash_profile file will be displayed in your home directory, which is your configuration file. configure it as follows:
1 # PS1 = '[\ u @ \ H \ w] \ $'
2 PS1 = '[\ w] \ $'
3 alias vi = 'vim'
4 alias ll = 'ls-Al'
5 LANG = zh_CN.EUC
6 EDITOR = vim
7 TERM = linux
8 # TERM = xterm
9 export LANG EDITOR TERM
10 export CLICOLOR = 1
11 export PATH =/usr/local/bin: $ PATH
12 export CVSROOT =: pserver: heiyeluren @ cvs:/home/cvs/CVS
Pay attention to the above items: LANG = zh_CN.EUC, TERM = linux, and so on. you can fix it as above.
Finally, modify the. exrc file as follows:
1 syntax on
2 set tabstop = 4
3 set autoindent
4 set nu
You can retain the modification. However, do not close this terminal at this time. it is best to open another terminal and connect to the past. if you can log on to the terminal, you cannot log on to the terminal and immediately correct it.
Now you can highlight files and support the display and compilation of Chinese characters.
We recommend that you use the F-Secure SSH Client and set the background to a dark color.