Vim quicktip #4: Vim detects a file’s type by its filename, but you can set the type yourself using the filetype
(or ft
) option. :set ft=elixir
enables syntax highlighting and automatic indentation for Elixir in the current buffer, without having to save the file to disk.