how do you edit the last command in sql* under unix? when i do ed i get into a mode that i can't get out of. How does it work, its a bitch since most of the del/backspace keys aren't working for me.
sonny that editor is vi. some simple vi commands, since I am not an expert in vi but able to make simple edits. keys you start in regular mode, you can't edit this way. If you want to delete a character you move the cursor to that character with the arrow keys. Then you press the 'x' key and it will delete that character. the 'd' key twice will remove the entire line. To add characters you need to go to insert mode. The 'i' key will put you in insert mode, now here is the tricky part, you will stay in insert mode until you press the 'esc' key, which takes you out of insert mode. When you are in insert mode you can't use any opther keys, like the 'x' to remove a character, if you are in insert mode and hit the 'x' key and 'x' will appear in your text. Now the last thing to know is to exit you need to be in the regular mode. the you press the shift and then the ';' key, then you will put 'wq' in the screen and it will exit you out of vi and back into sqlplus with the new statement. Mark
Now the last thing to know is to exit you need to be in the regular mode. the you press the shift and then the ';' key, then you will put 'wq' in the screen and it will exit you out of vi and back into sqlplus with the new statement.
Just for the record ;-) After you have pressed the shift you should then press the ':' key Rene [ October 31, 2002: Message edited by: Rene Larsen ]
Lipman Li
Ranch Hand
Joined: May 02, 2002
Posts: 122
posted
0
Originally posted by Rene Larsen:
Just for the record ;-) After you have pressed the shift you should then press the ':' key Rene [ October 31, 2002: Message edited by: Rene Larsen ]
very funny, in my keyboard, ':' and ';' are located in the same key. vi is the favorite editor for UNIX guys, even there's a lot IDE like editor available now. actually, you could edit a file much faster by using vi than other GUI editor. If one person could use vi very skillfully, He probably is UNIX knowledgeable. last time, I interview a candidate to ask him to edit a file by using vi, as he declare he is very familiar with UNIX.