LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   a question about vi editor (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-vi-editor-4175521981/)

VaultTec 10-13-2014 01:17 PM

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

suicidaleggroll 10-13-2014 03:09 PM

install vim on Debian.

Fred Caro 10-13-2014 07:49 PM

Yes the default vi on debian is "tiny" and does not have full set of features. You could try emacs (!!??).

timl 10-13-2014 07:54 PM

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.

frankbell 10-13-2014 09:25 PM

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.

jlinkels 10-13-2014 09:38 PM

Quote:

Originally Posted by timl (Post 5253355)
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

timl 10-13-2014 10:35 PM

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


All times are GMT -5. The time now is 04:51 PM.