diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/sonictemplate-vim.txt | 29 |
1 files changed, 29 insertions, 0 deletions
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| @@ -106,6 +107,34 @@ For example, you are writing C++ file. } < ============================================================================== +POSTFIX COMPLETION *sonictemplate-vim-postfix-completion* + +Sonictemplate provide postfix-completion. For example: > + + name.var_ +< +Typing "<c-y><c-y>" 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* You can modify template directory for your-self templates: > |