Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vi different between debian and redhat? 2

Status
Not open for further replies.

sillyVM

Technical User
Feb 14, 2007
144
US
Dear all,
I am having a lot of trouble maneuvering with debian using vi text editor. The insert and delete is the most confusing part, and sometimes it does random crazy stuff like copy the last character of a line for like 200 times.

I checked the VI version, seems like the one in debian (version 7.0) is actually newer than the one in redhat(version 6.3) i have. Why doesn't Vi work smoothly in debian? anyone can shed some light? And redhat is really expensive to maintain these days, compare to ubuntu-debian or other debians which are free and much easier to configure. What are your opinion about debian vs redhat?


Thanks,
 
I've become used to the vi commands. I used Mandrake for a long time and found that they seem similar. I've never run into the issue with the duplication, but that must suck. I basically use 4 commands...

INS - insert key
ESC - escape key to stop inserting
:w - write
:q - quit

So a power-user, I am not.

(This last part was for anyone not familiar with vi. Not trying to offend.)

Mark
 
Ahhhh, legacy VI behavior... such sweet silliness.

What you're fighting is a two-fold issue...

MOST linux distros are actually using VIM (vi enhanced)instead of VI...

AND Debian, in their eternal search for the sleekest, leanest, least-feature-packed default configuration have NOT elected to provide graphical command line output for commands and utilities that need it... namely 'ls' and 'vi'.

for instance, /etc/DIR_COLORS defines the color scheme...
Then, the 'alias' command is configured to solve the enabling with this string
alias ls='ls --color=tty'


So, building upon that example, consider the 'vi'/'vim'

The file that determines how 'vim' manages colors and behavior is /etc/vimrc... on RedHat, you just run 'vim' and it's good to go.

You may want to install 'vi-enhanced' for Debian.

Ultimately this is not a question of the goodness or lack thereof between Debian and Redhat (and Ubuntu and...)
It's about the choices the distribution makes in the defaul configuration of vi/vim

Googling will enrich you for sure on this topic... :)

Enjoy.
D.








D.E.R. Management - IT Project Management Consulting
 
actually the correct thing to do, unless you want to use kozusnik instruction for the old vi editor, is to use

Code:
update-alternatives --config editor

Debian, in fact, supports alternatives for a number of types of programs, including editors.
By default you will not have vim (for unknown reasons).

remember that Debian is always Debian, which means that it is highly customisable and, straight out of the box, is not likely to suit anyone's needs. On top of it, they seem to take pride in choosing weird default things.

QatQat

If I could have sex each time I reboot my server, I would definitely prefer Windoz over Linux!
 
hey QatQat it worked.

I am running a ubuntu 7.04 feisty fawn server. So it has a vim.nano installed as default. So I upgraded to a vim.basic

sudo apt-get intall vim

22.5mb not too bad. I guess the default server package from ubuntu really likes to keep it lean

then i used your code

update-alternatives --config editor

Now it moves like the way I am used to. But the default packaged way isn't too bad after a few weeks : )
THANK you very much once and again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top