Emacs and Perl

Although there are many editors out on the market. Sometimes the old standards still have a lot to offer. Will talked about Emacs, one of the old guard of editors from the Unix world.

He talked a bit about Emacs modes which allow customizing some of the behavior of the editor for a particular task. In particular, he introduced cperl-mode, which is the new and improved mode for writing Perl code.

Some of the keystrokes he introduced include:

  1. C-x is a command
  2. C-x 3 splits the window vertically
  3. C-x 2 splits the window horizontally
  4. C-x f opens the prompt for loading a file
  5. C-x o go to the other buffer
  6. C-x b allows you to select a buffer
  7. C-x C-b gives a buffer list
  8. C-x k kills a buffer
  9. C-x 0 kills the frame

The perl-tidy-mode automatically runs Perl::Tidy when a buffer is saved. There's also an org-mode that provides an organizer, calendar, list management, folding support, etc.

The ~/.emacs file is read at startup and can be used to configure the program when it begins. One use for this file is to add a local directory when modes can be loaded from.

Will explained that Esc is the Meta key. Some other important keystrokes are:

  1. M-x shell brings up a shell
  2. C-g clears out mini-buffer below
  3. M-< move to top of file
  4. M-> move to bottom of file

GNU Screen

Screen is a window manager that multiplexes multiple processes into one physical terminal. It is often used to work with multiple shell instances in one terminal. It's sort of like using the multi-tab mode of modern terminal programs. Particularly useful when operating on a remote machine.

Some useful Screen commands include:

  1. C-a - Switch to different window or blank window
  2. C-a c make a new screen
  3. C-a A rename a screen
  4. C-a 2 move to the second screen
  5. C-a C-a bounce back and forth between twwo screens
  6. -- can split screens
  7. C-a d detaches
  8. screen -R -d - attaches to whatever's out there
  9. M monitor the screen to tell you if something has happened or has stopped.