From 776b5801a3ff3bade1c05b906d4d89ef0060b86f Mon Sep 17 00:00:00 2001 From: ujihisa Date: Mon, 15 Oct 2012 22:06:45 -0700 Subject: [PATCH] improved lua snip --- autoload/neosnippet/snippets/lua.snip | 13 ++++++++++--- doc/neosnippet.txt | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/autoload/neosnippet/snippets/lua.snip b/autoload/neosnippet/snippets/lua.snip index 5389f1b..bcd319d 100644 --- a/autoload/neosnippet/snippets/lua.snip +++ b/autoload/neosnippet/snippets/lua.snip @@ -1,8 +1,9 @@ +# lua's indent plugin doesn't work well partly with markers. Use hard-tab for some of this snippet. snippet func alias function - function ${1:function_name}(${2:argument}) - ${0:// body...} - end + function ${1:function_name}(${2:argument}) + ${0:// body...} + end snippet if if (${1:true}) then @@ -18,3 +19,9 @@ snippet forin for ${2:k}, ${3:v} in ${1:ipairs(xs)} do ${0} end + +snippet print_table +abbr for k, v in ipairs(table) do + for (k, v) in ipairs(${1:table}) do + print(k, v) + end diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index dfd76fb..55add93 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -2,7 +2,7 @@ neo-snippet plugin contains neocomplcache snippets source Version: 3.0 -Author : Shougo +Author: Shougo License: MIT license {{{ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -409,6 +409,9 @@ snippet *neosnippet-unite-action-snippet* ============================================================================== CHANGELOG *neosnippet-changelog* +2012-10-15 +- Improved lua snip. + 2012-10-07 - Improved vim snip. - Improved c snip.