Permalink
Browse files

Matchit support for snippet files

If the matchit (http://www.vim.org/scripts/script.php?script_id=39)
plugin is loaded, define pairs to be handled by the % key.
  • Loading branch information...
1 parent 1f151be commit 5f6d281687615f5a5391c55401809dcd22b5df2d @aschrab aschrab committed with SirVer Aug 20, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 ftplugin/snippets.vim
@@ -3,3 +3,10 @@
" Fold by syntax, but open all folds by default
setlocal foldmethod=syntax
setlocal foldlevel=99
+
+" Define match words for use with matchit plugin
+" http://www.vim.org/scripts/script.php?script_id=39
+if exists("loaded_matchit") && !exists("b:match_words")
+ let b:match_ignorecase = 0
+ let b:match_words = '^snippet\>:^endsnippet\>,^global\>:^endglobal\>,\${:}'
+endif

0 comments on commit 5f6d281

Please sign in to comment.