- Merged.
This commit is contained in:
22
autoload/neosnippet/snippets/haskell.snip
Normal file
22
autoload/neosnippet/snippets/haskell.snip
Normal file
@@ -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}
|
||||
@@ -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!")
|
||||
|
||||
33
autoload/neosnippet/snippets/vim/vital.snip
Normal file
33
autoload/neosnippet/snippets/vim/vital.snip
Normal file
@@ -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.
|
||||
Reference in New Issue
Block a user