You are not logged in.
After updating the system with pacman -Syu vi stopped working. All syntax colors are gone, and everything is grey. When I press i to enter "insert" mode, editing is not visible. Changes are obscure and you can't tell what you are modifying. Quitting with :q will still prompt you to use :q! to abort changes, even if no changes were visibly made.
When scrolling to the beginning or end of a file, the screen flashes with grey glitch like areas. What happened to my vi!?!?!?!?!?
This all happened while following the beginner's guide to install arch linux. I realized this when trying to arbitrarily read a test file I made directly after updating.
The problems continued to be visible when installing and setting up sudo (those steps are the next steps that require vi)... I think the sudo installation worked... but my vi is horribly glitchy
Any ideas?
Last edited by trusktr (2010-02-19 07:19:55)
joe@trusktr.io - joe at true skater dot io.
Offline
What you are now experiencing is vi. What you did have was vim labeled as vi from the install media. Install vim and you can have all of those wonderful features back again!
If you want to know more you should be able to find threads about it, it comes up fairly frequently.
Last edited by jac (2010-02-19 00:17:21)
Offline
hehe gotcha! yeah i looked at a manual for the original vi, and it's a lil bit more confusing! like in edit mode (i) you can't go past the last character so i was stuck trying to figure out how to continue a line... then I learnt the "a" command to append more characters at the end of a line...
Ok, so after re-installing vim with pacman -S vim how do i re-issue the vi command to be used for vim?
Last edited by trusktr (2010-02-19 00:45:17)
joe@trusktr.io - joe at true skater dot io.
Offline
You can add this to your .bashrc
export EDITOR="vim"
Or just type "vim <file>"
Offline
Setting EDITOR does not help in every case. For instance, visudo is by default hard linked to vi. (You can change this, I know. )
But in fact, vi is only a symlink to ex. So I simply renamed this link and put another symlink to vim (vim-big in my case since I in fact do use the gvim package).
/usr/bin/vi -> vim-big
/usr/bin/vi-simple -> ex
The drawback is that I have to set those links on every vi-update. (But I sure will remember...)
Last edited by bernarcher (2010-02-19 00:58:57)
To know or not to know ...
... the questions remain forever.
Offline
thanks you guys, i guess i'm just gunna settle with the vim <file> command. What's an extra lil m gunna do? hehe
joe@trusktr.io - joe at true skater dot io.
Offline
It's worth setting it, either as I or bernarcher has suggested. There are times when, for example, you need to edit a PKGBUILD and it will default to your $EDITOR.
Offline
well noted! thanks
joe@trusktr.io - joe at true skater dot io.
Offline