Learn Docker With My Newest Course

Dive into Docker takes you from "What is Docker?" to confidently applying Docker to your own projects. It's packed with best practices and examples. Start Learning Docker →

Taking Advantage of Using Snippets with UltiSnips and Vim-Snippets

taking-advantage-of-using-snippets-with-ultisnips-and-vim-snippets.jpg

In this video we'll go over using snippets with Vim, but the idea of snippets applies to other code editors too.

Quick Jump:

Snippets are a great way to save keystrokes without having to set up language servers. We’ll be covering one of the most popular snippet set ups in Vim. There’s support for dozens of programming languages and it’s very easy to add your own custom snippets too.

# How Snippets Work and How to Set Everything Up

Timestamped Table of Contents

  • 0:49 – Adding a div + paragraph with and without using snippets
  • 2:08 – Using snippets from multiple file types in the same file
  • 4:06 – Dealing with multiple snippets that have the same name
  • 4:58 – Using snippets in a Python file
  • 5:56 – Fuzzy finding available snippets using Vim FZF
  • 7:36 – Skimming the README file for UltiSnips and vim-snippets
  • 8:41 – Installing both Vim plugins with Vim Plug
  • 9:38 – Looking at a few Markdown / podcast related custom snippets
  • 12:29 – Looking at few more Markdown / blog related custom snippets
  • 14:07 – Defining your own custom snippets
  • 16:31 – Why I prefer using snippets over using language servers

Reference Links

Are you using snippets? Have you created custom snippets? Let me know below!

By the way, in addition to snippets, Vim has a built in complete menu that you can use for autocomplete. I made another video on that here.

Never Miss a Tip, Trick or Tutorial

Like you, I'm super protective of my inbox, so don't worry about getting spammed. You can expect a few emails per year (at most), and you can 1-click unsubscribe at any time. See what else you'll get too.



Comments