At the beginning, after Ubuntu is installed, garbled characters will be displayed after you exit with vim. This is because Vim of Ubuntu is linked to/usr/bin/gnome by default, this is different from the usual vim, so if we need to use the usual vim and solve the garbled problem after Vim exits, we must link Vim to our commonly used vim. basic, the steps are as follows:
1. Use apt-get to install the vim package. The vim-gnome package is installed by default. The command is as follows:
Sudo apt-Get install Vim
2. After the vim package is installed, there will be a Vim. Basic file under/usr/bin/. Then, we need to link Vim to this file. The command is as follows:
Sudo Update-alternatives -- config vi
3. select the option to be linked
4. after the selection, click vim and run the following command:
sudo Update-alternatives -- config Vim
5. in this way, the vim link will not be garbled.