diff options
author | mattn <mattn.jp@gmail.com> | 2011-10-28 09:51:31 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2011-10-28 09:51:31 +0900 |
commit | cb98d68e685247afe5ce09a9da734acda9669875 (patch) | |
tree | 52c369500e95378a457faa2dc6562c5b0269d409 | |
parent | 50270c6dd21fb071fdb19e37f8dc95f4d6dff616 (diff) | |
download | vim-sonictemplate-cb98d68e685247afe5ce09a9da734acda9669875.tar.gz vim-sonictemplate-cb98d68e685247afe5ce09a9da734acda9669875.tar.bz2 vim-sonictemplate-cb98d68e685247afe5ce09a9da734acda9669875.zip |
updated doc.
-rw-r--r-- | doc/template-vim.txt | 53 |
1 files changed, 37 insertions, 16 deletions
diff --git a/doc/template-vim.txt b/doc/template-vim.txt index d903d8b..0e49f8c 100644 --- a/doc/template-vim.txt +++ b/doc/template-vim.txt @@ -124,31 +124,52 @@ Note that I'm using pathogen-vim. doc template.txt template - main.go - package.go - package.perl - script.perl - ... -< -Template can have some keywords. + go ... filetype go + base-main.go ... base main + base-package.go ... base package + snip-goroutine.go ... snippet for goroutine + ... + perl ... filetype perl + base-package.pl ... base package + base-script.pl ... base script + snip-dbi-connect-sqlite.pl ... snippet for DBI/SQLite + ... + +1. The filename have following rule. + + |[kind]|-|[name]|.|[extension]| + + |[kind]| 'base' or 'snip' should be used. + + 'base' is used when buffer is empty. + + |[name]| template name + + Words in the name must join with '-'. + + |[extension]| file name extension like ".c". + + If several extensions are exists in same directory, the first found is used. + +2. Template can have some keywords. -|{{_name_}}| the filename without extension. + |{{_name_}}| the filename without extension. - If you are opening "foo.pl" for perl, {{_name_}} become "foo". + If you are opening "foo.pl" for perl, {{_name_}} become "foo". -|{{_cursor_}}| : cursor position. + |{{_cursor_}}| : cursor position. - When expanded template, cursor will be moved to there. + When expanded template, cursor will be moved to there. -|{{_input_:var}}| : ask the value of "var". + |{{_input_:var}}| : ask the value of "var". - When expanded template, cursor will be moved to there. + When expanded template, cursor will be moved to there. -|{{_expr_:xxx}}| : expression in vimscript. + |{{_expr_:xxx}}| : expression in vimscript. - For example, "Current Time:|{{_expr_:strftime('%c')}}|" will be + For example, "Current Time:|{{_expr_:strftime('%c')}}|" will be > - Current Time: 2011/10/27 20:19:00 + Current Time: 2011/10/27 20:19:00 < ============================================================================== vim:tw=78:ts=8:ft=help:norl:noet:fen:fdl=0: |