Emacs uses command key combinations to perform word processing tasks. When you read Emacs documentation you will see commands beginning with C- or M-. These are the Control key and the Meta key. On most PCs the Meta key is the Alt key.
emacs
at a terminal command line oremacs -nw filename
, the -nw switch must be the first switch you use. You will be using a text only interface, but all the keystroke commands will be the same. You may have some difficulty with M- commands when using TeraTerm because Alt opens the terminal's menu. To work around this you can use Esc. Esc has the advantage of being sticky – you don't have to hold it down.
#include<iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; }Do you notice anything about how that was formatted? By default Emacs enforces GNU style C++ formatting.
Congratulations! You have created a file called world.cpp by using Emacs. More practice will definitely prepare you better for the semester. Good Luck with Emacs!
This is just the beginning. Emacs is VERY powerful. It can edit multiple files simultaneously, do complex search and replace, and even run Lisp programs. For more information on Emacs, see the following references: [an error occurred while processing this directive]