Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vim template
"vim to load default templates on opening cpp/c/sh files
augroup templates
autocmd!
"Auto load wile creating new files
autocmd BufNewFile *.cpp 0r ~/.vim/templates/skeleton.cpp
autocmd BufNewFile *.c 0r ~/.vim/templates/skeleton.c
autocmd BufNewFile *.sh 0r ~/.vim/templates/skeleton.sh
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment