Dolev wrote: »
knowing how to work with vi is essential for any purpose and not just for the exam.
be prepared for a situation where emacs will not be available for you.
you could also try nano, it's easier than vi.
My approach is to be prepared for the most minimalistic installation of RHEL on the test machine and to be able to handle this kind of situation
UnixGuy wrote: »
I'm gonna agree with the "know your VI" comment. Essential for the exam, and for your career in Linux/Unix. Just get used to it, it will be easy
haziz wrote: »
In real life I have full control on my Linux machines and I always make sure emacs is the first program installed after a fresh Linux install. I am very comfortable with emacs which I use from the CLI not from it's graphical UI; it is my standard text editor as well as my IDE when doing any C programming. I do know the very basics of using vi just in case.
UnixGuy wrote: »
That's good but in times of trouble, there will be no emacs. For example, if the machine is down and you need to go to single user mode for maintenance, then emacs won't be there. If you get a job in the future to work with Unix derivatives like Solaris and AIX, chances are Emacs might not always be there, but VI is definitely there
You don't really to know all the options in VI, just very few really. These happen to be the most options that I use (need) anyway:
1. wq! or wq or q! <== to save a file or quit after editing
2. cw <== 'change word' to replace a word when u edit and write
3. r <== 'replace' a character
4. dd <== 'delete' an entire line
5. x <== 'delete' one character
6. yy then pp <== yank (copy one line then paste it)
those are enough, you can do everything with them if you want some more
1. 0 <== gets you to the beginning of a line
2. $ <== gets you to the end of a line
3. :5 <== gets you to line number "5'.. ( :n ) <== gets you to line number "n" .... (:$) <== gets you to the last line