LinuxQuestions.org
Help answer threads with 0 replies.
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, 01: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, 03:09 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,365

Rep: Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004
install vim on Debian.
 
Old 10-13-2014, 07:49 PM   #3
Fred Caro
Member
 
Registered: May 2007
Posts: 999

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

Rep: Reputation: 127Reputation: 127
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, 09:25 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,698
Blog Entries: 12

Rep: Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905
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, 09:38 PM   #6
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
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, 10:35 PM   #7
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 601

Rep: Reputation: 127Reputation: 127
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:21 PM
Question about Kate or another Editor FredJones Linux - Newbie 2 05-19-2008 02:45 PM
Nano Editor Question swamprat SUSE / openSUSE 7 01-17-2007 05:24 PM
vi editor wc question maelstrombob Linux - Newbie 2 11-09-2003 08:57 PM
vi editor question lpriyamb Linux - Software 4 09-23-2003 02:22 AM


All times are GMT -5. The time now is 10:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration