Writing with Emacs and AucTeX part 2

Here I will describe some tips that I have learned during the period I have been trying Emacs. But again, I recommend Vim if you want to be efficient, although the choice of your text editor might depend on your habits, your relationships or people who influence you. I won’t repeat some features already pointed earlier in the first part of my post, so if you want to get information about snippets, abbrev mode and completion-ui, look at the first part.

For the following basic tips I assume that you use the configuration I have set and briefly described previously. If you don’t want to use my configuration and are a beginner, then use easymacs. To use it, look here.

C-_ : undo
C-x C-_ : redo

Notice that C-* means to press the control key and the * key. Also for example if you want to redo something, you will have to press the control key and “x” in the same time, and then control key again with the _ key in the same time.

C-h m : list of command you can use in your buffer.
C-h k : to get help for a shortcut
C-h f : help to describe a function
C-space or C-@ : sets a mark to mark a block of text

Notice that if you use ibus to write in japanese, chinese, arabic or any other language, you will have to use C-@, since C-space is a shortcut calling ibus.

Ctrl-v : page forward
Esc v : page back
Esc q : fill (reformat) paragraph
ESC x : allows you to enter a command by spelling it out (typing a space will complete a non-ambigous partial command)
C-c C-c : compile
C-c C-v : viewer
Time-stamp: : writing it at the beginning of a file allow you to get the last time when saved your file

Notice 2 things. The first is that C-c C-c will compile your files with xelatex since it is the way I compile all my files. Secondly, writing Time-stamp: is useful if you want to know easily the date when you last modified a file. And if you want to use it, you should write a snippet to write it automatically with a template or a simple command.

C-w : cut
ESC w : copy
C-y : paste
M-^ : merge two lines (or in other words delete indentation)
alt+shift+\% : replace
alt+shift+\%, replace, then if ! is pressed, all strings are replaced
C-i or C-q C-i : indent
C-z : minimize the window

Notice that I have used C-z with Gnome (Ubuntu 10.04), and I don’t know the effect in other operating systems like Microsoft Windows.

C-c C-c : compile
C-c C-v : view with evince the pdf produced after you compiled the file
C-x C-c : quit emacs
C-x C-s : save your file
C-x C-f : open a new file
M-x dired : open the file browser in emacs

Notice that these commands are the basics, and if you don’t know the basics you should look at the following websites :
An Emacs introduction course
A quick guide
Emacs basics
The Emacs wiki
A really good tutorial
A reference card
For french users look here and also here
A page from the FreeBSD developer’s handbook
Finally, if you are interested in ESS, look here.

The following is a brief description of what you can do with my configuration (since I don’t use anymore Emacs, I may have forgotten some things I have done) :

  • Compiling with Emacs will be done automatically with XeLaTeX (the default compiler)
  • ispell is configured for english and french
  • you can configure your own pdf viewer, but default is evince
  • there is a template system, with yasnipets.
  • you can use gnuplot in emacs (see the first part of this post for more details)
  • there is a tabbar to easily switch from a buffer to another one and see them
  • you can see all recently opened files in the menu
  • you can get fullscreen
  • you can get abbreviation working with Emacs, and auto-completion
  • there is a time stamp system to insert time at the beginning of the files
  • and maybe some others things that I don’t remember

In any case, I prefer Vim, and I think that auto-completion with Vim is better, and abbreviations easier to configure.

Advertisements
  1. I usually don’t post in Blogs but your blog forced me to, amazing work.. beautiful …

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: