Elroyjetson

Check File Type in VIM

Posted on: by

If you use snipmate and want to add a new snippet set, you may need to determine what file type vim thinks your working in.

For instance, I wanted to add Markdown snippets. I added all of my files to a markdown.snippets file, but nothing worked. It turns out that vim didn’t know what a .markdown file type was and was reporting it incorrectly as a .conf file. To determine what file type vim thinks a file is run:

:set ft?

This will return what type of file vim thinks you are in. You can adjust your snippets file or add the new filetype.

Tags: ,

Updated: