6

In Notepad++ How to select all (Highlight) codes between Curly braces (Start & End)? For eg. If-else, Method definition, While, For loop etc. I remember similar option is available with Adobe Dreamweaver where we can perform this CTRL ' (Holding the control key & single quote together). In Notepad++ How to achieve the same?

Thanks In Advance.

Jenson M John
  • 4,972
  • 4
  • 25
  • 45

4 Answers4

12

From Notepad++ v6.4.4: This feature got added in - Add selection between matching braces feature.

How to achieve :

Select a curly brace { press Ctrl+Alt+B to highlight the section.

Jenson M John
  • 4,972
  • 4
  • 25
  • 45
2

You can take the help of this attached image

enter image description here

Rohitashv Singhal
  • 4,261
  • 13
  • 48
  • 100
2

At Settings->Preferences->Delimiter, change the delimiters from parentheses to braces and check the multi-line box. Then you can Ctrl-double-click on either brace to highlight everything in between.

Also, to jump between braces you can use Ctrl-b.

spanut01
  • 21
  • 1
1

Put your cursor at the starting of the curly brace, it will go red and together its complementy will also go red, locate this red closing curly brace, hold your shift key and click on this closing red brace. you code will be selected ...

Rohitashv Singhal
  • 4,261
  • 13
  • 48
  • 100
  • 1
    Thanks @lord_linus But My actual Problem, I couldn't find the closing brace since the code has 5000+ lines. Is there no other way to select whole code within the braces? – Jenson M John Aug 09 '13 at 07:03
  • When you will have a simple overview of the code then this will be catchy to your eyes directly, and also you see a - sign in front of the first curly brace, you can compress with that also, – Rohitashv Singhal Aug 09 '13 at 07:15