Today I needed to copy a line multiple times in emacs. I needed 8 copies, but how to do that in emacs short of pressing C-y to yank 8 times? My initial guess was to try C-u 8 C-y but that yanks the 8th item from the kill ring. Fuco on #emacs supplied the awesome […]
If you are writing a complex regex search in emacs and need to edit the string, arrow keys takes you out of the search. M-e allows you to really edit the string.
Each time you mark with C-<SPC>, Emacs saves the mark in the mark ring. You can step back through your mark ring with C-u C-<SPC>. You can swap point and mark with C-x C-x.
It came upon me to re-read the emacs tutorial. Last time I read it was probably about 17 years ago. Things might have changed since then. I picked up two things: C-/ is undo and is equivalent to C-_ C-h c gives you brief help on a keyboard shortcut. I was using C-h k but […]
<TAB> to swap the contents of the last two registers in calc.
If you haven’t explored the power of keyboard macros in emacs, you should. You only need to remember a few keys to get going: <F3> Start recording a macro <F4> End recording a macro C-x e to repeat the macro Give it a go!
Sometimes you don’t want the completion that ido is offering me in Emacs, for instance when trying to create a temporary buffer C-x C-b sometempbuffername. C-j will to get ido to accept what you typed rather than the completion.
It’s a bit fiddly but it can be done. Cmd+m to the item you want to un-minimise, then while still holding cmd, press Option. Release Cmd and then finally release Option.
Cmd+m to minimise a window in OS X
In org-mode in emacs, M-<RET> will add either a new heading or if your insertion point is between a list item and a heading, it will add a new list item. This is not always desirable. To add a new heading try C-U M-<RET>. I only discovered this as I got frustrated with org-mode insisting […]