Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently I installed ubuntu in my laptop for using c programming. but when I open the terminal and typed vi test.c, It open it but it will not work properly. when i pressed backspace it will not work and when i press arrow key it will print some alphabets. What will i do to work properly. please anybody help for this related problem. thank you

share|improve this question
vi is very powerful but not very intuitive to use there is a turorial here or you can use another editor such as nano – Warren Hill May 10 '13 at 9:19

Type sudo apt-get install vim

in your terminal, this will solve your problem

share|improve this answer
Yes user is probably used to VIM which is much more intuitive and easier to use especially for programming since it can provide syntax highlighting. – brim4brim Jun 1 '13 at 18:41

By default, Ubuntu will install vim-tiny, a bare-bones version of vim. When you type vi in the terminal, it will start this minimal vim in vi compatible mode by default. From a normal vim user's standpoint, this is horrible, since vi compatible means backspace and all the normal vim behavior will behave in the original vi manner.

One solution is to open up .vimrc and turn off vim compatible mode by including the line: set nocompatible.

The other is to manually install more feature-filled version of vim (like the full version), e.g. sudo apt-get install vim. By default, on Debian-based systems like Ubuntu, this will make the command vi start vim up in non-compatible mode.

share|improve this answer

press the insert key to type/delete.

when you're finished editing, pressing esc will allow you to type commands like :wq (save and quit) or :q! (quit without saving)

share|improve this answer

Generally UBUNTU ships lite version of VI that most incomplete, especially with laptops. To resolve this easiest solution is to install FULL VERSION of VI Editor.

Use TERMINAL, and fire this

sudo apt-get install vim

provide password and it will definitely work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.