aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2013-05-15 08:49:07 +0900
committermattn <mattn.jp@gmail.com>2013-05-16 09:01:48 +0900
commita866d47b860d336b7aee84751d7f5b543ce5f88d (patch)
tree447fc60ba390af874097507b68cca75adb8c1369
parentefc09b1faa3fb90b2194c502768254973bb4341f (diff)
downloadvim-sonictemplate-a866d47b860d336b7aee84751d7f5b543ce5f88d.tar.gz
vim-sonictemplate-a866d47b860d336b7aee84751d7f5b543ce5f88d.tar.bz2
vim-sonictemplate-a866d47b860d336b7aee84751d7f5b543ce5f88d.zip
Allow dash for filter
-rw-r--r--autoload/sonictemplate.vim4
-rw-r--r--template/go/base-web-app.go1
2 files changed, 3 insertions, 2 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim
index 1728de8..a3da853 100644
--- a/autoload/sonictemplate.vim
+++ b/autoload/sonictemplate.vim
@@ -1,7 +1,7 @@
"=============================================================================
" sonictemplate.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
-" Last Change: 09-May-2013.
+" Last Change: 15-May-2013.
let s:save_cpo = &cpo
set cpo&vim
@@ -218,7 +218,7 @@ function! sonictemplate#apply(name, mode, ...) abort
if len(c) == 0
return
endif
- let mx = '{{_filter_:\(\w\+\)}}\s*'
+ let mx = '{{_filter_:\(\W\+\)}}\s*'
let bf = matchstr(c, mx)
if len(bf) > 0
call s:setopt('filter', substitute(bf, mx, '\1', ''))
diff --git a/template/go/base-web-app.go b/template/go/base-web-app.go
index b760d93..0ca7e3b 100644
--- a/template/go/base-web-app.go
+++ b/template/go/base-web-app.go
@@ -11,3 +11,4 @@ func main() {
})
http.ListenAndServe(":8080", nil)
}
+{{_filter_:web-app}}