Solve the problem of garbled characters after Vim exits under the terminal in Ubuntu.
Source: Internet
Author: User
After Ubuntu is upgraded to 7.04, it finds a strange problem. after executing vi or vim on the terminal and exiting, the terminal prompt and subsequent input will become garbled, however, gvim is not a problem. At the beginning, I thought it was a terminal encoding problem. I had to wait a few times and failed.... information &
After Ubuntu is upgraded to 7.04, it finds a strange problem. after executing vi or vim on the terminal and exiting, the terminal prompt and subsequent input will become garbled, however, gvim is not a problem.
At first, I thought it was a terminal encoding setup problem. I had to wait a few times and failed. so I guess it was a version upgrade problem and I didn't want to spend any time studying it. I guess I can fix it next time. This has been dragging on for half a year. during this period, Emacs can be used for Emacs, and gvim can be used for simple editing.
Today, I want to check the syntax highlighted in vim. I found that the symbolic link in Ubuntu is used very well. a lot of commands are configured through the symbolic link in/etc/alternatives. Then I found that both vi and vim are linked to the/usr/bin/vim. python Directory. check whether the basic vim is also linked to this directory. I am thinking, there should be a vim that implements basic functions. Apt-cache, I found that I did not install the "vim" package. The existing systems are installed with additional extensions, such as vim. python, vim. ruby, vim. gnome, and so on. Www.2cto.com
OK. after installing the "vim" package, there is one more/usr/bin/vim. basic program, by changing the settings, link the default vi and vim to vim. basic this program solves the terminal garbled problem after vi/vim exits.
1. sudo update-alternatives -- config vi2. sudo update-alternatives -- config vim. Therefore, you do not need to start gvim and emacs to edit some small things. Author dirk
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.