Solution 1: The direction keys and backspace keys cannot be used normally in ubuntu vi. In ubuntu, the direction keys cannot be used in the editing status, the Return key cannot be deleted.
Solution: you can install the vim full version. In the full version, the keyboard is normal. After installation, use the vi command. Install vim: ubuntu is pre-installed with the vim tiny version, but the vim full version is required. Run the following statement to install vim full: $ sudo apt-get remove vim-common $ sudo apt-get install vim. vim is an excellent software, it can be seen in application. Solution 2: run the ": set nocompatible" command on the vi command line to set the vi to be incompatible. In ubuntu11.10, the VI command has three modes: input mode and edit mode. ": "After the command mode vi enters, the default mode is edit mode vi editing mode. The default shortcut keys are j k h Lvi. In edit mode, you can use I to enter input mode vi. The input mode can only be in English, by default, the up, down, left, and right arrows in vi input mode cannot be used. You can use Esc to return to vi editing Mode Shift +; you can enter command mode vi command mode w save, q Exit 1) it is effective for all users and solves the problem of user vi Chinese garbled characters in the system sudo gedit/etc/vim/vimrc. tiny Add the following content: # the content of the file is shown as follows: "Encoding related set encoding = UTF-8 set langmenu = zh_CN.UTF-8 language message zh_CN.UTF-8 set fileencodings = ucs-bom, UTF-8, cp936, gb18030, big5, euc-jp, euc-kr, latin1 set fileencoding = utf-82) only valid for the current user solution ubuntu is by default in the current user's home directory, no. vimrc file. You can touch one file by yourself. vimrc file, and add www.2cto.com # The file content is shown as follows: "Encoding related set encoding = UTF-8 set langmenu = zh_CN.UTF-8 language message zh_CN.UTF-8 set fileencodings = ucs-bom, UTF-8, cp936, gb18030, big5, euc-jp, euc-kr, latin1 set fileencoding = hongzhguan, by UTF-8