UNIX VI editor equivalent of LINUX

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
Operating Systems HP-UX UNIX VI editor equivalent of LINUX
# 1  
UNIX VI editor equivalent of LINUX

Hi All,

I am comfortable working in LINUX and need equivalents for HP-UX for below mentioned,

1. We use TAB key to expand/reveal a name in LINUX. Is there any way to make this work for UNIX, where it is double escape.

2. Also can we use make use of left,down,up,right keys instead of hjkl keys.

How to change these in VI editor. Please suggest.

Thanks a lot.
# 2  
Do you mean name completion?
That will depend of your configuration and environment, typically with ksh, you would have in your .profile:
export EDITOR=/usr/bin/vi

To see if its something of the sort you were thinking about, just type:
 set -o vi

And see if it works...
(Here its using Esc key twice...)

What's wrong with hjkl keys ? Smilie
This User Gave Thanks to vbe For This Post:
# 3  
- If I uderstood your need correctly, I'd simply say : "install 'bash' in your HP-UX box(es)" ;

good luck, and success.
alexandre botao

Last edited by zaxxon; 12-05-2011 at 08:51 AM.. Reason: removing url to OPs website
# 4  
Enabling the arrow keys, insert key, and page up/page down keys in "vi" has to be done in a ".exrc" file in your home directory. See "man ex". The contents of the ".exrc" file depend on your terminal (or terminal emulator). For the root account I have more than one saved version and copy the one which matches the value of $TERM.
First check whether you have a ".exrc" file already to see whether you are going to edit it or create it.

The format of a .exrc file is very basic:
map key_you_press key_in_vi
map key_you_press key_in_vi

The "key_you_press" is the exact control sequence generated when you press that key. The "key_in_vi" is the key (e.g. "k") you would press in vi to get that effect.

I don't know how to generate a ".exrc" file using "vi". I use "echo" to generate mine.
For vt220 control sequences:

echo "map \033[A k"
echo "map \033[B j"
echo "map \033[D h"
echo "map \033[C l"
echo "map \033[2~ i"
echo "map \033[5~ \002"
echo "map \033[6~ \006"
) >>.exrc

Last edited by methyl; 12-05-2011 at 12:09 PM..
This User Gave Thanks to methyl For This Post:
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #903
Difficulty: Medium
There are less than 10 million lines of code in the Linux kernel as of 2018.
True or False?

8 More Discussions You Might Find Interesting

1. What is on Your Mind?

What is Your Favorite Editor for Linux and UNIX? | A Video in 1080 HD

We have asked UNIX.com users over the years what is their favorite editor and why. Here is the top three answers. Here is a new YT video on this question: What Editor Does Everyone Use? https://youtu.be/gqE8RTZZt9g Of course, vi was the overwhelming favorite. Credits: 1080 HD... (3 Replies)
Discussion started by: Neo
3 Replies

2. Shell Programming and Scripting

Need Linux equivalent for UNIX

I have a folder called "log" which has a few sub-folders say "fda" "fd7" "fdd" "fd6 .... " I wish to fire the below command inside each subfolder starting with the folder with the latest time stamp. grep "$greptime.*exit" Prod.$(hostname).log | grep $fdrdate_new If the seach did not yield... (3 Replies)
Discussion started by: mohtashims
3 Replies

3. Red Hat

NFS_v4_fail_over_timeout equivalent in Linux

Hi, I need to mount a replicated nfs4 export on a number of AIX and Redhat hosts. To get the failover on the clients working smoothly, I need to change certain values on the AIX boxes like nfs_v4_fail_over_timeout, timeo and retrans values. Since I have no clue about Linux, I am not quite sure... (1 Reply)
Discussion started by: zxmaus
1 Replies

4. Linux

/etc/netmasks equivalent in linux

Hi Guys, I am used to configuring DHCP on Solaris and foreach subnet added I place a corresponding entry in /etc/netmasks. I am now looking at configuring DHCP on linux, is there an equivalnet entry required somewhere or is this not needed in linux Thanks (3 Replies)
Discussion started by: eeisken
3 Replies

5. Linux

Linux equivalent for...

I moved to a Linux system from Windows a few months ago. Most of the programs I had been using were already native to Linux (Firefox, the GIMP, Pari, etc.) and most others I found a close enough program (Crimson Editor -> gedit, Visual Studio -> KDevelop, Primo -> Morain's ECPP). Now I'm down... (1 Reply)
Discussion started by: CRGreathouse
1 Replies

6. UNIX for Advanced & Expert Users

ACF2 equivalent in Unix or Linux ?

In IBM Mainframe they have something called ACF2 rule which is essentially used to control the dataset access. It is kind of a list-based access control for mainframe datasets. Is there anything equivalent to ACF2 available in Unix ? Thanks Rabi (1 Reply)
Discussion started by: indra_saha
1 Replies

7. UNIX for Advanced & Expert Users

ufsdump equivalent in linux and unix

Hi all, I am preparing for a worst case scenario. Say i have a production server A, should A fails ( for whatever reason), i want another server B to take over. How can i move everything from A to B? Assuming i have regular backup of A. I've searched in the forums, and briefly came across... (4 Replies)
Discussion started by: new2ss
4 Replies

8. Linux

Linux equivalent for daemon2

Hi all... In my Unix system a program exists called "daemon2" which is responsible to enqueue program executions. For example, if I want to make the system to enqueue lpr executions for certain users, I call daemon2 with lpr as the parameter. Is there an equivalent in Linux? Thanks Jaime (0 Replies)
Discussion started by: jstuardo
0 Replies

Featured Tech Videos