LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-31-2004, 11:59 AM   #1
wogga
Member
 
Registered: Apr 2004
Posts: 82

Rep: Reputation: 15
different versions of vi?


I was going through a book
"The complete idiot's guide to Linux "
good for newbies

i was going through the basics of vi
it says shift+h places teh cursor at the begining of the file
shoft+l takes you to te last line of the current file.

however when i tried it out
i found that shift+h goes one character left and shift+l goes one character right.

are there different versions of vi?
 
Old 05-31-2004, 12:17 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: different versions of vi?

Quote:
Originally posted by wogga
I was going through a book
"The complete idiot's guide to Linux "
good for newbies

i was going through the basics of vi
it says shift+h places teh cursor at the begining of the file
shoft+l takes you to te last line of the current file.

however when i tried it out
i found that shift+h goes one character left and shift+l goes one character right.

are there different versions of vi?
There are and at times some distros don't even use or install vi any longer, they might link to another program instead, like joe or jed, etc. One of the many other editors and many vi clones as well out there. What distro are you using?
 
Old 05-31-2004, 12:21 PM   #3
wogga
Member
 
Registered: Apr 2004
Posts: 82

Original Poster
Rep: Reputation: 15
i am using redhat 9.0
why dont they standardize vi for heavens sake
 
Old 05-31-2004, 12:24 PM   #4
wogga
Member
 
Registered: Apr 2004
Posts: 82

Original Poster
Rep: Reputation: 15
i just came across pico, pico does not seem to come with redhat 9.0, (at least bash is coming back with an error),

is pico widely used, maybe i should go for mandrake 10.0, does mandrkae 10 have good editors.

do you know where i could find the md5 for mandrake 10?
 
Old 05-31-2004, 12:30 PM   #5
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
Quote:
Originally posted by wogga
i am using redhat 9.0
why dont they standardize vi for heavens sake
if you are running RH, then when you vi filename, you are running vim, not vi. that is why some of the commands are not working exactly as they should for vi.

as root you can unalias vi, then when you vi filename you will be in VI, not VIM.

hope that helps a bit.

from what i have seen, all distros come with vi, but more and more are aliasing to vim.
 
Old 05-31-2004, 02:56 PM   #6
wogga
Member
 
Registered: Apr 2004
Posts: 82

Original Poster
Rep: Reputation: 15
newbie question
what is "aliasing to vim."
 
Old 05-31-2004, 03:51 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
To have something like
alias vi='vim'
in /etc/profile


man bash
/ALIAS
for details


Cheers,
Tink
 
Old 05-31-2004, 04:05 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
alias does what the word is actually defined as: also known as; otherwise..

Say your name is Andrew but you go by Drew, that can be considered an alias.

So in the world of Linux and Unix, when you alias a command, it just simply means its referring to another command, etc. Its an easy way to make one command function as another.

Say when I type ls -al to list all files in a directory but I'm lazy and wanted to type ls and get the same output, I would do a:

alias ls='ls -al'
 
Old 05-31-2004, 04:35 PM   #9
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
If you do "type -a vi" it should tell you if your vi is an alias to another application.

It could, however, be a symlink to another application, in which case type won't help. If "type -a" comes up with something like "/usr/bin/vi" you can then do "ls -l /usr/bin/vi" to see if it's a link.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
So many versions Antilocust Linux - Newbie 6 12-23-2004 12:37 AM
Mandrake 10.1 versions!? linuxmdknew Mandriva 8 11-10-2004 12:55 PM
versions rose Linux - Wireless Networking 2 10-11-2004 10:49 AM
4 qt versions? cratos Linux - Software 1 12-14-2003 02:44 PM
Versions cmenjivar Linux - Newbie 3 08-29-2001 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration