LondonRob
LondonRob

Reputation: 78683

Which language's syntax highlighting does .vimrc use?

My .vimrc looks nice and syntax-highlighted:

vimrc syntax highlighting

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

Answers (1)

Christian Gibbons
Christian Gibbons

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

Related Questions