Using ‘ee’ to edit files in FreeBSD

When you install FreeBSD, you have a choice of two editors… vi or ee – vi is, for most people, over complicated and scary… so here’s a brief introduction to using ee.

To edit or create a file, you issue the command

ee /path/to/filename.txt

This will bring you into an interactive editor.  You can use the cursor keys to move around and type wherever the cursor is.

At the top of the window, you will see a list of commands.  These are all prefixed with a “^” symbol – this means the Control key.

To do a search, it says to use ^y – press Ctrl Y and type the text you want to search for.  To repeat the last search, press Ctrl X.

To save and exit a file, press ESC then enter twice.  To exit without saving, press ESC, enter then select no save and press enter.

It takes a little getting used to, but it’s a very simple editor and definitely the easiest choice for you in FreeBSD.

4 thoughts on “Using ‘ee’ to edit files in FreeBSD

  1. Steve

    Have you ever heard of the entire page text being deleted after the key input jams up? Ever?

    I’m running openbsd from a USB key and ee in an xterm in fvwm.

    I can’t see which flood of key combinations would lead to a full page delete.

    Reply
    1. dan Post author

      hmm not sure on that one… only thing i could think of would be repeating of the delete line key, which would delete to the end of the file if kept down.

      Reply
  2. ee Lover

    If the cursor were in the home position and Ctl-Y is held, the entire document would be deleted, line by line.

    Reply
    1. dan Post author

      That will work under Linux but not FreeBSD. FreeBSD has different key mappings for ‘ee’ (it’s Ctrl-K in FreeBSD to delete a line)

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *