1 / 15

Unix Text Editors

Unix Text Editors. Creating files on the Unix system. Unix Text Editors. What is a text editor? Three popular ones exist here on miller pico emacs vi. Pico. Simplest to use of all text editors. Runs in existing window. Options and commands listed at the bottom of the pico window.

aulani
Télécharger la présentation

Unix Text Editors

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

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

  5. Pico Navigation • Does not support inline mouse clicking. • 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. Pico Editing • Inserting • Use arrow keys to navigate • Just type. • 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. Exiting Pico • To Save. Can save your work without exiting. Called ‘writeout’ • Ctrl-o • To exit: • Ctrl-x • 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. emacs • More powerful and has more features than pico. • More than just a text editor. Can be used as a development tool • Could take whole classes on emacs. • Looks much like MS Text. Has menu bar with familiar features and options.

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

  10. emacs navigation • 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. emacs editing • Inserting • Navigate with arrow key or mouse • Just type. • Deleting • [delete]: deletes backward. • Ctrl-d: deletes forward. • Esc-[delete]: deletes back one word. • Esc-d: deletes forward one word.

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

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

  14. Copying and Pasting. • 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. • Good way of copying long pathnames for cp and cd. • Useful for copying text from netscape and pasting into text editor.

  15. Reading • Chapters 12 - 15.

More Related