From b3dc4abc3834ff11e814c48e5a6b0cb432bb36d6 Mon Sep 17 00:00:00 2001 From: ujihisa Date: Fri, 19 Oct 2012 20:55:19 -0700 Subject: [PATCH 1/6] better English --- doc/neosnippet.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 3b71e9e..1efef68 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -364,10 +364,12 @@ Note: To contain "}" character in default value, you must escape "}". snippet test ${1:escape \} value} < -'_' (global) snippet feature is supported. '_' snippet is loaded in all -filetypes. And neosnippet can load snipMate snippets. +'_' (global) snippet feature is available. Neosnippet loads '_' snippet for +all filetypes. -Alias feature is supported. Separator is ' ' or ','. +Neosnippet can load snipMate snippets as well. + +Alias feature is available. The separator is either ' ' or ','. > alias hoge hogera hogehoge < From 42e3c7561ffba7ecba3ad4add776a587414da442 Mon Sep 17 00:00:00 2001 From: ujihisa Date: Fri, 19 Oct 2012 20:56:03 -0700 Subject: [PATCH 2/6] typofix --- doc/neosnippet.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 1efef68..1c9696c 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -374,7 +374,7 @@ Alias feature is available. The separator is either ' ' or ','. alias hoge hogera hogehoge < Synchronized placeholder feature is supported. $1 is synchronized to ${1}. -When you jump next, it is synchlonized. $0 is last jump placeholder. +When you jump next, it is synchronized. $0 is last jump placeholder. The placeholder value can't contain new lines. Below snippet is illegal: > From 7286b8e8198d72d2642bd8fb9e988a77bb66a960 Mon Sep 17 00:00:00 2001 From: ujihisa Date: Fri, 19 Oct 2012 20:59:02 -0700 Subject: [PATCH 3/6] better English --- doc/neosnippet.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 1c9696c..4415482 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -374,32 +374,33 @@ Alias feature is available. The separator is either ' ' or ','. alias hoge hogera hogehoge < Synchronized placeholder feature is supported. $1 is synchronized to ${1}. -When you jump next, it is synchronized. $0 is last jump placeholder. +When you jump next, it will be synchronized. $0 will be the final jump +placeholder. -The placeholder value can't contain new lines. Below snippet is illegal: +The placeholder value can't contain new lines. The snippet below isn't valid: > snippet test ${1:constructor: (${2:args\}) -> ${3:# do smth}} < -Multi snippet feature is supported in snipMate. -neosnippet substitutes trigger and descriptions spaces to '_'. +Multi snippet feature in snipMate is available. +Neosnippet substitutes trigger and descriptions spaces to '_'. > snippet trigger description1 hoge snippet trigger description2 piyo < -You choose snippet or and expand it with +Choose snippets using or and expand it with |(neosnippet_expand_or_jump)| key-mappings. -Nested placeholder feature is supported. -But must escape inner "}". "\" is eacape sequence. +Nested placeholder feature is available, But you must escape inner "}". "\" is +the eacape sequence. > snippet div
${3}
${4} < -In following snippet, you must escape "}" twice. +You must escape "}" twice in following case. > snippet catch prev_word '^' @@ -409,7 +410,7 @@ Because ${1:} substitutes the pattern to "/${2:pattern: empty, E484, Vim(cmdname):{errmsg\}}" and ${2:} substitutes the pattern to "pattern: empty, E484, Vim(cmdname):{errmsg}" -If you use hard tab for indentation in snippet file, neosnippet will use +If you use hard-tab for indentation in snippet file, neosnippet will use 'shiftwidth' instead of Vim indent plugin. This feature is useful while some languages' indent files can not work very well (e.g.: PHP, Python). > From 76e86124101c52aeb0f6530f840770bde8a4f42f Mon Sep 17 00:00:00 2001 From: ujihisa Date: Sat, 20 Oct 2012 00:24:26 -0700 Subject: [PATCH 4/6] Improved scala snip -- prev_word wasn't used properly --- autoload/neosnippet/snippets/scala.snip | 7 +++---- doc/neosnippet.txt | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/autoload/neosnippet/snippets/scala.snip b/autoload/neosnippet/snippets/scala.snip index 7917278..409bb9f 100644 --- a/autoload/neosnippet/snippets/scala.snip +++ b/autoload/neosnippet/snippets/scala.snip @@ -15,13 +15,11 @@ prev_word '^' snippet p abbr println() -prev_word '^' - println(${1})${0} + println(${1}) snippet pn abbr println('name, name) -prev_word '^' - println('${1:name}, $1)${0} + println('${1:name}, $1) snippet main abbr def main(args: Array[String]) { @@ -32,6 +30,7 @@ prev_word '^' snippet hello abbr object HelloWorld { def main(...) } +prev_word '^' object HelloWorld { def main(args: Array[String]) { println("Hello, world!") diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 4415482..3b0a8eb 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -443,6 +443,9 @@ snippet *neosnippet-unite-action-snippet* ============================================================================== CHANGELOG *neosnippet-changelog* +2012-10-20 +- Improved scala snip. + 2012-10-19 - Fixed syntax highlight. - Improved documentation. From 5919706b02587c8c0d7f184dc62ab5d9e9fa3085 Mon Sep 17 00:00:00 2001 From: ujihisa Date: Sat, 20 Oct 2012 19:16:15 -0700 Subject: [PATCH 5/6] Added haskelll snip. --- autoload/neosnippet/snippets/haskell.snip | 22 ++++++++++++++++++++++ doc/neosnippet.txt | 1 + 2 files changed, 23 insertions(+) create mode 100644 autoload/neosnippet/snippets/haskell.snip diff --git a/autoload/neosnippet/snippets/haskell.snip b/autoload/neosnippet/snippets/haskell.snip new file mode 100644 index 0000000..dbdb3d7 --- /dev/null +++ b/autoload/neosnippet/snippets/haskell.snip @@ -0,0 +1,22 @@ +snippet import +abbr import qualified ... as ... + import qualified ${1} as ${2} + +snippet importOnly +abbr import ... (...) + import ${1} (${2}) + +snippet language +abbr {-# LANGUAGE ... #-} + {-# LANGUAGE ${1} #-} + +# hard-tab is necessary +snippet case +abbr case ... of + case ${1} of + ${2} -> ${0} + +snippet main +abbr main = do + main = do + ${0} diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 3b0a8eb..b0fcba5 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -445,6 +445,7 @@ CHANGELOG *neosnippet-changelog* 2012-10-20 - Improved scala snip. +- Added haskell snip. 2012-10-19 - Fixed syntax highlight. From 898488cccdb453e8fe8b68de3ef1e929a97a8eb2 Mon Sep 17 00:00:00 2001 From: ujihisa Date: Sat, 20 Oct 2012 19:48:13 -0700 Subject: [PATCH 6/6] Added vim/vital snip. --- autoload/neosnippet/snippets/vim/vital.snip | 33 +++++++++++++++++++++ doc/neosnippet.txt | 1 + 2 files changed, 34 insertions(+) create mode 100644 autoload/neosnippet/snippets/vim/vital.snip diff --git a/autoload/neosnippet/snippets/vim/vital.snip b/autoload/neosnippet/snippets/vim/vital.snip new file mode 100644 index 0000000..0ee6771 --- /dev/null +++ b/autoload/neosnippet/snippets/vim/vital.snip @@ -0,0 +1,33 @@ +snippet vital_of_without_let +abbr vital#of('...') + vital#of('${1:vital}') + +snippet vital_of +abbr let s:V = vital#of('...') + let ${1:s:V} = vital#of('${2:vital}') + +snippet vital_import_without_let +abbr import + ${1:s:V}.import('${2:Module}') + +snippet vital_import +abbr let s:M = s:V.import('...') +prev_word '^' + let ${1:s:M} = ${2:s:V}.import('${3:Module}') + +snippet vital_load_without_call +abbr s:V.load('...') + ${1:s:V}.load('${2:Module}') + +snippet vital_load +abbr call s:V.load('...') + call ${1:s:V}.load('${2:Module}') + +# FAQ +# Q. Why does this snip file has verbose prefix "vital_" for everything? +# A. Because it's vital.vim specific but this snip is available in any vim +# filetype buffers. +# +# Q. Why didn't provide X/X_with_Y instead of X_without_Y/X? +# A. To show what is encouraged. Programmers usually assume that they should +# always use shorter name of functions, so this snip followed the convention. diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index b0fcba5..b39ad1b 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -446,6 +446,7 @@ CHANGELOG *neosnippet-changelog* 2012-10-20 - Improved scala snip. - Added haskell snip. +- Added vim/vital snip. 2012-10-19 - Fixed syntax highlight.