LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-13-2014, 12:17 PM   #1
VaultTec
LQ Newbie
 
Registered: Sep 2014
Posts: 4

Rep: Reputation: Disabled
a question about vi editor


Hello guys,

I recently installed two systems - one RHEL 6.3 and Debian 7.
When I open text files with VI in RHEL I manage to navigate with the arrows, but when I try the in Debian it doesn't work, instead I need to use the letters [hjkl]. is there a difference between the versions?
Is there any way I can make it work like in my RHEL distribution?

Thanks in advance
 
Old 10-13-2014, 02:09 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
install vim on Debian.
 
Old 10-13-2014, 06:49 PM   #3
Fred Caro
Senior Member
 
Registered: May 2007
Posts: 1,007

Rep: Reputation: 167Reputation: 167
Yes the default vi on debian is "tiny" and does not have full set of features. You could try emacs (!!??).
 
Old 10-13-2014, 06:54 PM   #4
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
I am sure there is a command which advises what you are running when you type "vi". Like I am pretty sure under fedora I am actually running "vim" so there must be a mechanism (directory listing, alias, environment) which can confirm this.
 
Old 10-13-2014, 08:25 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
Some distros alias "vi" to "vim," so, when you enter the "vi" command, "vim" is what actually runs, even though vi might be present on the hard drive.
 
Old 10-13-2014, 08:38 PM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by timl View Post
I am sure there is a command which advises what you are running when you type "vi". Like I am pretty sure under fedora I am actually running "vim" so there must be a mechanism (directory listing, alias, environment) which can confirm this.
Yes there is! I learned that command today.
Code:
readlink -f $(which vi)
And yes, Debian installs vi and you have to install vim to get the features you are used to.

jlinkels
 
1 members found this post helpful.
Old 10-13-2014, 09:35 PM   #7
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
Quote:
readlink -f $(which vi)
Wonderful. And for the curious, Fedora 21:

Quote:
/usr/bin/vi
raspbian

Quote:
/usr/bin/vim.tiny
Centos6 came up with an error. Something to look at.

Cheers
 
  


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
[SOLVED] Question in Vi editor Ajit Gunge Linux - Newbie 6 02-01-2010 12:21 PM
Question about Kate or another Editor FredJones Linux - Newbie 2 05-19-2008 01:45 PM
Nano Editor Question swamprat SUSE / openSUSE 7 01-17-2007 04:24 PM
vi editor wc question maelstrombob Linux - Newbie 2 11-09-2003 07:57 PM
vi editor question lpriyamb Linux - Software 4 09-23-2003 01:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 AM.

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