You are here

Emacs, LaTeX and ESS: Shortcuts for Beginners

A list of most frequently used Emacs keyboard shortcuts are given. Shortcuts for Emacs and also for ESS are listed. This file will be updated as I learn more about Emacs and ESS. I was inspired from this site to create this page. I plan to provide more useful shortcuts suitable for those who have just started using Emacs.

Emacs is a general purpose programming editor. Statisticians mostly use it for typesetting LaTeX and running statistical packages such as R, Splus, Stata and SAS.

Opening and Closing Files

Crtl+X Crtl+F to open file.
Crtl+X Crtl+S to save file.
Crtl+X S to save all open files.
Crtl+X K to close file (also known as killing the buffer)

Viewing and Window Management

Ctrl+X K to close a window (same as closing a file).

Ctrl+X 1 to have a bigger workspace.

Crtl +X 2 for horizontal splitting.

Crtl +X 3 for vertical splitting.

Crtl +X O for switching cursor from one pane to another.

Editing (Copy, Paste)

Ctrl+Spacebar begin selection
Ctrl+G cancel selection
Crtl+W cut selection
Ctrl+K cut a single line
Ctrl+ Y paste selection (or whatever cut)

Emacs and ESS

Ctrl+C Ctrl+N sends the current line to R buffer
Crtl+C Ctrl+C sends current para to R buffer
Crtl+C Ctrl+B sends entire codes to R bufer
Alt +; to insert comment before a selected block (also used to remove comment)
Alt+1 Shift+Alt+1, then type date to insert date in the current buffer at the position of the cursor.

Useful External Links

Masudul Haque (Torun)
A link from U of Victoria, Canada