where can i set editor option to yes


 
Thread Tools Search this Thread
Operating Systems Solaris where can i set editor option to yes
# 1  
Old 03-20-2008
where can i set editor option to yes

Hi all
I am new to this forum (just registered)
I need help from you guys
Even if it is a basic question please don't hesitate to answer.Any answer will be helpful to me

I am unable to get the previously entered commands by pressing uparrow
When i enered uparrow it is giving ^[[A
I got information from google like we should set the "editor" parameter to "yes"
But i am unable to find where to set this option

Thanks in advance
# 2  
Old 03-20-2008
Switch to bash or latest ksh93 for this to work.
# 3  
Old 03-20-2008
There are many options .....

... but the one I generall favour is to put a statement ...

set -o vi

.... in .profile or .kshrc for ksh users. You can then vi-editor controls to retreive and edit the command line. On the command line, you are in normal input mode until you press the escape button. You are now in command mode and can use the vi control buttons.

k - previous line
j - next line (if you have gone too far back)
h - left one character
l - right one character, yes that's l (lower case L) for right.
x - delete current character
i - insert before current character (back to input mode)
a - append after current character (back to input mode)
A - append to end of line
C - clear to end of line and back into input mode
D - clear to end of line (remain in command mode)


.... the list goes on, but these are the most useful. The arrow keys take on functions too:-

Up - Escape A, therefore append to end of line
Down - Escape B, back a "word" and into command mode.
Right - Escape C, clear to end of line and into input mode.
Left - Escape D, clear to end of line and into command mode.



I hope that this helps a bit.

Robin,
Blackburn,
Lancashire
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Command line / script option to filter a data set by values of one column

Hi all! I have a data set in this tab separated format : Label, Value1, Value2 An instance is "data.txt" : 0 1 1 -1 2 3 0 2 2 I would like to parse this data set and generate two files, one that has only data with the label 0 and the other with label -1, so my outputs should be, for... (1 Reply)
Discussion started by: gnat01
1 Replies

2. Solaris

Set i/o option

How do we set i/o option to direct or buffered i/o using mkfs command? I mean what is the option that is to be used.. Like that block size can be mentioned by using -o bsize=<> Thanks in advance. (2 Replies)
Discussion started by: aksijain
2 Replies

3. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

4. Solaris

How to set VI editor column size on Solaris?

I am setting the size using "stty columns 120" . But I still get the prompt saying "terminal too wide " when I am in vi. is there any time limit for this setting? how to set the column size to 120 permanently? Thanks in advance, Devi (4 Replies)
Discussion started by: pvkdevi
4 Replies

5. Shell Programming and Scripting

lynx browser set permanently option

hi all, is there somebody that know how can I set an permanently option for the lynx text browser? The reason is if I open some URL's and type my login infos then lynx show follow message: P)roceed, use G)ET or C)ancel Server asked for 301 redirection of POST content to URL: The UNIX... (1 Reply)
Discussion started by: research3
1 Replies

6. AIX

how to set AUTOCOMMIT option in AIX

Hi, Can anybody tell,how to set the auto commit option in AIX,i have tried with environmental variables option like 'export db2option=-c +a'. But its not working in my environment. is there any other option? (1 Reply)
Discussion started by: DB2AIX
1 Replies

7. Programming

which socket should socket option on be set

Hi all, On the server side, one socket is used for listening, the others are used for communicating with the client. My question is: if i want to set option for socket, which socket should be set on? If either can be set, what's the different? Again, what's the different if set option... (1 Reply)
Discussion started by: blademan100
1 Replies

8. Shell Programming and Scripting

set EDITOR=vi -> default editor not setting for cron tab

Hi All, I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by set EDITOR=vi it does not open a vi editor , rather it do as below..... ///////////////////////////////////////////////////// $ set... (6 Replies)
Discussion started by: aarora_98
6 Replies

9. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

10. AIX

How to set path for the EDITOR variable?

For some reason something has changing in my AIX environment where when I type: ACLEDIT filename ...I get: 3002-104 acledit: EDITOR environment variable must be full pathname I know I need to reset the EDITOR variables path to /usr/bin/vi but I can't remember the syntax anyone? (2 Replies)
Discussion started by: heprox
2 Replies
Login or Register to Ask a Question