highlight matching brackets in vim
I'm a kate user but don't have that option on this particular machine.
How do I get vim to highlight matching parenthesis the way kate does? I know about the "<shift> %" option. Not what I want. So far have added these (and a few other) to .vimrc set nocompatible syntax on set showmatch set hlsearch set incsearch set mat=5 Is there a simple set option for this or is some type of script needed? Sorry if this is posted in the wrong forum, seemed like a likely place for a good answer. btw, using Slack 10.1 |
'set showmatch' highlights the matching braces|brackets|parens when the cursor is on a bracket.
What does kate do that you want vim to do? |
Nor sure you can do it in "vi"
Hi -
I think the issue is that vi's "<shift-%>" does brace matching by jumping back and forth between the two braces, whereas kate (and most IDE's and programmer's editors) visually highlight the area between them. I frankly don't know how to substitute a "visual highlight" for the "jump between" behavior in "vi" (or it's more specialized cousin, "vim"). I googled a little: 1. This page looks interesting (although it doesn't have a solution) http://www.moolenaar.net/habits.html 2. I also saw mention of a "RadRails plugin for vim". I haven't tried it, but it might be useful to you: http://www.radrails.org/ 3. RadRails looks less like a plug-in than a full-blown IDE. As I said above (and you undoubtedly already know), most IDEs (Eclipse, NetBeans, MSVC, etc etc) and most Programmer's editors (UltraEdit, CodeWright, etc etc) do visual syntax highlighting, hot-key compilation, syntax checking, etc etc 'Hope that helps .. PSM |
Quote:
Thanks for the info and the links, will check them out. vls Thanks for the reply. The behaviour you describe (highlight matching bracket) is what I had hoped for. It doesn't seem to be working that way. |
Quote:
There's a plugin to do the highlighting thing. Sorry, it's been awhile since I used vim and was thinking showmatch highlighted also. This is version 7 vim, Fire up vim then do the colon command thing, :help showmatch There's a link in the help files to the plugin in question, pi_paren.txt. Put your cursor on that and hit ctrl-] and it'll jump you to the docs. I think I got it this time, I hope. |
Quote:
Thanks for the help. |
All times are GMT -5. The time now is 09:13 PM. |