diff options
author | Teddy Wing | 2014-07-02 21:12:41 -0400 |
---|---|---|
committer | Teddy Wing | 2014-07-02 21:15:09 -0400 |
commit | 3160c656fbd1342ab5600a610117d46c3a4f63d4 (patch) | |
tree | 297d15374e1a4cfead11f92f0929965824beb5d9 /ftplugin | |
parent | 8e91fd7199961cad3918446ab05d0d11ef461dcd (diff) | |
download | dotvim-3160c656fbd1342ab5600a610117d46c3a4f63d4.tar.bz2 |
Add ftplugin/{html.vim,htmldjango.vim}
Gives me matchit plugin settings for HTML and Django templates without
including the entire ftplugin for either. Copied the settings from vim's
default ftplugins. Allows me to use matchit to jump between HTML tags
and <:>.
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/html.vim | 12 | ||||
-rw-r--r-- | ftplugin/htmldjango.vim | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/ftplugin/html.vim b/ftplugin/html.vim new file mode 100644 index 0000000..c33ddd4 --- /dev/null +++ b/ftplugin/html.vim @@ -0,0 +1,12 @@ +" HTML settings + +" matchit settings (for % matching) +" Copied from vim's default HTML ftplugin. I just want this, not the rest. My +" preference is still to disable all non-custom ftplugins. +if exists("loaded_matchit") + let b:match_ignorecase = 1 + let b:match_words = '<:>,' . + \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . + \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . + \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' +endif diff --git a/ftplugin/htmldjango.vim b/ftplugin/htmldjango.vim new file mode 100644 index 0000000..ca24ca5 --- /dev/null +++ b/ftplugin/htmldjango.vim @@ -0,0 +1,4 @@ +" Django HTML template settings + +" Inherit HTML settings +runtime! ftplugin/html.vim |