I'm creating a folder with common code snippets I use. I want to create a quick command in vim to insert them, for example something like::snippet codeblock1Ideally it would be a single command and codeblock1 could be replaced by the file name of a code snippet.That way I could have a single command and add new snippets by creating new files in a set folder, likely in ~/.vim/snippets/.
Insert code snippets?
macro
The :r command can read a file containing a code snippet and insert it to your active buffer.Unless I'm missing something, I believe this would address your request.