New in VS Code: Surround code with Snippets
Written by Stefan Judis
- Published at
- Updated at
- Reading time
- 1min
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 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! ๐
If you enjoyed this article...
Join 5.4k readers and learn something new every week with Web Weekly.
Reply to this post and share your thoughts via good old email.