Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I know that alt + shift + "[" will take me to the top but is there one that will get to the end of a code block?

What I have tried:

tried the obvious alt + shift + "]" but no go
Posted
Comments
Pada Temp 14-Mar-24 8:27am    
the reason is i have long blocks of code and it takes time to scroll up and down to find boundaries
Dave Kreskowiak 14-Mar-24 12:52pm    
If you've got blocks of code that are THAT long, you've got serious organization issues. Try to keep methods down to about 20 to 30 lines of code max.

I fully realize there are times where you have to exceed that limit, but you should NEVER get a method that contains hundreds and hundreds or even thousands of lines of code.
Pada Temp 14-Mar-24 22:19pm    
why? and how?
Dave Kreskowiak 14-Mar-24 22:49pm    
A method should have a SINGLE, very clear and small purpose and do that one thing only. If it has to call another method to do something else that needs to be done, that's fine. The concept is called "separation of concerns." Code should be small and modular. This organizes your code to make it more readable, debuggable, and easier to maintain.

As for the how, that would take entire books to explain.
Pada Temp 15-Mar-24 9:19am    
I already use multiple methods that each have very specific purposes.

For US keyboard this may work:
Ctrl+Shift+\
Jump to matching bracket

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf[^]
 
Share this answer
 
v2
If you are inside an editor block, have you tried toggling around using Ctrl+]? Depending what you are trying to do, this can be a help to you. Combine this with Shift+Alt+[ to play around with moving around in the editor.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900