Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions about making Vim to have a defined behavior according the type of the edited file.

Vim can detect the type of file that is edited. This is done by checking the file name and sometimes by inspecting the contents of the file for specific text.

To enable that, following command has to be added to the .vimrc file:

:filetype on