Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Unix Text Editors Creating files on the Unix system.

Similar presentations


Presentation on theme: "1 Unix Text Editors Creating files on the Unix system."— Presentation transcript:

1 1 Unix Text Editors Creating files on the Unix system.

2 2 Unix Text Editors What is a text editor? What is a text editor? Three popular ones exist here on miller Three popular ones exist here on miller  pico  emacs  vi

3 3 Pico Simplest to use of all text editors. Simplest to use of all text editors. Runs in existing window. Runs in existing window. Options and commands listed at the bottom of the pico window. Options and commands listed at the bottom of the pico window. Use this text editor when working over telnet. Use this text editor when working over telnet.

4 4 Starting pico pico [file name] pico [file name] [file name] can be an existing file. [file name] can be an existing file. If [file name] does not exist, it will be created. If [file name] does not exist, it will be created. Pico opens in the existing xterm window Pico opens in the existing xterm window Just type in the window. Do not use the mouse. Just type in the window. Do not use the mouse. Use arrow keys and y and v to move up and down Use arrow keys and y and v to move up and down

5 5 Pico Navigation Does not support inline mouse clicking. Does not support inline mouse clicking. Use arrow keys, otherwise: Use arrow keys, otherwise:  Ctrl-p: move to the previous line.  Ctrl-v: move forward one page.  Ctrl-y: move backward one page.  Ctrl-w: to find  Ctrl-c: to show current line number

6 6 Pico Editing Inserting Inserting  Use arrow keys to navigate  Just type. Deleting Deleting  Ctrl-k: deletes the current line of text.  Ctrl-u: uncuts the last cut text.  Use the backspace key to delete character at a time.

7 7 Exiting Pico To Save. Can save your work without exiting. Called ‘writeout’ To Save. Can save your work without exiting. Called ‘writeout’  Ctrl-o To exit: To exit:  Ctrl-x May need to save your work. May need to save your work.  Upper right hand corner will show word modified if changes have been made. You will prompted to save file if modified.

8 8 emacs More powerful and has more features than pico. More powerful and has more features than pico. More than just a text editor. Can be used as a development tool More than just a text editor. Can be used as a development tool Could take whole classes on emacs. Could take whole classes on emacs. Looks much like MS Text. Has menu bar with familiar features and options. Looks much like MS Text. Has menu bar with familiar features and options.

9 9 Starting emacs emacs [file name] & emacs [file name] & ‘&’ allows you to run other programs and toggle between windows because emacs runs in its own window. ‘&’ allows you to run other programs and toggle between windows because emacs runs in its own window. [file name] can be an existing file. [file name] can be an existing file. If [file name] does not exist, will be created. If [file name] does not exist, will be created. Just type. Just type.

10 10 emacs navigation Use the arrow keys (if they exist), otherwise: Use the arrow keys (if they exist), otherwise:  Ctrl-f: forward one character  Ctrl-b: backward one character  Esc-f: forward one word  Esc-b: backward one word  Ctrl-n: next line  Ctrl-p: previous line  Ctrl-v: next screen  Esc-v: previous screen

11 11 emacs editing Inserting Inserting  Navigate with arrow key or mouse  Just type. Deleting Deleting  [delete]: deletes backward.  Ctrl-d: deletes forward.  Esc-[delete]: deletes back one word.  Esc-d: deletes forward one word.

12 12 emacs editing Killing & yanking. Killing & yanking.  Ctrl-k: kills from the cursor to the end of the line.  Ctrl-y: yanks the text back out of memory.

13 13 Saving & Exiting emacs To save your work To save your work  Ctrl-x Ctrl-s (normal command)  Ctrl-x Ctrl-\ (on the alphas) To exit emacs To exit emacs  Ctrl-x Ctrl-c  Will prompt you to save if necessary.

14 14 Copying and Pasting. When you highlight (anything) it automatically gets copied. When you highlight (anything) it automatically gets copied. When you center click it pastes whatever was previously copied. This works with text editors AND at the command line. When you center click it pastes whatever was previously copied. This works with text editors AND at the command line. Good way of copying long pathnames for cp and cd. Good way of copying long pathnames for cp and cd. Useful for copying text from netscape and pasting into text editor. Useful for copying text from netscape and pasting into text editor.

15 15 Reading Chapters 12 - 15. Chapters 12 - 15.


Download ppt "1 Unix Text Editors Creating files on the Unix system."

Similar presentations


Ads by Google