New in VS Code: Surround code with Snippets (#blogPost)

VS Code’s January release notes included an excellent new editor feature that lets you wrap lines with everyday snippets such as if/else or loops.


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis

VS Code's January release notes included an excellent new editor feature that lets you wrap lines with everyday snippets such as if/else or loops.

You might know that I'm always on the hunt for editor workflows that help me save some keystrokes. Check the "JavaScript booster" extension if you're looking for VS Code commands to convert let to const, replace strings with template strings or convert arrow functions to anonymous functions. It's so good!

The new command – "Surround with snippet"

The functionality is quickly explained. Highlight the code lines you want to surround with a snippet, open the command palette and wrap away!

Here's it in action. 👇

Save some keystrokes, friends! 👋


Reply to Stefan


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis


Print Share Comment Cite Upload Translate Updates
APA

Stefan Judis | Sciencx (2022-03-12T23:00:00+00:00) New in VS Code: Surround code with Snippets (#blogPost). Retrieved from https://www.scien.cx/2022/03/12/new-in-vs-code-surround-code-with-snippets-blogpost/

MLA
" » New in VS Code: Surround code with Snippets (#blogPost)." Stefan Judis | Sciencx - Saturday March 12, 2022, https://www.scien.cx/2022/03/12/new-in-vs-code-surround-code-with-snippets-blogpost/
HARVARD
Stefan Judis | Sciencx Saturday March 12, 2022 » New in VS Code: Surround code with Snippets (#blogPost)., viewed ,<https://www.scien.cx/2022/03/12/new-in-vs-code-surround-code-with-snippets-blogpost/>
VANCOUVER
Stefan Judis | Sciencx - » New in VS Code: Surround code with Snippets (#blogPost). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/12/new-in-vs-code-surround-code-with-snippets-blogpost/
CHICAGO
" » New in VS Code: Surround code with Snippets (#blogPost)." Stefan Judis | Sciencx - Accessed . https://www.scien.cx/2022/03/12/new-in-vs-code-surround-code-with-snippets-blogpost/
IEEE
" » New in VS Code: Surround code with Snippets (#blogPost)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2022/03/12/new-in-vs-code-surround-code-with-snippets-blogpost/. [Accessed: ]
rf:citation
» New in VS Code: Surround code with Snippets (#blogPost) | Stefan Judis | Sciencx | https://www.scien.cx/2022/03/12/new-in-vs-code-surround-code-with-snippets-blogpost/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.