Neovim for Beginners — Snippets
In the previous article, we configured several code snippets plugins to help us write test cases. In this article, we are going to leverage code snippets to help us code faster.
We are going to
- Configure and re-use existing code snippets available in the VS Code marketplace.
- Write our code snippets in multiple ways.
This article is part of the Neovim for Beginners series.
The Neovim configuration files can be found in this repository.
Use Existing Code Snippets
Before diving into writing our code snippets, let’s see how we can re-use the code snippets available from the VS Code marketplace.
The VS Code snippets files are written in JSON, support C-style comments, and can define an unlimited number of snippets. The snippets support most TextMate syntax for dynamic behavior, intelligently format whitespace based on the insertion context, and allow easy multiline editing.
We are going to re-use the VS Code ES7+ React/Redux/React-Native snippets extension which currently has more than 4.6 million installs. The steps should be the same for snippet extensions for other languages.
If we look into the
package.json file, we can see the path points to the