Sublime Forum

Multiline Paste Indent

#1

sublime_block_paste

When I copy and paste a block of multiple lines from outside the curly braces in Sublime Text 4, only the first line gets indented correctly, while the other lines don’t. Is there a way to fix this? It doesn’t matter if it’s CSS, PHP or JavaScript.

Keybindings:
{
“keys”: [“super+v”], “command”: “paste_and_indent”
}

Thank you.Preformatted text

0 Likes

#2

ctrl+shift+v would re-indent pasted content.

0 Likes

#3

Thank you very much for your reply. Pasting manually works perfectly, but when I use a tool like Dash it just pastes the raw content. I tried changing the key binding to:

{
“keys”: [“super+v”], “command”: “paste_and_reindent”
}

but unfortunately that didn’t work. Do you have another idea?

0 Likes

#4

Not, if external tools just call plain “paste” command, how ever they do.

Normal paste results in exactly what u experience as it doesn’t include re-formatting or re-indenting.

0 Likes

#5

Okay, thank you. Appreciate your feedback.

0 Likes