Problem description: Use gnome-terminal to open the file editing with vim and exit. The prompt becomes garbled.
Below are some suggestions from Google users.
1. I have encountered this problem and changed locale to Lang = zh_cn.
Lc_ctype = "zh_cn", etc.
2. Generally, reset or gvim is used to skip this issue.
In the past, a brother posted such a post and solved the problem. Cannot be found at the moment. It seems that the menu is edit --> current.
Profile --> title and command.
3
In fact, this is not a problem with vim. For example, if you use konsole, it will be okay. This is actually a problem with gnome-terminal. As you can see on Sir
In the configuration file --> title and command --> title, add an English space before and after the word "terminal.
The same is true for me.
I haven't studied any questions.
Gvim is rarely used.
So I gave gvim to cut.
In the gnome-terminal menu, -- terminal -- reset or reset and clear
Final Solution:
Method 1 gave gvim to cut (not a method)
View the installation package of gvim
Lingyun @ Lingyun:/Media/movie/music/$ sudo apt-Get install gvim
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gvim is a virtual package provided:
Vim-tcl. 1-138 + 1ubuntu3
Vim-Ruby. 1-138 + 1ubuntu3
Vim-Python. 1-138 + 1ubuntu3
Vim-perl. 1-138 + 1ubuntu3
Vim-GTK. 1-138 + 1ubuntu3
Vim-full. 1-138 + 1ubuntu3
Vim-gnome. 1-138 + 1ubuntu3
You shoshould explain icitly select one to install.
E: Package gvim has no installation candidate
Because you shoshould explain icitly select one to install, you must cut all the above packages.
Lingyun @ Lingyun:/Media/movie/music/$ sudo apt-Get remove vim-
[Tab]
Vim-addon-manager vim-Doc vim-gnome vim-Gui-common vim-full
Vim-scripts vim-tiny vim-GTK vim-runtime vim-syntax-GTK
Vim-vimoutliner
Method 2 based on the suggestions of netizens and their own judgment and constant attempts, the following two points are the key points:
In fact, this is not a problem with vim. For example, if you use konsole, it will be okay. This is actually a problem with gnome-terminal.
Link VI and VIM by default to the vim. Basic program to solve the terminal garbled problem after VI/Vim exits.
Sudo Update-alternatives -- config vi
Sudo Update-alternatives -- config Vim
Lingyun @ Lingyun:/Media/movie/music/$ sudo Update-alternatives -- config Vim
There are 3 alternatives which provide 'vim '.
Selection alternative
-----------------------------------------------
1/usr/bin/Vim. Tiny
2/usr/bin/Vim. Basic
* + 3/usr/bin/Vim. gnome
Press enter to keep the default [*], or type selection number: 2
After gvim is installed, both VI and Vim are connected to/usr/bin/Vim. gnome by default.
Refer:
Http://www.linuxsir.org/bbs/thread225352.html
Http://forum.ubuntu.org.cn/viewtopic.php? T = 122314 & SID = 683901a07192d57b8c10691b44b0ea2c
Http://forum.ubuntu.com.cn/about47661.html
Http://blog.upsuper.org.cn/solve-the-problem-of-terminal-becoming-messy-after-exit-vim/