When I enter mode in vim, all control keys (like arrow keys, delete keys etc.) produce characters instead of expected control behaviour. How can I change this? Thanks :)
-
Works for me. Can you post the contents of /etc/vim/usr/share/vim/vimcurrent/debian.vim, /etc/vim/vimrc, and if present ~/.vimrc? You can use a link to paste.ubuntu.com instead of pasting everything into your question.– htorqueCommented Dec 6, 2010 at 12:40
-
create a blank ~/.vimrc and restart vim. does that help?– karthick87Commented Dec 6, 2010 at 12:55
-
Lol, I only had Vi and just installed Vim. Now it works perfectly.. don't know if there is still something to post or to be solved now :s thanks for the help :)– LucasmusCommented Dec 6, 2010 at 12:59
-
Heh, don't worry - such things happen! :) IIRC you can close/delete your own questions.– htorqueCommented Dec 6, 2010 at 13:35
Add a comment
|
2 Answers
Try installing vim
, instead. This is the default behavior of vi
. If you have vim
installed, the best way to get vim behavior is to touch .vimrc
in your home directory.
-
Now that's a revelation. I had the same problem, and after reading this answer, I checked whether on my system it's vi or vim by starting vi with no filename given. The welcome screen clearly stated "vi improved". I then found out that this is actually from the package "vim-tiny". After installing vim everything works as expected. However I don't understand how Ubuntu cannot provide a properly working version of vim in the default install. :-(– AxelCommented Nov 2, 2012 at 20:06
-
This may happen if
- you're actually using old vi not vim
vim doesn't recognize or know your terminal type. in the shell you invoked vi from, type
echo $TERM