HomeMathComputingArtsWordsLiteratureMusictwitter facebook webfeed

Emacs Basics

Advertise Here For Profit

Xah Lee, 2005, …, 2010-07

If you are running emacs in Microsoft Windows or the Mac, just use your mouse and pull menus.

Download Emacs

There are several prepared emacs you can download. For a short description and their download locations, see: Which Emacs to Download for Windows and Mac?.

emacs in OS X with GUI menu

Emacs in Mac OS showing the use of menu. Remember, real programers don't fear the mouse. Note that all keyboard shortcuts are shown beside the menu too. The “C-x” means 【Ctrl+x】.

Using Emacs In A Text Terminal

The following is a tutorial covering the basics for operating emacs by just keyboard.

Using emacs with only keyboard is critical to many programers and sys admins, because one important use of emacs is working on remote unix server machines thru terminal without a graphical system.

If you do not need to work on remote linux servers in text terminal, you can skip this section.

emacs text menu

Emacs in a Text Terminal.

In a text terminal, you can invoke the textual menu by pressing 【Alt+`】. (or, pressing the Esc key followed by the backtick ` key.)

Start Emacs

Type: “emacs filename”.

Save

To save file, press 【Ctrl+x】, then 【Ctrl+s】.

This means: holding down Ctrl key, press x, release them, then holding down Ctrl key, press s.

Quit Emacs

Type: 【Ctrl+x】 then 【Ctrl+c】.

Quit without Saving

To quit without saving, just do quit and emacs will ask if you want to save.

If the keys you press seem do weird things, then, hold down Ctrl then press g. This will cancel the sequence of keys you may have pressed by mistake, or it will cancel any current command.

Congratulations! You have obtained the Mastery of Emacs Basics!

blog comments powered by Disqus