Go ahead and create a new file with name main.c. Right-click the file and open with Emacs. It should looks like this:
Now, type the following code.
#include <stdio.h> int main(int argc, char** argv) { printf("hello, world\n"); return 0; }
After you typed this code, it should look like this.
We need to save the file with this code. To do so, we need to type ctrl+x and then ctrl+s meaning that pressing ctrl and then x and then s while keep pressing ctrl. After successful save, you should see a message at the end of the editor in single line as follows:
Congratulation on modifying and saving the file using Emacs. Go ahead practice now!
Summary: Now you know how to save the file in Emacs - ctrl+x ctrl+s.



No comments:
Post a Comment