neosnippet.vim/autoload/neosnippet/snippets/vim/vital.snip

36 lines
1.0 KiB
Plaintext
Raw Normal View History

2012-10-21 02:48:13 +00:00
snippet vital_of_without_let
abbr vital#of('...')
2012-10-30 03:06:31 +00:00
vital#of('${1:#:vital_name}')
2012-10-21 02:48:13 +00:00
snippet vital_of
abbr let s:V = vital#of('...')
2012-10-25 16:12:39 +00:00
options head
2012-10-30 03:06:31 +00:00
let ${1:s:V} = vital#of('${2:#:vital_name}')
2012-10-21 02:48:13 +00:00
snippet vital_import_without_let
abbr import
${1:s:V}.import('${2:Module}')
snippet vital_import
abbr let s:M = s:V.import('...')
2012-10-21 12:13:26 +00:00
options head
2012-10-30 03:06:31 +00:00
let ${1:s:M} = ${2:s:V}.import('${3:#:module_name}')
2012-10-21 02:48:13 +00:00
snippet vital_load_without_call
abbr s:V.load('...')
2012-10-30 03:06:31 +00:00
${1:s:V}.load('${2:#:module_name}')
2012-10-21 02:48:13 +00:00
snippet vital_load
abbr call s:V.load('...')
2012-10-25 16:12:39 +00:00
options head
2012-10-30 03:06:31 +00:00
call ${1:s:V}.load('${2:#:module_name}')
2012-10-21 02:48:13 +00:00
# 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.