Reputation: 78683
My .vimrc looks nice and syntax-highlighted:
I'd like to have the same style of syntax highlighting for my own file which is not called .vimrc
.
What would I have to name my file so it gets the right syntax highlighting or, alternatively, which language's syntax highlighting is being used, so I can select it manually?
Upvotes: 0
Views: 889
Reputation: 4370
The filetype (as in what vim internally refers to as filetype) is 'vim'. You should be able to use any extension, really. Putting something along these lines into your .vimrc might work.
au BufNewFile,BufRead *.yourextension set filetype=vim
Upvotes: 1