Isso ocorre porque o destaque está desativado por sintaxe padrão. Tente :syntax on
e se o vim não reconhecer o tipo de arquivo, você poderá fazê-lo manualmente com set filetype=<filetype>
, por exemplo set filetype=php
.
Embora a obtenção da lista completa de tipos de arquivos de realce de sintaxe seja simples no gvim, para a versão do console, você tem várias opções :
a) listar os comandos automáticos que os identificam
:au filetypedetect
These autocommands are set by $VIMRUNTIME/filetype.vim; one of them runs
$VIMRUNTIME/scripts.vim to try to identify files from their contents
when the name, path, etc. are not enough.
b) check which filetypes have scripts to handle them
(gvim) Syntax => Show filetypes in menu
which, however, lists only preinstalled filetypes, and not with the name
under which the 'filetype' or 'syntax' option knows them;
or else, for each of the directories listed in the 'runtimepath' option,
list (using ls on Unix or dir, possibly dir /w to save space, on Windows):
<directory>/ftplugin/*.vim
<directory>/indent/*.vim
<directory>/syntax/*.vim
Note that 'filetype' (as used by ftplugin and indent scripts) and
'syntax' (as used by syntax scripts) are separate options, which have
usually the same value but could be different.
In a "vanilla" install of Vim with no third-party scripts installed, the
only value of <directory> above pointing to an existing, nonempty
directory is your $VIMRUNTIME directory.