aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2013-05-15 08:51:37 +0900
committermattn <mattn.jp@gmail.com>2013-05-16 09:01:49 +0900
commitd005017de79d94b5779707c9585e94199271de01 (patch)
tree91c991ef19a5df6e51593a9923e21ba046ed315b
parent90f3d4fa65310db9a033875e63bc22197077fabb (diff)
downloadvim-sonictemplate-d005017de79d94b5779707c9585e94199271de01.tar.gz
vim-sonictemplate-d005017de79d94b5779707c9585e94199271de01.tar.bz2
vim-sonictemplate-d005017de79d94b5779707c9585e94199271de01.zip
Allow underscore for filter name
-rw-r--r--autoload/sonictemplate.vim2
-rw-r--r--template/go/snip-web-app-handlefunc.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim
index a3da853..6d0981e 100644
--- a/autoload/sonictemplate.vim
+++ b/autoload/sonictemplate.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_:\([a-zA-Z0-9_-]\+\)}}\s*'
let bf = matchstr(c, mx)
if len(bf) > 0
call s:setopt('filter', substitute(bf, mx, '\1', ''))
diff --git a/template/go/snip-web-app-handlefunc.go b/template/go/snip-web-app-handlefunc.go
index ff0c77b..2a470b0 100644
--- a/template/go/snip-web-app-handlefunc.go
+++ b/template/go/snip-web-app-handlefunc.go
@@ -1,3 +1,3 @@
http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf(w, "")
+ {{_cursor_}}
})