Issue #121  (Surround with Snippet)08/14/24

Advertisement
HackerPulse โ€” The Ultimate Dev Profile

This text can appear both before and after the wide image, depending on the length.

Donโ€™t send 69 links to share your work โ€“ just share one!

HackerPulse

Bring together your GitHub, Stack Overflow, and LinkedIn profiles into a single HackerPulse dev profile. Perfect for job applications and networking, HackerPulse gives a complete picture of your skills and projects, all in one place.

Sign Up โ‡€


More than likely you've heard of the Code Snippets feature in VS Code, which allows you to automatically insert a prewritten piece of code. You can choose from an existing library of built-in snippets for JavaScript, TypeScript, Markdown, PHP, and others. Or you can write and save your own snippets. For a more comprehensive look at the topic, check out this docs article or the brief intro I published in this newsletter in this issue.

One feature I didn't mention back then is something called "Surround with Snippet". This is a useful way to incorporate a snippet directly with a line of code in your editor.

To use it, simply select a piece of code, then open your command palette and search for the "Surround with Snippet" command.
 
Surround with Snippet in VS Code

Once you select that, you'll then get the usual list of options that shows the snippets you have the ability to insert.
 
Choosing a Snippet in VS Code

The following animated GIF demonstrates how quickly you can use this feature to insert a snippet that surrounds a selected piece of code:
 
Using Surround with Snippet in VS Code
 
This is useful for code blocks that use if statements, try/catch, promises, loops, and more. The feature was added a little over two years ago, in February 2022, so I imagine many of you may not have known about it until now.

Now on to this week's hand-picked links!
 

VS Code Tools

Mint it — A VS Code extension that adds highlighting to comments, to assist with comment todos, tasks, etc., with support for 20+ programming languages.

Custom Pilot — A VS Code extension framework that lets you easily integrate your custom code completion model into VS Code.

HackerPulse — Bring together your GitHub, Stack Overflow, and LinkedIn profiles into a single HackerPulse dev profile.   Sponsor 

Alive — A VS Code extension that attempts to create a Common Lisp extension for VS Code. See articles section below for tutorial.


VS Code Theme of the Week

Awih Theme — Not a popular theme and it's about 2 years old, but it caught my eye because it's unusual. Technically it's a dark theme, but it combines both dark and light.

Awih Theme for VS Code

You can see that all of the UI elements are in a more or less light mode while the code editor and the syntax highlighting have a nice dark theme.

VS Code Articles & Videos

๐Ÿ“บ Using Git & GitHub in VS Code: Stage, Commit, and Push — From last year on Max on Tech's YouTube channel, a nice starting point for those not familiar with working with Git and GitHub in VS Code.

VS Code's New Minimap Section Headers — A quick description of a recently added feature that makes the minimap in VS Code a little more useful.

The Morning Paper for Tech — Want a byte-sized version of Hacker News that takes just a few minutes to read? Try TLDR's free daily newsletter. It covers the most interesting tech, startup, and programming stories in just 5 minutes. No sports and no politics.  Sponsor 

Using VSCode with Alive — Part of an online publication called The Common Lisp Cookbook that discusses how to use the Alive extension mentioned in the tools category above.

Best of the Rest

Zed on Linux — Official announcement of the release of the Linux builds of Zed, the popular Rust-based code editor.

Kempo — A platform to build tailor-made code playgrounds to supercharge blogs, docs, or other teaching tools.

Automate Your Agency — A newsletter for digital marketing agencies in the age of AI. Learn how to automate your processes for SEO, PPC, branding, outreach, and customer acquisition.   Sponsor 

Haystack — A fork of VS Code, this IDE lets you explore and edit code on an infinite canvas and takes care of the tedious and confusing parts of coding for you.

Suggestions?

If you have any link suggestions, including a tool, article, or other resources related to VS Code or another IDE, send it via DM on X: @LouisLazaris or just hit reply on this email.

That's it for this issue.

Happy VS Coding!
Louis
VSCode.Email
@LouisLazaris
Copyright © VSCode.Email. All rights reserved.

Not affiliated with Microsoft, Visual Studio Code, or any of its trademarks.