Mercurial > vim
comparison runtime/plugin/matchparen.vim @ 818:1f929f3ca806 v7.0c03
updated for version 7.0c03
author | vimboss |
---|---|
date | Wed, 29 Mar 2006 21:18:24 +0000 |
parents | 8b0484fd9119 |
children | 23f82b5d2814 |
comparison
equal
deleted
inserted
replaced
817:6897668c467f | 818:1f929f3ca806 |
---|---|
1 " Vim plugin for showing matching parens | 1 " Vim plugin for showing matching parens |
2 " Maintainer: Bram Moolenaar <Bram@vim.org> | 2 " Maintainer: Bram Moolenaar <Bram@vim.org> |
3 " Last Change: 2006 Mar 14 | 3 " Last Change: 2006 Mar 29 |
4 | 4 |
5 " Exit quickly when: | 5 " Exit quickly when: |
6 " - this plugin was already loaded (or disabled) | 6 " - this plugin was already loaded (or disabled) |
7 " - when 'compatible' is set | 7 " - when 'compatible' is set |
8 " - the "CursorMoved" autocmd event is not availble. | 8 " - the "CursorMoved" autocmd event is not availble. |
61 endif | 61 endif |
62 endif | 62 endif |
63 | 63 |
64 " Figure out the arguments for searchpairpos(). | 64 " Figure out the arguments for searchpairpos(). |
65 " Restrict the search to visible lines with "stopline". | 65 " Restrict the search to visible lines with "stopline". |
66 " And avoid searching very far (e.g., for closed folds) | |
66 if i % 2 == 0 | 67 if i % 2 == 0 |
67 let s_flags = 'nW' | 68 let s_flags = 'nW' |
68 let c2 = plist[i + 1] | 69 let c2 = plist[i + 1] |
69 let stopline = line('w$') | 70 let stopline = line('w$') |
71 if stopline > c_lnum + 100 | |
72 let stopline = c_lnu + 100 | |
73 endif | |
70 else | 74 else |
71 let s_flags = 'nbW' | 75 let s_flags = 'nbW' |
72 let c2 = c | 76 let c2 = c |
73 let c = plist[i - 1] | 77 let c = plist[i - 1] |
74 let stopline = line('w0') | 78 let stopline = line('w0') |
79 if stopline < c_lnum - 100 | |
80 let stopline = c_lnu - 100 | |
81 endif | |
75 endif | 82 endif |
76 if c == '[' | 83 if c == '[' |
77 let c = '\[' | 84 let c = '\[' |
78 let c2 = '\]' | 85 let c2 = '\]' |
79 endif | 86 endif |