Quantcast

Maximum PC

It is currently Sun Sep 21, 2014 10:21 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Notepad++ Paren Highlighting
PostPosted: Wed Feb 29, 2012 12:27 pm 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Thu Dec 23, 2004 2:34 pm
Posts: 3974
Location: Building my 4-8-9
I use Notepad++ (it or UltraEdit are company enforced choices--please for the love of all that's holy none of those "But you should try ___!" posts).

I frequently work with lengthy boolean text strings. Needless to say, the nesting can get deep. Notepad++ will highlight an unbalanced parentheses if you have the cursor next to said parentheses. What it doesn't do (at least not the stock version anyway) is highlight bad parentheses no matter where your cursor is. Does anyone know of a way to get the program (or UltraEdit v16--the one we have licenses for) to light up bad/unbalanced parentheses automatically?


Top
  Profile  
 
 Post subject: Re: Notepad++ Paren Highlighting
PostPosted: Thu Mar 01, 2012 9:27 am 
Smithfield
Smithfield

Joined: Sun Jun 18, 2006 7:37 pm
Posts: 5257
No, and I'm not aware of any text editor in the world that does this. It probably has to do with the fact that braces are not considered anything important in code, unlike a keyword. Not to sound mean, but if you have unbalanced braces everywhere, you should get into the habit of completing them as you create them to avoid this problem.

Also if you have bad nesting (which personally I consider anything beyond two levels bad, beyond three you should be whacked upside the head), you should rethink your conditional statements/logic/program flow etc.


Top
  Profile  
 
 Post subject: Re: Notepad++ Paren Highlighting
PostPosted: Sat Mar 03, 2012 5:02 pm 
7yrs+11,000 Posts
7yrs+11,000 Posts
User avatar

Joined: Tue Jul 27, 2004 5:44 pm
Posts: 11242
Location: The kitten above is not on fire.
LatiosXT wrote:
the fact that braces are not considered anything important in code

LOL what?

Sovereign wrote:
I use Notepad++ (it or UltraEdit are company enforced choices--please for the love of all that's holy none of those "But you should try ___!" posts).

I frequently work with lengthy boolean text strings. Needless to say, the nesting can get deep. Notepad++ will highlight an unbalanced parentheses if you have the cursor next to said parentheses. What it doesn't do (at least not the stock version anyway) is highlight bad parentheses no matter where your cursor is. Does anyone know of a way to get the program (or UltraEdit v16--the one we have licenses for) to light up bad/unbalanced parentheses automatically?

There is a "bad bracket" style in the style settings, try playing with that.


Top
  Profile  
 
 Post subject: Re: Notepad++ Paren Highlighting
PostPosted: Tue Mar 06, 2012 7:49 am 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Thu Dec 23, 2004 2:34 pm
Posts: 3974
Location: Building my 4-8-9
Bad Brace color/style only applies with the "cursor next to the brace in question." However, I am going to see about radically changing the font for a bad brace so a quick arrow-key-through will easily show unbalanced braces.


Top
  Profile  
 
 Post subject: Re: Notepad++ Paren Highlighting
PostPosted: Tue Mar 06, 2012 9:50 am 
Smithfield
Smithfield

Joined: Sun Jun 18, 2006 7:37 pm
Posts: 5257
gamerfreak wrote:
LOL what?

i.e., not a keyword or variable name. Not to mention every time you type something in the editor, it has to reparse for bad braces if it were to highlight bad braces automatically. Besides that, if you're using a compiler, it'll tell you if you have a bad brace (not sure for straight interpreted languages). Either way, make it a habit to close braces when you open a new one up before doing anything else. You won't run into this problem as much.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group