How to use a template in vim

Viewed 25756

This is really a newbie question - but basically, how do I enable a template for certain filetypes.

Basically, I just want the template to insert a header of sorts, that is with some functions that I find useful, and libraries loaded etc.

I interpret

:help template

the way that I should place this in my vimrc

au BufNewFile,BufRead ~/.vim/skeleton.R

Running a R script then shows that something could happen, but apparently does not:

--- Auto-Commands ---

This may be because a template consists of commands (and there are no such in skeleton.R) - and in this case I just want it to insert a text header (which skelton.R consist of).

Sorry if this question is mind boggeling stupid ;-/

7 Answers
Related