Sublime Forum

Do not format on paste

#1

Sorry, I’ve tried looking it up, but got too many irrelevant links.

When I’m pasting (not paste & indent, regular paste) a javascripe code into a javascript file, the ST4 reformats the code (changes tabs to spaces, splits long lines, etc).

If I paste the same code into a file which doesn’t have .js extension, it doesn’t do that.

What’s that feature (code formatting on paste) is called in the settings, and how do I find/turn it off?

0 Likes

#2

Does it happen in safe mode?

1 Like

#3

ST would replace tabs with spaces, if translate_tabs_to_spaces setting is set true. ST wouldn’t however split lines.

1 Like

#4

@bschaaf @deathaxe thanks for your replies, I’ve checked translate_tabs_to_spaces and it was set to false, so I’ve narrowed it down to the Indent XML package. Not sure if it’s a default one or if I have installed it at some point while trying to review some json/XML earlier, but after I deleted it, ST4 behaves as expected when pasting javascript files.

0 Likes