You are not logged in.

#1 2009-09-21 21:29:43

colbert
Member
Registered: 2007-12-16
Posts: 809

[SOLVED] Vi messed up on upgrade

I did an upgrade and got the error that /usr/bin/view already exists when trying to upgrade vi, so I removed vi and did a pacman -Suf of it, now trying to for example sudo crontab -e it is messed up, it keeps scrolling EOF and I have to kill the shell hmm

TIA for any help smile

Last edited by colbert (2010-02-16 03:20:18)

Offline

#2 2009-09-21 22:43:42

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: [SOLVED] Vi messed up on upgrade

Did you look at the news?

If I read right you no longer have vi installed at all? That is probably why crontab -e isn't working. Also pacman -Suf is generally a bad idea, since it will force everything. It's generally safer to only force packages that need to be (in this case pacman -Sf vi probably would have worked as well as removing the files as described in the news).

Last edited by mcmillan (2009-09-21 22:44:05)

Offline

#3 2009-09-25 23:58:27

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: [SOLVED] Vi messed up on upgrade

Thanks mcmillan, I'm kinda confused now though. I do have vi installed, but when I run it I just get

Screen too large for internal buffer
:

I don't have the vim package installed, however I still have /usr/bin/vim, and this causes an error when trying to install the vim package. Vim does work however, but I can't get it to be the default editor for sudo crontab -e ?? sad

Offline

#4 2009-09-26 03:00:19

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED] Vi messed up on upgrade

export visual in your ~/.bashrc

export VISUAL=vim

Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#5 2009-09-26 03:20:00

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: [SOLVED] Vi messed up on upgrade

Yes, I have done that.. I even did export EDITOR=vim as well as:

VIM=/usr/bin/
VIMRUNTIME=/usr/bin/

Which I saw from Googling. Vim is working just fine now, however visudo+sudo crontab -e are still using vi, and playing around now I see that I have to resize my terminal window as it complains of "Terminal window too wide" if I have it maximized (1920x1200 screen). Got to be a way around this!

Offline

#6 2010-02-15 21:07:15

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: [SOLVED] Vi messed up on upgrade

Still have never gotten this to work properly, I would appreciate anyone else's help!!

Offline

#7 2010-02-15 23:34:00

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: [SOLVED] Vi messed up on upgrade

colbert wrote:

Still have never gotten this to work properly, I would appreciate anyone else's help!!

The latest vi upgrade exists just to fix this "window too wide" problem.

Offline

#8 2010-02-16 02:59:28

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: [SOLVED] Vi messed up on upgrade

ataraxia wrote:
colbert wrote:

Still have never gotten this to work properly, I would appreciate anyone else's help!!

The latest vi upgrade exists just to fix this "window too wide" problem.

I just upgraded vi, and I can't see anything at the status line where it shows INSERT/REPLACE, etc. and when I manage to start typing within the file, hitting up/down/etc. gives A's and Bs in one position. Using double colon to do :quit! works, but the display is still kind of messed up. I can now get into the file without the window too wide error, but it's not working correctly in these respects. Appreciate any help smile

Offline

#9 2010-02-16 03:12:41

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: [SOLVED] Vi messed up on upgrade

As you were told before, use vim if you want these things. vi is very small, and it sounds like it's working the way it should.

If you have the problem that setting $EDITOR and $VISUAL is ignored when running something with sudo (like "sudo visudo" or "sudo crontab -e"), that's a sudo config issue. Set in your sudoers file:

Defaults env_keep += "EDITOR VISUAL"

and sudo will obey these variables.

Offline

#10 2010-02-16 03:20:08

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: [SOLVED] Vi messed up on upgrade

You rule!! That was it! Now sudo crontab -e and sudo visudo are opening vim, all is well.. whew! Thanks a lot mate smile smile

Offline

#11 2010-02-16 03:21:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: [SOLVED] Vi messed up on upgrade

Heh...  I just uninstalled vi and made a symlink from vim-normal to vi.

Offline

Board footer

Powered by FluxBB