Vim Tips Wiki

Enable paren matching over whole file

Redirected from VimTip1391

1,624pages on
this wiki
Add New Page
Talk0 Share

This tip is deprecated for the following reasons:

This is highly version-specific. Should delete this tip.

Tip 1391 Printable Monobook Previous Next

created 2006 · complexity basic · author pulp · version 

The matchparen.vim plugin (delivered with Vim) restricts paren matching only to the current visible lines.

To change this behavior you need to change the following lines in the file ../plugin/matchparen.vim:

line: 102
 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip)

line: 109
 if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$')
 if m_lnum > 0


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.