Friday, September 15, 2006

VIM 7 :: RE: turn off paren/parenthesis/whatever highlighting

The fix submitted before isn't reliable. That piece of magic in .vimrc does the job:

let loaded_matchparen = 1

It tells some plug-in/script/whatever that it has already did the job. If you put that in .vimrc - it would think that way always and would not load anymore. Nice.

P.S. The Tip was found here :help pi_paren.txt. It would be all really nice if computers had a special interface to read my mind - and tell me how the devels named particular feature. That way I will not need to waste weeks to find the corresponding help entry.

38 comments:

Anonymous said...

Thank You!!!
Matching parens have been slowly driving me insane.
Looking through the vim syntax scripts wasn't helping.

Anonymous said...

Does anyone know how *not* to have matching parentheses highlighted, but to still have some highlighted warning when parentheses are not matching, e.g. {]?

Ihar Filipau said...

Single unmatched ']' is already highlighted.

Paren matching is implemented quite simply in VIM - there is NO complete on-the-fly syntax parsing of whole file like done in Emacs.

The trick is simple. For example, unmatched '()' are caught as '({' or '([' - in other words inside of parens curly brackets may not occur. Same goes for square brackets.

To catch the case of unmatched '{', one would need to scan whole file, and yet the unmatched bracket would appear as if it was in the end of function/file. The curly brackets may have occurrences of other brackets inside, so the trick used for '[]' and '()' doesn't work.

P.S. I heard someone did something similar for case of properly indented file - when lines with opening and closing curly brackets are indented identically. I will try to think about it and if something would come to my mind, I'll post it.

Anonymous said...

You are my hero! I was about to revert to VIM 6!

Anonymous said...

Thank you, thank you, thank you. I've been driven to distraction by matching parens and I would *never* have found the "let loaded_matchparen = 1" solution on my own.

Anonymous said...

Nice tip. Cheers.

Paul Krizak said...

Good lord I was about to go absolutely insane with the stupid matchparen stuff. Great tip! Whoever decided this should be on by default should be shot.

Anonymous said...

Good grief that has been annoying me for months. Thanks!

Eric Radman said...

Thank you for ridding me of this stupid feature!

Anonymous said...

Thank you! I had to stop using VIM on a new machine for the last two days because of this feature.

Anonymous said...

Thanks for removing a irritation from my life, by showing me how to get rid of the matching parenthese so-called feature.

Anonymous said...

Thank you so much for this! I just recently upgraded 4 machines (2 Linux, 2 OS X) and the latest OS versions apparently all shipped with VIM 7. This abomination has been driving me nuts until I finally found this page! I already know about the % command and I can do my own matching in my head anyway, thankyouverymuch. I don't need that monstrous $#!@ing distraction every single time the cursor happens to go over a paren or bracket! Sheesh.

I agree with skaven about whoever made this the default -- while I'm fully against the death penalty, I'm willing to make an exception in this case!

Anonymous said...

Thank you, you are a hero. Since Debian Etch this has been the default and made it into a nightmare to program numerics, or to write Latex code.

Anonymous said...

Thanks a bunch! I enjoy the matching parentheses feature, but my 2.0 GHz machine was lagging and not moving the cursor as quickly as it should be able to when moving the cursor around over a bunch of parentheses, so I had to get rid of it.

Quinn Fazigu said...

Thanks much. As everyone else, the extra block cursor was driving me insane.

Also in Vim7: in insert mode, my backspace wouldn't back up over tabstops or newlines. set backspace=1 fixed that for me.

Anonymous said...

THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU.

That has been bothering me for MONTHS, and today I finally got around to searching for a resolution for it.

Sanity has been restored to my vi life. THANK YOU SO MUCH.

Wow.

Anonymous said...

Thanks god you found an posted this. The world looks so much brighter again with the right fix to ghis overly annoying unfeature.

Anonymous said...

Quote :
It would be all really nice if computers had special interface to read my mind and tell how devels named particular feature. That way I would not need waste weeks to find corresponding help entry.
: End Quote

That special interface comes in the form of your kind self for writting about this fix and google making it searchable.

I thank you, google and lots of others for making that special interface.

Happy computing to ya all :)

Anonymous said...

Vi(m) has been around for a number of years and is one the few pieces of software that a really mature. However, everytime I install a new version of linux I have to spend time dis-improving it.
Thank you very much for your help!
p.

Anonymous said...

Hey, can anyone tell me how to turn on paren-matching-highlighting? Personally I find it difficult to match all of my parens. I'm not writing in scheme or anything, but I think it'd still be handy. thx!

Anonymous said...

You RULE my WORLD!!! Thank you. It's just more annoying than helpful.

For those looking to pair parens/brakets/etc, I do not know how to make this happen in your syntax file (via coloring). However put your cursor on a paren in command mode (not insert), use [shift]+5, and it will zoom the cursor to the matching pair.

Anonymous said...

Thanks a lot for this!

Unknown said...

Let me add my praise to the stack. Thank You! To whom do I make out the check?

Ihar Filipau said...

> To whom do I make out the check?

It might sound ironic in the context, but there is a VIM sponsorship/registration where you can vote for features - with your money.

http://www.vim.org/sponsor/index.php

P.S. I'm in no way affiliated with VIM.org and VIM development team. Was myself "registered user" for couple of years ^_^

Anonymous said...

months and months and months, and i was finally fed up and had enough time to find a resolution. tried all the syntax stuff, would never have found this.

THANK YOU!

Anonymous said...

Thank you! This was such an annoying feature. No more though! ;-)

Unknown said...

Thanks!!! Whoever decided that this should be default enabled behavior should be taken out and beaten with a hose.

Anonymous said...

++ on the hose beating, ditch that default matching!!

Bob said...

Thank you!

Anonymous said...

THANK YOU!

Anonymous said...

Old post i know but cheers, Those damn blue blobs in my scripts have been driving me crazy!!. Thanx for the tip!

Anonymous said...

Another big thanks for helping me getting rid of the lamest feature ever! Showmatch was one thing, but this... Well, it's gone!

Anonymous said...

Thanks, this was a major help :)

Anonymous said...

Holy cow! You've saved us all!

THANK YOU!

Anonymous said...

Thank you!!! This has been driving me crazy for over a year!

Anonymous said...

Thank you, thank you, thank you! I went nuts due to this enhancement.

Anonymous said...

I've been in therapy for months!!! Issues all resolved with this one clue. Thanks!

Anonymous said...

God bless you for this post. Like everyone else, sm has driven me almost insane.