提供文件默认的模板格式
<iframe> <script type="text/javascript" src="https://asciinema.org/a/16281.js" id="asciicast-16281" async></script> </iframe>比如新建一个C的头文件时,会默认生成如下代码:
/**
* @file c.h
* @brief
* @author wul
* @date 2015-02-11 11:51
*
*/
#ifndef __TEST_C_H__
#define __TEST_C_H__
#endif
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 ff=unix ft=cpp
Bundle 'magicsky/vim-file-template'
默认会读取.vimrc
中的g:author
和g:authorEmail
信息作为author
和email
信息。你可以在项目根目录下,准备一个.project.yaml
文件来自定义:
name: test
author: wuliang
authorEmail: garcia.relax@gmail.com