You must rename the file from google.vim
to cpp.vim
, as indicated in the description of the plugin on vim.org.
General explanation:
Adding filetype plugin indent on
to your ~/.vimrc
allows Vim to detect the filetype of the files you edit (usually based on the file extention) and source filetype-specific plugins and indent scripts.
The idea is simple: you edit a file with {{LANGUAGE}}
filetype and Vim tries to source any ftplugin/{{LANGUAGE}}.vim
and indent/{{LANGUAGE}}.vim
it finds in your runtimepath
.
Because the filetype of your file is cpp
, Vim will blissfully ignore your google.vim
indent script so… you must rename it to cpp.vim
for it to work.
Or you could rename all your C++ files foobar.google
and teach Vim to recognize *.google
files but, well… it doesn't sound right ;-)