Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Paste IndentedNew to Visual Studio Code? Get it now.
Paste Indented

Paste Indented

ciiqr

|
257 installs
| (0) | Free
paste indented to the same level as the current line
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Paste Indented

Paste indented to the same level as the current line

Why?

While many languages already auto indent on paste, certain languages do not (notably yaml and python). This extension fixes pasting in these languages (and falls back to default behavior for all others).

Commands

  • Paste Indented

Recommended Keybindings

macOS

// paste & indent
{
    "key": "cmd+v",
    "command": "paste-indented.paste",
    "when": "editorTextFocus && !editorReadonly"
},
{
    "key": "cmd+v",
    "command": "editor.action.clipboardPasteAction",
    "when": "!editorTextFocus"
},
{
    "key": "cmd+shift+v",
    "command": "editor.action.clipboardPasteAction",
    "when": "editorTextFocus && !editorReadonly"
}

Linux/Windows

// paste & indent
{
    "key": "ctrl+v",
    "command": "paste-indented.paste",
    "when": "editorTextFocus && !editorReadonly"
},
{
    "key": "ctrl+v",
    "command": "editor.action.clipboardPasteAction",
    "when": "!editorTextFocus"
},
{
    "key": "ctrl+shift+v",
    "command": "editor.action.clipboardPasteAction",
    "when": "editorTextFocus && !editorReadonly"
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft