From 58b5595f88909e9d45eb338e31d2952a8e1d9c8f Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Mon, 4 Jul 2016 09:26:48 +0900 Subject: postfix --- doc/sonictemplate-vim.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/sonictemplate-vim.txt b/doc/sonictemplate-vim.txt index 429ffa7..0cde2c0 100644 --- a/doc/sonictemplate-vim.txt +++ b/doc/sonictemplate-vim.txt @@ -16,6 +16,7 @@ CONTENTS *sonictemplate-vim-contents* Introduction |sonictemplate-vim-introduction| Install |sonictemplate-vim-install| Tutorial |sonictemplate-vim-tutorial| +Postfix Completion |sonictemplate-vim-postfix-completion| Customize |sonictemplate-vim-customize| Unite Source |sonictemplate-vim-unitesource| Write Your Template |sonictemplate-vim-writetemplate| @@ -105,6 +106,34 @@ For example, you are writing C++ file. return 0; } < +============================================================================== +POSTFIX COMPLETION *sonictemplate-vim-postfix-completion* + +Sonictemplate provide postfix-completion. For example: > + + name.var_ +< +Typing "" expand to: > + + var name = _; +< +You can customize your own postfix patterns with putting file "pattern.stpl" +in template directory. > + + \(\S\+\)\.var$ + var {{$1}} = {{_cursor_}}; + + ^\s*\zs\(\S.*\)\.throw$ + throw {{$1}}; + + \(\S\+\)\.notif$ + if ({{$1}} != null) { + {{_cursor_}} + } +< +The pattern must be located at leading of per lines. The texts should be +expanded are following with tab characters prefixed. + ============================================================================== CUSTOMIZE *sonictemplate-vim-customize* -- cgit v1.2.3-54-g00ecf