0

I want to paste the code format in Visual Studio Code. In sublime or IntelliJ, the hot key Ctrl+Shift+v will be able to past the code format with automatic indent. I have found a lot, but have not found any similar hot key in Visual Studio Code. Does any one have a good suggestion? What you should notice is that my point is to paste the code, but not only format the code. My purpose is not just to format the code.

neal
  • 164
  • 3
  • 15
  • 1
    Do you mean *paste*? – Blue Apr 28 '17 at 05:51
  • http://stackoverflow.com/questions/29973357/how-do-you-format-code-in-visual-studio-code-vscode Did you try this? – Geethu Nimesh Apr 28 '17 at 05:54
  • Possible duplicate of [How do you format code in Visual Studio Code (VSCode)](http://stackoverflow.com/questions/29973357/how-do-you-format-code-in-visual-studio-code-vscode) – Liam Apr 28 '17 at 09:51
  • @Liam It is different, and I have explained why. The point is not format code. The point is to paste the code with appropriate indent. You will must know what I am meaning if you have ever tried in sublime or intellij. – neal Apr 28 '17 at 12:20

1 Answers1

0

There is an extension that solves this problem.

Paste and Indent

You also have to bind a key combination to trigger paste with indentation. You'll find the "how to" on the link above.

Jakub Jurkian
  • 1,346
  • 1
  • 9
  • 5
  • thank u very much. You did help me, I have been confused about this for a long time. – neal Apr 28 '17 at 07:41
  • [Or you can use the built in functionality...?](http://stackoverflow.com/a/29973358/542251) – Liam Apr 28 '17 at 09:52
  • Yes, you can format it manually using shortcuts, but the code still can't be pasted in with proper indentation automatically – Jakub Jurkian Apr 29 '17 at 11:00