Taking Advantage of Using Snippets with UltiSnips and Vim-Snippets
In this video we'll go over using snippets with Vim, but the idea of snippets applies to other code editors too.
Quick Jump: How Snippets Work and How to Set Everything Up
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
- Build a SAAS app with Flask course
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.