I downloaded vim and used it in a python file and the snippets worked perfectly. But when I tried to use snipMate in a .go file (golang) it didn’t work. I read the documentation and couldn’t find an answer but when I manually used the command “:set ft=go”
the snippets worked. Why does snipMate automatically work for python and not go. Snippet files for both languages are supplied. How do I get snippets for go to automatically work?
I downloaded vim and used it in a python file and the snippets worked
Share
It sounds like your .go files aren’t getting set to the appropriate filetype. You can use
in your ~/.vimrc to remedy this.
The appropriate place for files like this is in your
~/.vim/ftdetectdirectory. For instance, you could create a file called~/.vim/ftdetect/go.vimand put the command in there.