When I copy code from another file, the formatting is messed up, like this:
fun() { for(...) { for(...) { if(...) { } } } }
How can I autof
I wanted to add, that in order to prevent it from being messed up in the first place you can type :set paste before pasting. After pasting, you can type :set nopaste for things like js-beautify and indenting to work again.
:set paste
:set nopaste