Language Selection

English French German Italian Portuguese Spanish

HOWTO create keyboard macros in Emacs

Filed under
HowTos

You hear about the great macro feature of Emacs all the time. You see cheat sheets for Emacs key combinations all the time. But you never quite see the keyboard macro trick demonstrated clearly. Here's how it works:

You begin with "C-x (" - that's Control+X, then shift-9. The message buffer will say "Defining kbd macro..." Then you type in whatever series of keystrokes you will want to call with one keystroke. When you're done with the series, hit "C-x )" (open and close parenthesis, just like Lisp, get it?) and the message buffer will now say "Keyboard macro defined". Now you can call the macro at any time with "C-x e" and it will execute just like you typed it all in from scratch!

A real-world (set-up!) example:

Full Story.

Penguin Pete?

After that Tux500 libel, I think I'll keep that site on the mental bl[o|a]cklist. Wink

Right With You

Yep--the guy has obliterated any credibility he had with me.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

Videos: Software Freedom, OpenSUSE 15.2, "Rolling Rhino" and Linux Headlines

Games: Oxygen Not Included, Proton, GDScript

  • The first DLC for Oxygen Not Included sounds huge, free update soon too

    Klei Entertainment have been busy working behind the scenes on the next free update and first expansion for Oxygen Not Included and they've detailed what's coming. First, the free update coming within the next few days should fix plenty of issues, including one involving infinite digging which sounds annoying. More exciting is the DLC though, it's sounding like it's going to be massive!

  • VKD3D-Proton is the new official Direct3D 12 to Vulkan layer for Proton

    VKD3D was originally a project created directly by the Wine team, the compatibility layer that Proton is built upon. However, the original founder passed away and it seems Valve-funded developers are taking the torch to push it much further. It's actually been a thing for a while but today they adjusted the name of their project as VKD3D-Proton, to give it some official status plus preventing any naming conflicts elsewhere and just be clear about their goals. They're going for supporting the "full" Direct3D 12 API on top of Vulkan, with an aim of both performance and compatibility using modern Vulkan extensions and features, so this comes at the expense of compatibility with older drivers and GPUs. They're also not looking to keep backwards compatibility with the original vkd3d.

  • GDScript progress report: Type checking is back

    After completing the new tokenizer and parser as mentioned in the previous reports, I started working on the code analyzer, which is responsible for type checking and also for used for other features like warnings and some optimizations. This was done before as a second pass inside the parser but it was now moved to another class to make it clear that it doesn't happen at the same pass thus avoiding issues with functions being called out of order (which happened by a few contributions that missed this detail).

today's howtos

NomadBSD 1.3.2 is now available!

We are pleased to present the release of NomadBSD 1.3.2. Read more