I am working on ubuntu 12.10, and my insert mode in vi isn't working.

enter image description here

When I hit i to go insert mode, nothing happens. On hitting i again writes i on terminal, but <-backspace doesn't remove the character. Only Delete works there. Do I need to configure anywhere?

  • 1
    did you try installing vim instead? either way it has to work – Stefan Feb 15 '13 at 6:39
  • Is this a local terminal session, or after connecting to another host? What terminal emulation would be in effect? – david6 Feb 15 '13 at 6:41
  • @david6 this is a local gnome-terminal session. – prayagupd Feb 15 '13 at 6:45
  • 1
    you're welcome, want me to answer it as a real answer as well? – Stefan Feb 15 '13 at 6:51
  • 1
    From the description, insert mode is working fine. The issue with backspace not working will just be due to the default vim being restricted to "vi compatibility" mode. Installing the "vim" package will remove that from the default config and let you use all vim features. – thomasrutter Jun 25 '15 at 6:19

Installing VIM will probably solve that issue

sudo aptitude install vim

it actually has to work though, it might be that compatibility mode is on therefore you will be in the insert mode but VI won't tell you.

Either way using vim is recommended, its basically V i IM proved.

| improve this answer | |
  • 1
    "sudo apt-get install vim" command worked fine. – Maninda Jan 11 '14 at 18:53

Its not that insert mode doesnt work. But the vi editor you are using is the older version and is different to use than our usual editors. Get updated version of vi editor by-

sudo apt-get install vim 
| improve this answer | |

@ terminal type vi hit enter, after that first press escape(ESC) key than press i now you can write into file . i think before you have not use vim and in starting press ESC key for prepare to write any data into file and CTRL+S to save it.

for closing file again hit ESC than SHIFT+; than wq and enter to close the file.

| improve this answer | |
  • 3
    When you start up vi, you start in normal mode, so there is no need to press ESC. Pressing ctrl+s will not save, but prevent any output from reaching your terminal window, and it will appear as if everything is frozen. Saving is :w – howardh Feb 15 '13 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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