Vim. Plantillas para cabeceras que se incluyen automáticamente.

Recientemente he visto un artículo donde explica como configurar vim para que incluya un texto al comienzo de un fichero nuevo. Pienso que es bastante útil. Por ejemplo se puede hacer que incluya el texto de la licencia GPL3.
Lo primero creamos un fichero de texto con lo que queremos que se incluya. Por ejemplo el texto para indicar que el fichero de texto es software libre bajo la licencia GPL3 en ficheros C/C++
/*
This file is part of <foobar>.

<foobar> is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your
option) any later version.

<foobar> is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along
with <foobar>. If not, see <https://www.gnu.org/licenses/>.
*/
Luego editamos el fichero .vimrc en nuestro $HOME y añadimos lo siguiente:
au bufnewfile *.{c,h,cpp,hpp,cc} 0r /home/la/.vim/doc/cabecera_licencia_gpl3_C_multiple.txt
Deberemos, eso sí, sustituir manualmente <foobar> por el nombre de nuestro programa.