Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim's current highlighed language

How to know which programming language is set for highlighting the syntax in vim. I can set the language by "setf" command, but how to get the current language?

Thanks.

like image 793
MKo Avatar asked Mar 16 '11 12:03

MKo


People also ask

What language does Vimrc use?

Vim is written in C language. According to Wikipedia, Vim is written in both C and Vimscript, not only Vimscript. The source code of Vim is available here, on Github. /src : 26.321M , mostly written in C. Most of the files are .

How does Vim syntax highlighting work?

Syntax highlighting enables Vim to show parts of the text in another font or color. Those parts can be specific keywords or text matching a pattern. Vim doesn't parse the whole file (to keep it fast), so the highlighting has its limitations.

How do I highlight in vim?

After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.


1 Answers

You can type :set ft? (Note that the question mark is part of the command)

like image 135
heijp06 Avatar answered Oct 04 '22 10:10

heijp06