If you like to use the arrow keys in vim/vi, you will quickly notice that Ubuntu appears broken. Welcome to vim compatibility mode.

It has always been broken this way in Ubuntu and this probably won’t change in the future.
(Be thankful they even keep the shell around!)
It’s just a setting that Ubuntu defaults to…
In vim, type this:
:set nocompatible
Better yet, stick it in the vimrc script in your home directory so you don’t have to remember to type it each time.
user@brokuntu:/$ echo “set nocompatible” >> ~/.vimrc
B
B
B
D
Goodbye alphabet soup hulk rage…
It works in ubuntu and fedora. It should work in any vim. Are you sure you didn’t have a typo? It works for me. It you start up vi and the first character you press is the colon, followed by “set nocompatible” without the quotes, and hit return, that should be all you have to do. If you typed it wrong you should see “Exxx: Unknown option:” with some random number instead of the x’s.
Starting up vi and typing it in manually will work, but the echo command won’t. The quotes must be removed to solve Stephen’s problem.
Should read:
echo set nocompatible >> ~/.vimrc
Stephen: if you already did the command with the quotes, just edit the .vimrc file (vi ~/.vimrc) and remove the quotes on the line that says “set nocompatible” (will be the only line in there if you don’t have any other vimrc commands saved)
Echo will eat the quotes. They will not show up in your .vimrc file. If you want echo to ouput quotation marks, you must escape them.
$ echo “hello”
hello
$ echo \”hello\”
“hello”
You might have mixed up the vi command with the echo command from a shell? Or maybe you’re using a shell other than bash?
Thanks! This is one of the things that annoy me every single time I set up a new machine. It’s not frequent enough to let this hint stick to my brain though - maybe next time :)
thank god…isht was driving me crazy…thank you
5:59 am
umm this gives me an error of
Not an editor command: “set nocompatible”