Can’t enter insert mode in Vi editor
Solution 1
Try the a key for the same -- INSERT -- operation. It should work just like i. AFAIK, it works on Ubuntu 12.04 and Raspbian.
Solution 2
Install Vim as it is an improved version of vi.
sudo apt-get install vim
To open a file with vim, you have to use vim command insteat of vi
vim abc.txt
Solution 3
first of all install this command in your ubuntu prompt :
sudo apt-get install vim
then after work the insert mode.
Related videos on Youtube
Xentius
Updated on September 18, 2022Comments
-
Xentius over 1 year
I am using the Vi editor on my desktop Ubuntu 12.04, and do no have any problems. But a few days ago, I installed the Vi editor to my beagleboard-xm which has both Angstrom and Ubuntu 12.04 available but noticed that I cannot activate the insert mode at both of the Op. Systems. How I understood that:
When I press i or I, I do not get a warning on the bottom, just
-- INSERT --
. But if I continue and if I press k, the cursor moves to the line above, and if I press j, the cursor moves to the line below. If I try to put a # to comment out something, the cursor moves randomly and according to warning written at the bottom: "search hit TOP, continuing at BOTTOM", etc. etc.How can I get into insert mode? Any suggestions?
-
devav2 over 11 yearsopen vi and try to set
:set showmode
. Then try "Esc - i(insert mode)" -
Xentius over 11 years@devav2 I tried what you suggested, first at the bottom -- INSERT -- warning has written but when I pressed the arrow keys that warning disappeared and same behavior continues.
-
-
MadMike over 10 yearsEven though your answer will work, it would be nice to know, why you suggest to install it.
-
bioinformatician over 10 yearsJust because, vim is an improved version, Simple.
-
MadMike over 10 yearsI know. I meant it as a suggestion on how to improve your answer. Please, hit the edit link on your answer and add the information there.
-
Martin Thornton over 8 yearsPlease edit your answer to explain what this does, and why you believe it to be a solution.
-
Iluvathar over 7 yearsIt's not "just like [i]" — [a] starts insertion after current character, while [i] inserts before current character.