Ⓔ Command of the Day (@ecotd) header
Ⓔ Command of the Day (@ecotd) profile picture

Emacs Wizardry, one command at a time | run by @_wilfredh

Joined April 2009
Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)Photo by Ⓔ Command of the Day (@ecotd)
Fun fact about the minibuffer: you can click it when it's inactive! This opens the *Messages* buffer. (Especially handy if you want to read messages that recently appeared in the minibuffer.)
1
3
16
Have you ever created a great keyboard macro, but wanted to add a few more keystrokes at the end? `C-u F3` will run the keyboard macro, and start recording any additional keystrokes until you press F4! gnu.org/software/emacs/manua…
6
26
default-indent-new-line: inserts a newline, but indents and adds a comment prefix! Before: // foo| After: // foo // | Super valuable for editing doc comments, and bound to M-j in the default config :)
3
9
`markdown-do`, bound to `C-c C-d` in `markdown-mode`, will conveniently align a markdown table!
1
6
18
Ⓔ Command of the Day retweeted
Uh this emacs region undo thing is kinda blowing my mind. I had no idea!
8
59
5
249
Do you have two buffers visible where you want to scroll both of them at once? scroll-all-mode allows you to move the same amount in every visible buffer!
10
29
Want to highlight a single piece of text ('region') persistently in Emacs? Secondary Selection is what you need! emacswiki.org/emacs/Secondar… This highlights a region of text and persists regardless of point or active region.
1
9
M-x rot13-region Applies ROT13 transformation to the selected text! (I've only had cause to use this once, but I was delighted Emacs had it!)
10
Did you know that you can trigger actions inside Emacs from other applications? org-mode allows you to define URLs like org-protocol://do-thing-in-emacs?key=value orgmode.org/manual/Protocols…
Another tip for string-edit: you can combine it with other major modes! For example, elisp-docstring-mode has custom highlighting for elisp docstrings: github.com/Fuco1/elisp-docst…
2
8
Command of the day: string-edit-at-point. This is super handy for editing the contents of strings: you can write " or newlines without worrying about escapes!
11
45
M-x google-this, part of github.com/Malabarba/emacs-g… Perfect for quickly search for information about APIs or errors that you can see inside Emacs! Just select the text and run the command.
1
4
1
19
Pressing e in a *Backtrace* buffer (bound to debugger-eval-expression) will let you evaluate local variables in that stack frame! Super useful when debugging.
Made a typo liek tihs? C-t (bound to transpose-chars) will switch the characters either side of point (the cursor)!
M-x github-clone This awesome command will clone a github repo from any URL format you can imagine. It can even automatically fork the repo for you, so you're all ready to send pull requests! The package is at github.com/dgtized/github-cl… and available on MELPA.
Also in @magit_emacs 2.13, C-c M-g (bound to magit-file-popup) has gained several new commands! I particularly like the ability to view next/previous blob, which lets you move between historical changes to a file!
2
14
42
Want to know all the commits that affected a function? @magit_emacs as of version 2.13 provides M-x magit-log-trace-definition for this! For any language that git log understands, it will show you all the relevant commits.
Want to run a raw git command inside of @magit_emacs? ! ! (which is magit-git-command-topdir) inside a magit buffer. This is really useful if you have custom git aliases, or if you want to use globbing (e.g. 'git rm -r old-dir*').
8
22
toggle-debug-on-error and toggle-debug-on-quit are fantastic tools, but it's easy to leave them active by accident. mode-line-debug-mode makes this state obvious! It's a simple mode that adds ? to the mode line if either of these debug modes are active. github.com/tarsius/mode-line…
2
8
What do you do if Emacs is hanging? You can use C-g to stop it hanging, but how do you investigate? M-x toggle-debug-on-quit This brilliant Emacs command will give you a stack trace and a debugger when you press C-g. This is great for debugging dodgy code completion plugins!
2
13
1
51