I am using snipmate for coding and it works fine.
However I would also like to use it on txt file extension, but this does not work at all.
Is it designed to work like that? How can I get snippet expansion on ad-hoc file types?
*.txt
files have the text
filetype but you probably don't have snippets for that filetype. You can create them in ~/.vim/snippets/text.snippets
and do the same for every filetype for which you don't have snippets.
Note that the snippets in ~/.vim/snippets/_.snippets
are "global" and thus available in any filetype.
If you want to expand JavaScript snippets in an HTML file, you can "combine" filetypes with :set ft=html.javascript
.