Vim Terminal Editor

vim Home Page

Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as “vi” with most UNIX systems and with Apple OS X.

Opening a file to view text contents

In the terminal:

$ vim <filename>

Edit File Contents in Open File

  1. Press i which stands for insert
  2. Make edits to the file.
  3. Once done editing Press escape, :, then type wq which stands for write (save) then quit (exit vim)

Searching for Patterns in Open File

Reference

Steps

  1. Press / they type any pattern.
  2. Press Enter to move to the next instance of the pattern.
  3. Press Enter to move to the next instance of the pattern.
  4. Press n to move to the next instance of the pattern. Type N (Note: this is n and Shift) to move to the previous instance of the pattern.

Journal