emacs keyboard shortcuts | how to register and regurgitate?

How to Setup emacs Keyboard Shortcuts

Just once after starting up emacs – you highlight the commands, copy them into a buffer labelled with the shortcut character, then you do a quick shortcut regurgitation to magically roll out your selection.

To Copy (Slurp Up) into the Buffer

  • Ctrl SPACE – to start your selection
  • Ctrl e – to select up to the end of the line
  • Ctrl x – warn emacs a command is on its way
  • r s – now emacs says Copy to (which) register
  • u – letter “u” stores the <strong></strong> html

That’s it to store the buffer. It looks like a lot but it takes me just 1 second to store it in the register and then I may regurgitate it 20 times to avoid a 5 second typing sequence.

To Paste (Regurgitate) the Buffer

  • Ctrl x – warn emacs
  • r i – the “i” this time brings Insert (which) register
  • u – and letter “u” rolls out <strong></strong> html

Keep practising and it becomes second nature.

Automate Slurping Up Into the Register

I would love to know how to slurp up all my shortcuts into the character registers when emacs boots up. The code would go into the dot emacs script (a bit like dot profile).

If you know how to do this – tell us how and I’ll credit you (by linking to your site).

Ready Made Key Maps for HTML Edits

u = <strong></strong>

U = <strong><code></code></strong>

i = <strong><em></em></strong>

I = <em></em>

C = <code></code>

o = <strong>

p = </strong>

O = <strong><code>

P = </strong></code>

j = <span style="color: black; font-size: 1.1em;"></span>

J = <span style="color: darkgray; font-size: 1.1em;"></span>

k = <span style="color: black; font-size: 0.9em;"></span>

K = <span style="color: darkgray; font-size: 0.9em;"></span>

b

<blockquote>
</blockquote>

B

<blockquote style="color: darkgray; font-size: 0.9em;">
</blockquote>

l

<ul>
<li></li>
<li></li>
</ul>

L

<ol>
<li></li>
<li></li>
</ol>

h
<h2 class="page-title"></h2>

H
<h3 class="page-title"></h3>


strong is u and i - both is capital U
ordered list is o
pre block is p
un-ordered list is capital P
h2 is t
h3 is y

Leave a Reply

Your email address will not be published. Required fields are marked *