Wikia

Vim Tips Wiki

Changes: Script:39

Edit

Back to page

(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 16: Line 16:
 
</pre>
 
</pre>
 
:Arguably, the default settings ought to contain these values, however I would hardly call the plugin "unstable" and recommend against using it because of something as trivial as this. The plugin is stable and useful enough '''to be included in the standard Vim installation's runtime'''. Always consult the help before assuming the behavior of a plugin or a Vim feature is a bug. --[[User:Fritzophrenic|Fritzophrenic]] 14:29, July 1, 2011 (UTC)
 
:Arguably, the default settings ought to contain these values, however I would hardly call the plugin "unstable" and recommend against using it because of something as trivial as this. The plugin is stable and useful enough '''to be included in the standard Vim installation's runtime'''. Always consult the help before assuming the behavior of a plugin or a Vim feature is a bug. --[[User:Fritzophrenic|Fritzophrenic]] 14:29, July 1, 2011 (UTC)
  +
  +
==Bug==
  +
Vim 7.0.235 : Ruby's "<stmt> if <expr>" construct is inappropriately matching end statements because of the way it searches backwards. A simple fix might be to require the if to be the first non-whitespace element on the candidate matching line.

Latest revision as of 18:31, March 22, 2013

Use this page to discuss script 39 matchit: extended % matching

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

This appears to be the same plugin which is distributed with the official Vim runtime, in $VIMRUNTIME/macros/matchit.vim. See :help matchit-install.

CommentsEdit

It is very useful when edit the html file use vim to speed up the production effiency

BugEdit

Vim 6.3.82 is working fine, but Vim 7.0.237 couldn't work if not manually type in/source let b:match_words=...

Vim 7.0.237 is really old (though not quite as old as 6.3.82). Try upgrading. Vims 7.1, 7.2, and 7.3 all work fine with matchit.vim. --Fritzophrenic 15:22, February 21, 2011 (UTC)

Vim 7.3 : Matchit makes pressing % on ( or { or [ or ] or } or ) and other things not work in javascript files and files when there is <script>javascript code()</script>. Plugin is unstable and should not be used.

The first statement here, that matchit.vim breaks (, {, and [ is only partially true. I did just experiment and discovered that by default, pressing % on these has no effect. However, this is not a defect in the plugin itself. This is a misconfiguration of the b:match_words variable, which a simple glance at the help file for matchit.vim would have discovered. Adding the following to an after/ftplugin/html.vim file will "fix" the issue:
let b:match_words .= ',{:},(:),[:]'
Arguably, the default settings ought to contain these values, however I would hardly call the plugin "unstable" and recommend against using it because of something as trivial as this. The plugin is stable and useful enough to be included in the standard Vim installation's runtime. Always consult the help before assuming the behavior of a plugin or a Vim feature is a bug. --Fritzophrenic 14:29, July 1, 2011 (UTC)

BugEdit

Vim 7.0.235 : Ruby's "<stmt> if <expr>" construct is inappropriately matching end statements because of the way it searches backwards. A simple fix might be to require the if to be the first non-whitespace element on the candidate matching line.

Around Wikia's network

Random Wiki