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. lazy 2.trim 3.number 4.stop ...
A while ago, I wrote a blog post titled "Can...
Preface I recently learned Linux, and then change...
Preface I feel like my mind is empty lately, as I...
This article shares the specific code of Vue+ssh ...
Table of contents 1. Delete the old version 2. Ch...
1. First install the pagoda Installation requirem...
How to add a loading animation every time I scrol...
1 Create a user and specify the user's root p...
Written in front Sometimes you need to install so...
Overview When a 500 or 502 error occurs during ac...
Table of contents First method App.vue Home.vue H...
The one above shows the system time, and the one ...
Preface It took two days to reconstruct a puzzle ...
location expression type ~ indicates to perform a...