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 […]
Tag Archives: keyboard shortcuts
Edit a regex search string in Emacs
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.
The Mark Ring in emacs
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.
Re-reading the emacs tutorial
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 […]
Swap Registers in emacs calc
<TAB> to swap theĀ contentsĀ of the last two registers in calc.
emacs keyboard macros
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!
Select what you typed rather than the completion in ido-mode
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.
Keyboard shortcut to un-minimise a window in OS X
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
Cmd+m to minimise a window in OS X
Insert a new heading after numbered list in org-mode
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 […]