My arrow keys don't work in vi in insert mode at home, they just each insert a newline and a capital letter, like 'A'. Is there a way to fix that?
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
- Null-terminated string, opening file for reading
I presume you're using vim as this is tagged as Linux. Try:
(You may want to configure your .vimrc with this by adding this command to it. Create a new .vimrc file if not already present in your home directory, run
echo $HOME
to check home directory path.)Yet another variation: this problem appeared for me after some .vimrc changes. A concerted search eventually revealed that my clever re-mapping of ESC in normal mode was not a good idea. Removing it solved the problem:
Ubuntu ships default with
vim-tiny
, which doesn't have all the bells and whistles that vim has.Do a quick
sudo apt-get install vim
to get all the juicy features that everyone's talking about.I had same issue with arrow keys, but when I used did that set nocp or nocompatible then my backspace didn't work correctly
for some reason when I installed vim with
sudo apt-get install vim
, vi didn't had any issues with arrows or backspace anymore:set term=builtin_ansi
fixed it for me. You can either paste that into vim while in escape mode, (bleep mode) or add it to the end of ~/.vimrc without the leading ":"
The only thing that worked for me was ":set term=ansi"