aboutsummaryrefslogtreecommitdiffstats
path: root/ftdetect/htmlerb.vim
diff options
context:
space:
mode:
authorTeddy Wing2017-02-07 16:53:12 +0100
committerTeddy Wing2017-02-07 16:56:28 +0100
commitdeef4f6d68deb7c3df2505acbfecdfd85529939e (patch)
tree8cb116181a3d2a3b928ada78c6941f740e58d1e8 /ftdetect/htmlerb.vim
parent9ee93c037e21f90650004175850f84a5b6d6d699 (diff)
downloaddotvim-deef4f6d68deb7c3df2505acbfecdfd85529939e.tar.bz2
Create new filetype plugin 'htmlerb'
I want the HTML matchit command to be available in *.html.erb files. Normally, these files get loaded as `filetype=eruby`. The trouble with that is that not all eruby is HTML, so I can't load the matcher in the 'eruby' filetype because it might not make sense. Create a new special filetype for *.html.erb files that uses the normal eruby syntax, but includes the HTML matchit command.
Diffstat (limited to 'ftdetect/htmlerb.vim')
-rw-r--r--ftdetect/htmlerb.vim1
1 files changed, 1 insertions, 0 deletions
diff --git a/ftdetect/htmlerb.vim b/ftdetect/htmlerb.vim
new file mode 100644
index 0000000..d0a08ee
--- /dev/null
+++ b/ftdetect/htmlerb.vim
@@ -0,0 +1 @@
+autocmd BufRead,BufNewFile *.html.erb set filetype=htmlerb syntax=eruby