raywill / snipmate.vim

snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim.

Home Page:www.vim.org/scripts/script.php?script_id=2540

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

更新:

2015-11-24 增加了对javascript/HTML代码格式化的支持 2015-11-24 增加today, time, now 三个snippets

Quickly install with:

  • git clone git://github.com/raywill/snipmate.vim.git
  • cd snipmate.vim
  • cp -R * ~/.vim

##使用说明 输入前缀,按下tab,帮助你自动补全代码。下面针对OceanBase Dev的需求,介绍相关前缀的含义。

  • tbe, tbw, tbi, tbd
TBSYS_LOG(ERROR, "error_msg"); 
TBSYS_LOG(WARN, "warn_msg");
TBSYS_LOG(INFO, "info");
TBSYS_LOG(DEBUG, "debug_msg");
  • if
if (OB_SUCCESS != (ret = function()))
{
}
  • for
for (i = 0; OB_SUCCESS == ret && i < count; i++)
{
    /* code */
}
  • class

自动生成类框架,包括.h和.cpp部分。

  • class_cpp

仅生成cpp部分

  • class_h

仅生成h部分

  • class_operator

自动生成一个物理运算符的接口框架

  • serialize, deserialize, get_serialize_size

自动生成类的序列化相关函数

  • gtest

自动生成一个GTest测试框架

更多功能请自行定制,参考~/.vim/snippets/cpp.snippets

About

snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim.

www.vim.org/scripts/script.php?script_id=2540


Languages

Language:Vim Script 100.0%