Added basic class with namespace snippet.

This commit is contained in:
Jan Mollowitz 2014-07-01 21:47:05 +02:00
parent 43b272fd39
commit f11ec0bf18

View File

@ -3,6 +3,28 @@
priority -50
snippet classn "Basic class with namespace snippet" b
namespace `!p
abspath = os.path.abspath(path)
m = re.search(r'[A-Z].+(?=/)', abspath)
if m:
snip.rv = m.group().replace('/', '\\')
`;
/**
* ${1:@author `whoami`}
*/
class `!p
snip.rv = re.match(r'.*(?=\.)', fn).group()
`$2
{
public function __construct(${3:$options})
{
${4:// code}
}$0
}
endsnippet
snippet contr "Symfony2 controller" b
namespace `!p
abspath = os.path.abspath(path)