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
If you want to revert your changes to the last revision, just type: C-x v u
If you want to see the differences for a buffer before committing it, just type: C-x v =
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-!
Tracing Erlang functions for debugging purposes is probably simpler than you could even imagine. Let say you have the following module and you want trace one of its functions. -module(math). -export([sum/2, diff/2]). sum(A, B) -> A + B. diff(A, B) -> A – B. Just start the tracer: > dbg:tracer() Say the tracer that you … Continue reading
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
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
Maybe, someone of you doesn’t still know about the existence of the Erlang function v(Number). You can use this function within an Erlang shell and it will return the value for the Number-th line of the shell. For example: Eshell V5.6.5 (abort with ^G) 1> 2 * 2. 4 2> v(1). 4 3> I found … Continue reading