views:

41

answers:

2

I have seen instructions about creating a "skeleton" file in vim. This involves creating the file, naming it "tmpl" plus the extension of the file type you are targeting (ex: tmpl.html), saving it to the "skeleton" directory, and then editing the vimrc file.

But, in MacVim, I don't see a "skeleton" directory anywhere. Googling, etc., has returned no helpful information.

Can someone point me to a helpful tutorial/white paper/whatever to walk me through this process for MacVim?

I am determined to develop some skills with Vim/MacVim!

Thanks

A: 

I feel dirty giving this as an answer (because I've never done it), but googlin' gave me this: Vim Recipes: Using Templates.

Seems like you make your own skeleton directory and point the line for your .vimrc file to it.

theIV
I have it now. The article you pointed to is the article I was referring to in my original post. I finally figured out that I was supposed to CREATE the ~/.vim/skel directory. I thought that that directory already existed for a Vim installation and that MacVim was somehow missing it. But, I created the directory in my User's root directory, put a test template in there, edited my vimrc file and Presto! Thanks for your help. I was almost there, but I just needed a little prodding.
rogdawg
A: 

There are a multitude of vim plugins that can handle this task. I use snipMate to perform tasks like this. You can define snippets for each file type or globally. The best part about the snippets is that you can keep hitting tab while it takes you to each "variable" within the snippet so that you can fill in the missing information quickly.

claytron