Ubuntu vi Acting Strange
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Thinking It Over
--
Chapters
00:00 Ubuntu Vi Acting Strange
00:27 Answer 1 Score 2
00:37 Accepted Answer Score 20
01:14 Answer 3 Score 0
01:39 Answer 4 Score 8
01:49 Thank you
--
Full question
https://superuser.com/questions/30829/ub...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#ubuntu #vim #textediting
#avk47
ACCEPTED ANSWER
Score 20
You're probably using the vim-tiny editor that doesn't support arrow key navigation in insert mode; Ubuntu 8.04 doesn't have the vim
package installed. Install this, and update your default version of vi:
sudo apt-get install vim
sudo update-alternatives --config vi
Select "vim.basic". You may also want to do this for editor (replace vi in the command above with editor) so the default editor called by other programs (like visudo) is also the right version of vim.
I also advise getting in the habit of hitting ESC from insert mode and using hjkl
navigation common to Vi/Vim, rather than using the arrow keys.
ANSWER 2
Score 8
another option is to remove vim-tiny:
sudo apt-get remove vim-tiny
and then reinstall vim:
sudo apt-get install vim
ANSWER 3
Score 2
aptitude install vim-full
The first thing I do on a new ubuntu install.
ANSWER 4
Score 0
You also might want to do some configuration:
$ cp /usr/share/vim/vimcurrent/vimrc_example.vim ~/.vimrc
$ vim !$ # and adapt it to your needs
The example vimrc has some useful settings and is a good starting point.
(note that you have to adapt the path for other systems, this is debian/ubuntu specific. On Systems that follow upstream vim installation more closely, it is /usr/share/vim/vimrc_example.vim
)