Skip to content
| Marketplace
Sign in
Visual Studio Code>Keymaps>Nifty Macros: Record & Replay KeystrokesNew to Visual Studio Code? Get it now.
Nifty Macros: Record & Replay Keystrokes

Nifty Macros: Record & Replay Keystrokes

Nifty

| (0) | Free
Record typing and cursor moves and replay them any number of times, or define named macros that chain commands, text and snippets, each bindable to a key.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nifty Macros

Record typing and cursor moves and replay them any number of times, or define named macros that chain commands, text and snippets, each bindable to a key.

Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.

Features

Recording a macro: the first origin gets quotes and a comma while the red status bar item shows the recording

The recording replayed five times fixes the rest of the list, whatever each line's length

Run Macro lists the saved recording and a team macro from workspace settings, each with its steps

  • Record and replay. Press Ctrl+Alt+Shift+R (Cmd+Alt+Shift+R on macOS), do the edit once (type, delete, move the cursor), then press it again to stop. Ctrl+Alt+Shift+P replays it at the cursor. Replay Last Recording Several Times… repeats it down a whole list, e.g. 200 times. A red status bar item shows while you're recording.

  • Replays like you typed it. Typed text goes through the editor's normal typing, so auto-closing brackets and indentation behave the same. Pasted or completed text is inserted exactly. Cursor moves are recorded as line and character steps, so a macro recorded on one line works on the next.

  • Named macros in settings. Chain any VS Code commands (with arguments and repeat counts), typed text, snippets and pauses in nifty.macros.macros. Run one from Run Macro…, or bind it to a key:

    // settings.json
    "nifty.macros.macros": {
      "duplicateAndComment": ["editor.action.copyLinesDownAction", "editor.action.commentLine"],
      "logSelection": [{ "command": "editor.action.clipboardCopyAction" }, "editor.action.insertLineAfter", { "snippet": "console.log(\"$CLIPBOARD\", $CLIPBOARD);" }]
    }
    // keybindings.json
    { "key": "ctrl+alt+1", "command": "nifty.macros.run", "args": "duplicateAndComment" }
    
  • Keep what you record. Save Last Recording as Macro stores it in your settings under a name. Put it in workspace settings to share it with your team.

  • Works in the browser on vscode.dev and github.dev.

Commands

Command What it does
Nifty Macros: Start or Stop Recording Toggle recording (Ctrl+Alt+Shift+R)
Nifty Macros: Replay Last Recording Replay once (Ctrl+Alt+Shift+P)
Nifty Macros: Replay Last Recording Several Times… Replay N times
Nifty Macros: Save Last Recording as Macro Name it and keep it in settings
Nifty Macros: Run Macro… Pick a named macro and run it

Settings

Setting Default What it does
nifty.macros.macros {} Named macros: lists of steps (command IDs, { "command", "args", "repeat" }, { "type" }, { "insert" }, { "snippet" }, { "delay" })

Recording follows the file you start in. If another extension (such as Vim) handles typing, typed text is recorded as inserted text instead.

Install

  • VS Code: search for "Nifty Macros" in the Extensions view, or install from the Visual Studio Marketplace.
  • Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.

Privacy

This extension collects no telemetry and needs no account.

More Nifty tools

  • Nifty C# Templates: New Class, Record & Namespace: New C# class, interface, record, enum, test and controller files with the right namespace, plus namespace syncing. (Open VSX)
  • Nifty Shortcut Trainer: Learn Keyboard Shortcuts: Learn VS Code keyboard shortcuts while you work: spots slow habits like arrow-key walking or copy-paste duplicating and suggests the shortcut, plus a cheat sheet. (Open VSX)
  • Nifty Workspace Keybindings: Per-Project Shortcuts: Keybindings per project: put them in .vscode/keybindings.json and they work only in that workspace, shared with your team through Git. Something VS Code doesn't do on its own. (Open VSX)
  • Nifty .NET Explorer: Solution & Test Explorer: A solution explorer and test explorer for .NET in VS Code, Cursor, Windsurf and VSCodium: projects, references and files from .sln/.slnx, and xUnit, NUnit and MSTest tests in the Testing view. (Open VSX)
  • Nifty Agent Config: AGENTS.md, Rules & MCP Files: See which AGENTS.md, CLAUDE.md, Cursor, Copilot, Windsurf and Gemini rules apply to the file you are editing. Lint rule and MCP files for hidden text, secrets and broken links, and keep them in sync. (Open VSX)
  • Nifty AI Review: Review AI Agent Changes: Review what an AI agent changed, hunk by hunk: checkpoints before it runs, accept or reject each change, leave comments, and send your feedback back to the agent. (Open VSX)

See all 100+ Nifty extensions and web tools at https://getnifty.dev

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft