3 ms·
You learn emacs on 3 tracks: The text editor, the extensions, and elisp. Pick a use case you really want to get into (Editing code in language X) and dig into
by bitexploder 9y ago
You learn emacs on 3 tracks:
The text editor, the extensions, and elisp. Pick a use case you really want to get into (Editing code in language X) and dig into that one use case first. Or taking notes (Learn Org mode). But pick just /one/ use case to start your practice.
Learn the editor:
https://www.gnu.org/software/emacs/manual/pdf/emacs.pdf https://www.gnu.org/software/emacs/manual/pdf/emacs.pdf
Work through it up to chapter 9. Practice each command. There is (mostly) a rhythm. Memorize and emblazon the "describe key" shortcut into thy mind. Clear your mental desk and just do it for 30 minutes. It really isn't that bad, you just have to give it a little time and practice.
Packages / Modes:
There are a few packages in Emacs that are life savers. Get melpa working. Install and learn helm. Helm provides a completion buffer system for things like file selection and and commands. Helm is that /one/ thing I can't live without for extended Emacs usage.
Learn Lisp:
If this is going to be more than just a toe in endeavor, you need to learn lisp. When you learn the rudiments of elisp and build a couple of small modes or extensions for yourself or customize existing modes a little so many things about emacs just "click". Want to bang out some quick math or do a quick base 64 decode? An example document:
'''
This is a document where I am thinking.
Oh, I needed to do some quick math:
(- 2017 1980)[C-x e] -- result appears in Message area.
'''
Things and concepts not to miss:
CUA mode / block selection, macros (very easy and nice), regions, buffers, point, mark, registers. Things you might not think much about: The kill ring. Learn and read about the kill ring.
Final thought:
M-x = never remember all the shortcuts again. With helm doing fuzzy matching you only have to remember much easier to remember english names for things. Naming is consistent for modes too, so to start searching for "what was that Org mode shortcut?" Start typing 'org pro' oh yeah, org promote! [Whack enter] indents a sub tree in my notes. Then I usually remember the shortcut from there out because it is shown on the commands. M-x along with describe key are life savers as you can go from shortcut to function name and function name to shortcut and you can lazily search through commands and buffers. Helm makes buffers easy.
To summarize:
1.) Learn the editor Emacs and focus on editing on specific type of document (Markdown, Org, programming language). Follow whatever popular setup guide you find for document type X.
2.) Learn the extensions Emacs. Helm is a must-try.
3.) Learn elisp and get used to the idea you are in a giant lisp machine. Running lisp code /anywhere, anytime/ in your documents is awesome.
4.) Learn the little tips and tricks.
5.) Use evil mode if you must, but I have found being fluent in Emacs is great (iPython, for example, is very Emacs biased in its readline / shortcuts). Tons of other tools (mutt) will go with vim like bindings, so taking the time to be fluent in both means you are almost guaranteed to have the right shortcuts in your brain.
6.) I feel your pain about the shortcuts. I have it mostly down to 3: Emacs, Tmux, i3. I try to ram everything through that set of shortcuts, and then a small set of my tools I use a lot use vim bindings, and I am ok with that (mutt, mitmproxy).
- cryptarch 9y agoThank you for the well-thought-out and very helpful post, I feel like you've given me a model of thinking that will help me get started faster. Would you happen to have ideas about pinky-saving layouts/modifications to Emacs? I'm not quite ready to ascend to Dvorak layouts but anything short of that I'll try, I'll need to with the state of my fingers. It's my first week, so I guess I should read the manual instead of deep-diving without scuba gear and trying to manage with Evil-tutor and wishful thinking :') I'll start with Org mode, I've been meaning to move away from Google Calendar and into Org mode for months anyway. Thanks again :)
- alphapapa 9y agoI highly recommend general: https://github.com/noctuid/general.el https://github.com/noctuid/general.el It lets you easily bind keys in a vim leader-like way. For example, I use a macro that defines binds under a `M-SPC` leader key: (ap/general-define-key "fs" 'save-buffer) Now I can press `M-SPC f s` instead of `C-x C-s` to save a file.
- bitexploder 9y agoThat is a neat module. I will have to play with it. But C-x C-s is burnt into my memory now.
- bitexploder 9y agoIt really helps to go through the manual in order. It is a quick read. There is also a great GNU elisp intro -- https://www.gnu.org/software/emacs/manual/pdf/eintr.pdf https://www.gnu.org/software/emacs/manual/pdf/eintr.pdf Work through that before any other lisp resource. I found it he most authoritative. Caps to control is a life saver. I mostly roll with default key bindings. It just makes life easier. I don't have any hand issues. If you do you might rethink shortcuts .... Some folks are convinced key chording is not good for their hands, but I don't have an issue with it. I don't even notice it. Good luck if that is a concern, but Emacs is extremely customizable so that helps, but get at least some level of muscle memory for the default key bindings . Once you know what you use a lot and have the basics down you can figure out how to start customizing.