Emacs has over 10,000 built-in commands, and it also contains a complete LISP intrepreter that allows you to create any command you want.
- To open a new file called "test", run
$ emacs test
If test doesn't already exist, emacs will create a new file.
Type anything you want into the file.
Commands in emacs are usually a combination of Ctrl and other keys.
- Use Ctrl+X followed by Ctrl+S to save.
- Use Ctrl+X followed by Ctrl+C to quit.
For more, check out The CS 107 Guide to emacs
Seriously, take a moment to do this!! Much of what gives you comfort in an editor is just muscle memory, so you should plan on spending time this week just typing something, anything!
In coding, it is often necessary to jump directly to a particular line
number of your code file. For example, when the compiler complains that
you have an error on line 129, it is helpful to be able to jump directly
to line 129. In emacs you do this by pressing M-g g
M-g g 129
In coding, it is often necessary to search the file for a particular
word or phrase. For example, if you want to change the name of the
variable foo to be something more descriptive so that you will not lose
style points, like longest_string, you will want to search the file for
all occurrences of "foo". In Emacs you do this by pressing C-s
Then you would continually press C-s to move to the next occurence or C-r to go to the previous occurence. Back to contents