add nc(namespace and class) for php

http://knplabs.com/blog/boost-your-productivity-with-sf2-and-vim
This commit is contained in:
Yu Huanbo 2013-04-07 19:05:25 +08:00
parent 2b59196777
commit 3fa45cda70

View File

@ -222,6 +222,13 @@ snippet class
${8:// code...}
}
}
snippet nc
namespace ${1:`substitute(substitute(expand("%:h"), '\v^\w+\/(\u)', '\1', ''), '\/', '\\\', 'g')`};
${2:abstract }class ${3:`Filename()`}
{
${4}
}
# define(...)
snippet def
define('${1}'${2});${3}