This category contains 9 posts

Numbered lists in Emacs

Imagine that you’re using Emacs and you have a list of items that you would like to convert into a numbered list. We’re going from: first second third To: 1. first 2. second 3. third Obviously, there are many ways to achieve this, but one is to use the Emacs Keyboard Macro Counter. Put the … Continue reading

PHP Mode for Emacs – Flymake

I always find flymake extremely useful when editing code in Emacs. In this period, I’m working a bit with PHP and I’ve immediately thought that enabling flymake for Emacs was indeed a good idea. Well, someone has apparently already thought about it, so everything you need to know about it is explained here. I tried … Continue reading

Special Pasting in Emacs

Sometimes you want to paste some old content from the clipboard, instead of the last copied thing. In this case, just paste as usual: C-y Then, browse the clipboard history by typing: M-y

SVN Revert within Emacs

If you want to revert your changes to the last revision, just type: C-x v u

SVN View Diff within Emacs

If you want to see the differences for a buffer before committing it, just type: C-x v =

Running Shell Commands within Emacs

If you want to run a shell command within Emacs, you can simply type: M-! If you want to include the output into the current buffer, then: C-u M-!

Macros in Emacs

You can start recording a keyboard macro by typing: C-x ( Do whatever you want and stop recording with: C-x ) Then, you can select a region and type: C-x C-k r To apply the macro to the selected region. Emacs Macros are a really powerful tool. Just think if you need to prepone/postpone a … Continue reading

Swapping in Emacs

Here are some very useful tips for Emacs, regarding swapping. SWAP WORDS: If you have a text like the following and you want to change the order of the parameters for the foo function: foo(First, Second) ->; ok. Just put the cursor on the comma or on the space between First and Second and press: … Continue reading

SVN Commit from Emacs

To commit a single file directly from Emacs, just: C-x v v Add a comment C-c C-c