This article introduces common problems of Xshell and related configurations. The configuration in this article is mainly for Xshell 5 or Xshell 6 versions. Note: When it comes to the configuration of "properties", if the current Xshell is connected to a server, the property configuration performed in this session window will only take effect for the server session; if you want to configure all session properties, you need to perform the relevant property configuration operations in the session window that is not connected to the server. 1. In the vi editor, the Backspace key cannot delete characters in INSERT mode To solve the above problem, you need to make the following settings: a) Click the "Properties" button as follows: Open the Properties Window. b) Select the "Terminal" tab on the left side of the "Properties" window and set the "Terminal type" corresponding to the "Terminal" tab to "linux" as follows: c) Select the "Keyboard" tab on the left side of the "Properties" window, set the "Function key type" corresponding to the "Keyboard" tab to "linux", the "DELETE key sequence" to "VT220 Del (Esc[3~])", and the "BACKSPACE key sequence" to "ASCII 127 (Ctrl+?)(I)", as shown below: d) In some cases, due to compatibility issues between vim and the system's own vi and some default settings, you need to modify vim's configuration file .vimrc (this file is located in the user's root directory) and add incompatibility settings and some BACKSPACE settings to the file, as follows: After completing the above settings, you can implement the Backspace function of deleting characters in vi's INSERT mode. 2. The problem of Chinese garbled characters in the vi editor When Chinese garbled characters appear in the vi editor, we can troubleshoot the problem from the following three aspects: 1) xshell encoding format; 2) The default language (encoding) of the Linux operating system; 3) The encoding of the file where garbled characters appear. Normally, keeping the encoding formats of these three consistent can solve the problem of garbled characters. The following examples illustrate specific troubleshooting methods. The Chinese characters in the following test.cpp are garbled, as follows: 1) Let's first check the encoding format of xshell. Click the "Properties" button on the xshell interface to open the properties window and check the encoding format as follows: From the above picture, you can see that the encoding format of xshell is "UTF-8". 2) Use the locale command to view the default language of the Linux operating system, as follows: From the above picture, we can see that the default language of the current Linux operating system is "en_US.UTF-8". 3) Use the file command to view the encoding format of the Chinese garbled file, as follows: In the above figure, you can see that the encoding format of the test.cpp file is "ISO-8859", which is inconsistent with the encoding format of the xshell and linux systems, so its encoding format needs to be modified. Use the iconv command to change the encoding format of the test.cpp file to "UTF-8", as follows: iconv -f GBK -t utf-8 -o test.cpp test.cpp After modification, check the encoding format of the test.cpp file again, as follows: At this point, the encoding format of the test.cpp file has changed to UTF-8. Open the file and you can see that Chinese can be displayed normally, as follows: This is the end of this article about detailed explanation of Xshell common problems and related configurations. For more related Xshell common problems and configuration content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Vue implements multiple selections in the bottom pop-up window
>>: MySQL explain obtains query instruction information principle and example
Table of contents 1. What is an index? 2. Why do ...
Table of contents Overall Effect Listen for conta...
[ Linux installation of Tomcat8 ] Uninstall Tomca...
CSS issues about background gradient and automati...
1.1 Introduction to storage engines 1.1.1 File sy...
Preface: When we want to clear a table, we often ...
When you start working on a project, it’s importa...
REPLACE Syntax REPLACE(String,from_str,to_str) Th...
Today I found that WordPress could not connect to...
Key Takeaways: 1. Mastering CSS3 3D animation 2. ...
Detailed explanation of MySQL stored procedures, ...
Table of contents 1. Pre-analysis 1. Variable pre...
1. Problem Sometimes when we log in to Mysql and ...
The first step is to unzip the compressed package...
Hello everyone, today I want to share with you ho...