![]()
![]()
![]()
![]()
Working with emacs
You will probably start working with emacs by editing some existing text files, rather than using it to create new documents. With that in mind, the first commands to learn are navigation.
The arrow keys on the keyboard work for moving around one line or one character at a time, but it is handy to know some keyboard shortcuts to jump around more efficiently.
NOTE : Key combinations with the Control key are pressed simultaneously, but for combinations with the Escape key press [Esc] first and then the other key.
- Move to the Top of the file:
[Esc] <- Move to the End of the file:
[Esc] >- Next screen (page down):
[Ctrl-V]- Previous screen (page up):
[Esc] V- Start of the current line:
[Ctrl-A]- End of the current line:
[Ctrl-E]- Forward one word:
[Esc] F- Backward one word:
[Esc] BType and Delete
Once you can move the cursor to the location in the file where you want to do some editing, you can just start typing - just like in an ordinary word processor. The delete key should work to remove characters and inserted text will push existing text over.
Cut, Copy, and Paste
The next thing to learn is to copy and paste blocks of text.
First you set a mark - either at the beginning or the end of the block of text that you want to cut or copy - then move the cursor to the other end of the block of text and use the delete or copy command. If you are copying, then move to the location where you want to paste and hit the paste command.
- Set a mark:
[Ctrl-spacebar]or[Ctrl-@]- Delete:
[Ctrl-W]- Copy:
[Esc] W- Paste:
[Ctrl-Y]The built in emacs tutorial goes into this in much greater detail. That will be a big part of the exercise for this lecture. Just login to the RCR's server with a telnet program, type "emacs" and then type
[Cntl-h] tto start the tutorial.
![]()
![]()
![]()
![]()
Using Computers for Molecular Biology
Stuart M. Brown, Ph.D, RCR, NYU Medical Center Comments to: browns02@mcrcr.med.nyu.edu