Skip to content

Commit

Permalink
prevent symbols from matching as matchit match_words
Browse files Browse the repository at this point in the history
  • Loading branch information
dkearns committed Oct 6, 2005
1 parent 138d5d6 commit f9690f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2005-10-06 Doug Kearns <djkea2@gus.gscit.monash.edu.au>

* ftplugin/ruby.vim: prevent symbols from matching as matchit
match_words

2005-10-05 Doug Kearns <djkea2@gus.gscit.monash.edu.au>

* NEWS: updated for new release
Expand Down
6 changes: 3 additions & 3 deletions ftplugin/ruby.vim
Expand Up @@ -32,18 +32,18 @@ if exists("loaded_matchit") && !exists("b:match_words")
" TODO: improve optional do loops
let b:match_words =
\ '\%(' .
\ '\%(\%(\.\|\:\:\)\s*\)\@<!\<\%(class\|module\|begin\|def\|case\|for\|do\)\>' .
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<\%(class\|module\|begin\|def\|case\|for\|do\)\>' .
\ '\|' .
\ '\%(\%(^\|\.\.\.\=\|[\,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\%(if\|unless\|until\|while\)\>' .
\ '\)' .
\ ':' .
\ '\%(' .
\ '\%(\%(\.\|\:\:\)\s*\)\@<!\<\%(else\|elsif\|ensure\|when\)\>' .
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<\%(else\|elsif\|ensure\|when\)\>' .
\ '\|' .
\ '\%(\%(^\|;\)\s*\)\@<=\<rescue\>' .
\ '\)' .
\ ':' .
\ '\%(\%(\.\|\:\:\)\s*\)\@<!\<end\>'
\ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<end\>'

let b:match_skip =
\ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" .
Expand Down

0 comments on commit f9690f7

Please sign in to comment.