Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Command-Line Text Editors

  1. vim

    • Powerful and Customizable

    • To open a file: vim filename

    • Enter Insert mode: i

      • Write anything once in insert mode

    • Save changes and exit: Esc, then :wq!, and Enter

[cwid@hostname /athena/labname/scratch/cwid ]$ vim demo.txt -- opens current or will create new text file

image-20240625-164440.pngimage-20240625-164343.png

Examples

Editing a Script with vim

  1. Open terminal.

  2. Type vim myscript.sh.

  3. Press i to enter Insert mode.

  4. Make your changes.

  5. Press Esc to return to Normal mode.

  6. Type :wq! and press Enter to save and exit.

  • No labels