
Is there any shortcut in Notepad++ to select all (highlight) codes between the curly braces (start & end)?
E.g. Code between if-else, nethod definition, while, for loop etc.
Antwort1
Ctrl+Alt+B does that (shows in “Search” drop down also).
Antwort2
I don't know of any shortcut in Notepad++ that could do what you are trying to achieve but you could record a macro and assign a keyboard shortcut to it:
- in the 'Macro' menu click 'Start Recording'
- press CTRL + F
- in 'Find what' give the following Regular Expression:
(?<=\{)[^}]+(?=\})
(this will find and select all text between 2 matching curly brackets) - make sure that you tick 'Regular Expression' under 'Search Mode'
- click 'Find Next'
- in the 'Macro' menu click 'Stop Recording', then 'Save Current Recorded Macro...'
Im letzten Schritt besteht die Möglichkeit, diesem Makro eine Tastenkombination zuzuweisen.