Share |

Emacs, LaTeX and ESS: Shortcuts for Beginners

Emacs, ESS and latex tips
GNU Emacs splash screen
By Enayetur Raheem

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


Comments

Tanvir Khan's picture

Dear sir, how can I copy/paste text from emacs to another type of editor(say gedit or texmaker)? These things can be done by clicking mouse, but what are the equivalent keyboard shortcuts?

I haven't found a solution yet; will post if I find.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • LaTex commands embedded in text will be interpreted and rendered. Additional information can be found at DruTex Documentation Pages
    • Assists automatic numbering of tex, equation, and equations environments.
    • Provides different environments to create rendered images (especially maths).
    • You may use <swf file="song.mp3"> to display Flash files inline
    • You can use BBCode tags in the text. URLs will automatically be converted to links.
    • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal6>, <latex>, <rsplus>, <sas>, <text>. The supported tag styles are: <foo>, [foo].

    More information about formatting options

    By submitting this form, you accept the Mollom privacy policy.

Google Video

Loading...
Loading...