If you are running emacs in Microsoft Windows or the Mac, just use your mouse and pull menus.
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?.
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.
In a text terminal, you can invoke the textual menu by pressing 【Alt+`】. (or, pressing the Esc key followed by the backtick ` key.)
emacs -nw ‹filename›. The “-nw” launches emacs without graphical window system.
To save file, press 【Ctrl+x】, then 【Ctrl+s】.
Type: 【Ctrl+x】 then 【Ctrl+c】.
To quit without saving, just do quit and emacs will ask if you want to save.
If the keys you press seem to do weird things, then, hold down Ctrl then press g. This will cancel the sequence of keys you may have pressed by mistake.
Congratulations! You have obtained the Mastery of Emacs Basics!
With the above, you can edit any text file. Now, you can learn how to do search/find, find/replace, and new shortcuts for efficient navigation. Goto Emacs Intermediate Tips.blog comments powered by Disqus