tEchoPair : Display the matching parenthesis/pair in the echo area
| script karma
Downloaded by 579
Comments, bugs, improvements
script versions (upload new version)
|VIM is an excellent editor but in comparison too e.g. emacs it lacks a
minor feature that makes editing lisp code somewhat cumbersome. While
VIM can highlight the matching parenthesis, this doesn't help much with
long functions when the matching parenthesis is off the screen.
Emacs users are better off in such a situation, since emace displays the
matching line in the echo area.
This plugin tries to mimic Emacs's behaviour. Whenever the cursor is
placed over a parenthesis or an element of a pair the matching element is
displayed in the echo area. If 'cmdheight' is set to a value greater
than 1, additional context lines are displayed, too.
In order to enable this plugin, you choose between the following
TEchoPairInstallBuffer ... enable for the current buffer
call TEchoPairInstall('*') ... enable globally
let g:tEchoPairInstall = ['lisp', 'scheme'] ... enable for certain
Currently, there are the following display modes:
indicate ... Display the whole line and highlight the matching
parenthesis. If 'cmdheight' is greater than 1, additional lines
inner ... Display the inner text Emacs-style.
In order to see the matching parenthesis when 'showmode' is on, set
'cmdheight' to something greater than 1.
You can select the preferred display mode on a filetype basis, by
let g:tEchoPairStyle_inner = ['lisp', 'scheme']
let g:tEchoPairStyle_indicate = ['java']
The pairs are usually deduced from the value of 'matchpairs' unless
there is an entry for the current buffer's filetype in g:tEchoPairs. For
the following filetypes custom pairs are pre-defined:
BUT: It actually only works for lisp-like languages.
|Copy to ~/.vim/plugin/
Also available via git
Click on the package to download.
ip used for rating: 188.8.131.52