Posts tagged 'Scrolling and Navigation'

Thursday, August 28, 2014

Tip 1.25: How to increase the editor's ToolTip font size

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Go to Tools–Options–Environment–Fonts And Colors and, under Show Settings For, select Editor Tooltip.



Then you can customize the font and font size.



Happy Programming! =)
Posted by Nils-Holger at 2:15 PM with 439 comments.

Wednesday, August 27, 2014

Tip 1.24: How to enable virtual space

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

This tip is mutually exclusive to the previously mentioned word wrap feature, Tip 1.23. Try as you might, you won't be able to enable both word wrap and virtual space. But if you figure out a way to do it, please don't hesitate to let her know how you did it!


In the following example, the cursor is located in the virtual space. She has enabled the Visible White Space option to illustrate there are no spaces after the Program class name.



Sara Aside

She never uses word wrap, and she made it through only a few weeks using virtual space when she was testing it. Neither option was quite for her. When she posted this tip, she asked readers to describe why they use these options. She knew she would learn something new.


Happy Programming! =)
Posted by Nils-Holger at 12:52 PM with 435 comments.

Tuesday, August 26, 2014

Tip 1.23: How to enable word wrap

"Visual Studio Tips, 251 ways to improve your Productivity, in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



The next image illustrates wrapping a line of text onto the next line.



Go to Tools–Options–Text Editor–All Languages–General, and check the Word Wrap option. When it is checked, you'll also have the option to Show Visual Glyphs For Word Wrap.



You can customize the foreground color of the visual glyph for a word wrap on the Tools–Options–Environment–Fonts And Colors by modifying the Visible White Space item.



Happy Programming! =)
Posted by Nils-Holger at 1:11 PM with 769 comments.

Monday, August 25, 2014

Tip 1.22: How to use Ctrl+G without the Go To Line dialog box popping up

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



This tip is pretty straightforward: Pressing Ctrl+G will pop up the Go To Line dialog box.



But did you know there's a way to use Ctrl+G without bringing up this dialog box?
  1. Press Ctrl+D to go to the Find combo box on the standard toolbar.
  2. Type in the line number.
  3. Press Ctrl+G. (Note: Do not press Enter; if you do, you'll search for the number!)


Congrats! You've just navigated to the line without the Go To Line window coming up.

You can try to navigate to line 0, but Visual Studio will take you to line 1.

Happy Programming! =)
Posted by Nils-Holger at 12:30 PM with 666 comments.

Sunday, August 24, 2014

Tip 1.21: How to enable URL navigation within the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Under Tools–Options–Text Editor–All Languages–General, there is the Enable Single-Click URL Navigation option. This option is enabled by default for most editors. But, just in case you're not able to click on a URL, here's where to go to verify the option is set.



Happy Programming! =)
Posted by Nils-Holger at 1:16 PM with 721 comments.

Saturday, August 23, 2014

Tip 1.20: You can use F6 to jump between split panes in the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

When she originally wrote and published this tip, she had to laugh at the fact that there was a six-month gap between this tip and Tip 1.19, which describes how to split the panes. The first week she started the "Tip of the Day" series on her blog, she came to the harsh reality that you actually have to write a tip of the day every single day. She was at a conference during the first week of writing "Tip of the Day," so the initial tips were those she could write the fastest. There was no rhyme or reason behind the madness; hence, the six-month gap between Tip 1.19 and Tip 1.20.


Once you have used the splitter to split the editor window, you can use F6 to jump between the editor views.



Happy Programming! =)
Posted by Nils-Holger at 11:28 AM with 631 comments.

Friday, August 22, 2014

Tip 1.19: How to split a window and create new windows

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



There are two ways to split the current window:
  • From the Menu Bar, go to Window–Split.
  • Using the mouse, grab the splitter control found directly above the document scrollbar, as shown in the next illustration.




But the split command works only horizontally. If you need to split vertically as illustrated in the following picture, use the Window.NewWindow command found at Window–New Window. This will create the windows "Program.cs:1" and "Program.cs:2." Then you can use the Window–New Vertical Tab Group command to separate both files with a vertical divider.



Happy Programming! =)
Posted by Nils-Holger at 1:45 PM with 461 comments.

Thursday, August 21, 2014

Tip 1.18: How to reach the navigation bar via the keyboard

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



At the very top of the editor and just below the file tab channel, you'll find the navigation bar. The left combo box lists objects, and the right one lists the selected object's members. These combo boxes are very useful when you need to jump to various functions throughout a large solution or you want to see what functions an object has.



To jump to the navigation bar via the keyboard, press Ctrl+F2. This keyboard shortcut is bound to the Window.MoveToNavigationBar command. To toggle between the Objects list and the Members list, press Tab or Shift+Tab.

Additionally, you can hide (or show) the navigation bar by going to Tools–Options–Text Editor–All Languages–General and setting the Navigation Bar option to the desired setting. Note that since this option is found in the All Languages pane, you can customize it for any listed language under the Text Editor node.



Happy Programming! =)
Posted by Nils-Holger at 12:25 PM with 448 comments.

Wednesday, August 20, 2014

Tip 1.17: How to use Undo to jump the cursor back to the last insertion point

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



In Tip 1.16, you learned more than you ever wanted to know about go-back markers. For this tip, you'll learn how insertion points are slightly different. They are similar to the go-back markers, but they are applied anywhere you click the mouse or jump the cursor to. The go-back marker "11 or more lines" rule doesn't apply.



The option, which is shown in the next illustration, can be found at Tools–Options–Text Editor–General.



To give it a try, just click somewhere, then click somewhere else (or use Find or a Go To Line if you're using the keyboard), and then click Undo. You'll move back to that previous location.

Happy Programming! =)
Posted by Nils-Holger at 12:29 PM with 442 comments.

Tuesday, August 19, 2014

Tip 1.16: How to navigate forward and backward in the editor all because of go-back markers

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



In the standard toolbar, there are Navigate Backward and Navigate Forward icons.



In the editor, the Navigate Backward command is bound to Ctrl+Minus, and the Navigate Forward command is bound to Ctrl+Shift+Minus. She finds these commands most helpful when navigating around multiple files or jumping through call stacks.

This concludes your "Basic Editor Navigation 101" course. Now it is time for the "Advanced Editor Navigation 201" course.

You may have noticed that the Navigate Backward button additionally contains a drop-down list box. Displaying the items in this list box shows you all the places that have a go-back marker. In other words, when you hit the Navigate Backward button, you are going to the most recently visited go-back marker.

If we've done our jobs right, the go-back navigation should feel natural. But if you're like her, you like to know the little ins and outs of how things work.

A go-back marker is dropped under the following conditions:
  • An incremental search (including reverse) leaves a go-back marker at the beginning of the search and another one at the end.
  • A Go To Line action, like Ctrl+G, or a mouse-click that moves the cursor 11 lines or more from the current position drops a go-back marker at the new location.
  • A destructive action (like hitting Backspace) after having moved the cursor to a new location drops a go-back marker.
  • Doing a search, like Ctrl+F, drops a go-back marker at the found location.
  • Opening a file drops a go-back marker wherever the cursor was on the old file and drops another on the opened file.
  • If you've found a condition where you'd like to see a go-back marker dropped, let her know.


Happy Programming! =)
Posted by Nils-Holger at 12:02 PM with 651 comments.

Monday, August 18, 2014

Tip 1.15: You can hide the vertical and horizontal scroll bars in the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



This tip truly embraces the spirit of "Did you know?"

Go to Tools–Options–Text Editor–General, and under Display, you can uncheck the Vertical Scroll Bar and the Horizontal Scroll Bar options.



Now your scroll bars are hiding from you. And yes, you can still scroll both vertically and horizontally in this state.



Happy Programming! =)
Posted by Nils-Holger at 1:04 PM with 446 comments.

Sunday, August 17, 2014

Tip 1.14: How to jump to the top or bottom of the current view in the editor without scrolling

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Unlike pressing PgUp or PgDn, which causes the editor to move either up or down a page, the following keyboard shortcuts cause only the cursor to move:

  • Ctrl+PgUp jumps the cursor to the top of the current editor view without moving the current view, unlike a PgUp.
  • Ctrl+PgDn jumps the cursor to the bottom of the current editor view without moving the current view, unlike a PgDn.
If you find yourself using the keyboard shortcuts just shown, you may find these additional shortcuts helpful:
  • Ctrl+Shift+PgUp selects all the text between the current cursor location (near the bottom of the screen in the following illustration) and the top of the current editor view.
  • Ctrl+Shift+PgDn selects all the text between the current cursor location and the bottom of the current editor view.


One thing to note is that all four commands jump the cursor straight up, meaning that it doesn't go to the beginning of the line on that top line, but rather it goes as close as possible to the current column position, as you saw in the preceding illustrations.

Happy Programming! =)
Posted by Nils-Holger at 1:05 PM with 433 comments.

Saturday, August 16, 2014

Tip 1.13: How to use the mouse wheel for scrolling in all directions

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Did you know that you can press down on the mouse wheel and have it act as a third button? For many applications that have an editor, pressing the mouse wheel displays an icon indicating which directions you can scroll in. Some require holding down the mouse wheel; others don't.

In the editor, press the mouse wheel just once and you'll see an icon indicating which directions you can scroll in.



A couple of things to note:
  • The farther away the mouse is from the directional icon, the faster the editor will scroll.
  • Pressing the primary mouse button stops the scroll, but you have to press the button again to move the cursor to the desired location.


Happy Programming! =)
Posted by Nils-Holger at 1:39 PM with 440 comments.

Tuesday, December 17, 2013

Tip 1.24: How to enable virtual space

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

This tip is mutually exclusive to the previously mentioned word wrap feature, Tip 1.23. Try as you might, you won't be able to enable both word wrap and virtual space. But if you figure out a way to do it, please don't hesitate to let her know how you did it!
In the following example, the cursor is located in the virtual space. She has enabled the Visible White Space option to illustrate there are no spaces after the Program class name.



Sara Aside

She never uses word wrap, and she made it through only a few weeks using virtual space when she was testing it. Neither option was quite for her. When she posted this tip, she asked readers to describe why they use these options. She knew she would learn something new.


Happy Programming! =)
Posted by Nils-Holger at 12:38 PM with 440 comments.

Monday, December 16, 2013

Tip 1.23: How to enable word wrap

"Visual Studio Tips, 251 ways to improve your Productivity, in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



The next image illustrates wrapping a line of text onto the next line.



Go to Tools–Options–Text Editor–All Languages–General, and check the Word Wrap option. When it is checked, you'll also have the option to Show Visual Glyphs For Word Wrap.



You can customize the foreground color of the visual glyph for a word wrap on the Tools–Options–Environment–Fonts And Colors by modifying the Visible White Space item.



Happy Programming! =)
Posted by Nils-Holger at 12:35 PM with 442 comments.

Sunday, December 15, 2013

Tip 1.22: How to use Ctrl+G without the Go To Line dialog box popping up

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



This tip is pretty straightforward: Pressing Ctrl+G will pop up the Go To Line dialog box.



But did you know there's a way to use Ctrl+G without bringing up this dialog box?
  1. Press Ctrl+D to go to the Find combo box on the standard toolbar.
  2. Type in the line number.
  3. Press Ctrl+G. (Note: Do not press Enter; if you do, you'll search for the number!)
Congrats! You've just navigated to the line without the Go To Line window coming up. You can try to navigate to line 0, but Visual Studio will take you to line 1.

Happy Programming! =)
Posted by Nils-Holger at 1:04 PM with 445 comments.

Saturday, December 14, 2013

Tip 1.21: How to enable URL navigation within the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Under Tools–Options–Text Editor–All Languages–General, there is the Enable Single-Click URL Navigation option. This option is enabled by default for most editors. But, just in case you're not able to click on a URL, here's where to go to verify the option is set.



Happy Programming! =)
Posted by Nils-Holger at 3:07 PM with 645 comments.

Friday, December 13, 2013

Tip 1.20: You can use F6 to jump between split panes in the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog

Sara Aside

When she originally wrote and published this tip, she had to laugh at the fact that there was a six-month gap between this tip and Tip 1.19, which describes how to split the panes. The first week she started the "Tip of the Day" series on her blog, she came to the harsh reality that you actually have to write a tip of the day every single day. She was at a conference during the first week of writing "Tip of the Day," so the initial tips were those she could write the fastest. There was no rhyme or reason behind the madness; hence, the six-month gap between Tip 1.19 and Tip 1.20.
Once you have used the splitter to split the editor window, you can use F6 to jump between the editor views.



Happy Programming! =)
Posted by Nils-Holger at 3:42 PM with 449 comments.

Thursday, December 12, 2013

Tip 1.19: How to split a window and create new windows

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



There are two ways to split the current window:
  • From the Menu Bar, go to Window–Split.
  • Using the mouse, grab the splitter control found directly above the document scrollbar, as shown in the next illustration.




But the split command works only horizontally. If you need to split vertically as illustrated in the following picture, use the Window.NewWindow command found at Window–New Window. This will create the windows "Program.cs:1" and "Program.cs:2." Then you can use the Window–New Vertical Tab Group command to separate both files with a vertical divider.



Happy Programming! =)
Posted by Nils-Holger at 12:27 PM with 441 comments.

Wednesday, December 11, 2013

Tip 1.18: How to reach the navigation bar via the keyboard

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



At the very top of the editor and just below the file tab channel, you'll find the navigation bar. The left combo box lists objects, and the right one lists the selected object's members. These combo boxes are very useful when you need to jump to various functions throughout a large solution or you want to see what functions an object has.



To jump to the navigation bar via the keyboard, press Ctrl+F2. This keyboard shortcut is bound to the Window.MoveToNavigationBar command. To toggle between the Objects list and the Members list, press Tab or Shift+Tab.

Additionally, you can hide (or show) the navigation bar by going to Tools–Options–Text Editor–All Languages–General and setting the Navigation Bar option to the desired setting. Note that since this option is found in the All Languages pane, you can customize it for any listed language under the Text Editor node.



Happy Programming! =)
Posted by Nils-Holger at 1:24 PM with 466 comments.

Tuesday, December 10, 2013

Tip 1.17: How to use Undo to jump the cursor back to the last insertion point

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



In Tip 1.16, you learned more than you ever wanted to know about go-back markers. For this tip, you'll learn how insertion points are slightly different. They are similar to the go-back markers, but they are applied anywhere you click the mouse or jump the cursor to. The go-back marker "11 or more lines" rule doesn't apply.



The option, which is shown in the next illustration, can be found at Tools–Options–Text Editor–General.



To give it a try, just click somewhere, then click somewhere else (or use Find or a Go To Line if you're using the keyboard), and then click Undo. You'll move back to that previous location.

Happy Programming! =)
Posted by Nils-Holger at 1:19 PM with 448 comments.

Monday, December 9, 2013

Tip 1.16: How to navigate forward and backward in the editor all because of go-back markers

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



In the standard toolbar, there are Navigate Backward and Navigate Forward icons.



In the editor, the Navigate Backward command is bound to Ctrl+Minus, and the Navigate Forward command is bound to Ctrl+Shift+Minus. She finds these commands most helpful when navigating around multiple files or jumping through call stacks. This concludes your "Basic Editor Navigation 101" course. Now it is time for the "Advanced Editor Navigation 201" course. You may have noticed that the Navigate Backward button additionally contains a drop-down list box. Displaying the items in this list box shows you all the places that have a go-back marker. In other words, when you hit the Navigate Backward button, you are going to the most recently visited go-back marker. If we've done our jobs right, the go-back navigation should feel natural. But if you're like her, you like to know the little ins and outs of how things work. A go-back marker is dropped under the following conditions:
  • An incremental search (including reverse) leaves a go-back marker at the beginning of the search and another one at the end.
  • A Go To Line action, like Ctrl+G, or a mouse-click that moves the cursor 11 lines or more from the current position drops a go-back marker at the new location.
  • A destructive action (like hitting Backspace) after having moved the cursor to a new location drops a go-back marker.
  • Doing a search, like Ctrl+F, drops a go-back marker at the found location.
  • Opening a file drops a go-back marker wherever the cursor was on the old file and drops another on the opened file.
  • If you've found a condition where you'd like to see a go-back marker dropped, let her know.


Happy Programming! =)
Posted by Nils-Holger at 12:41 PM with 444 comments.

Sunday, December 8, 2013

Tip 1.15: You can hide the vertical and horizontal scroll bars in the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



This tip truly embraces the spirit of "Did you know?" Go to Tools–Options–Text Editor–General, and under Display, you can uncheck the Vertical Scroll Bar and the Horizontal Scroll Bar options.



Now your scroll bars are hiding from you. And yes, you can still scroll both vertically and horizontally in this state.



Happy Programming! =)
Posted by Nils-Holger at 1:03 PM with 440 comments.

Saturday, December 7, 2013

Tip 1.14: How to jump to the top or bottom of the current view in the editor without scrolling

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Unlike pressing PgUp or PgDn, which causes the editor to move either up or down a page, the following keyboard shortcuts cause only the cursor to move:
  • Ctrl+PgUp jumps the cursor to the top of the current editor view without moving the current view, unlike a PgUp.



  • Ctrl+PgDn jumps the cursor to the bottom of the current editor view without moving the current view, unlike a PgDn.



If you find yourself using the keyboard shortcuts just shown, you may find these additional shortcuts helpful:
  • Ctrl+Shift+PgUp selects all the text between the current cursor location (near the bottom of the screen in the following illustration) and the top of the current editor view.



  • Ctrl+Shift+PgDn selects all the text between the current cursor location and the bottom of the current editor view.

One thing to note is that all four commands jump the cursor straight up, meaning that it doesn't go to the beginning of the line on that top line, but rather it goes as close as possible to the current column position, as you saw in the preceding illustrations.

Happy Programming! =)
Posted by Nils-Holger at 3:08 PM with 441 comments.

Friday, December 6, 2013

Tip 1.13: How to use the mouse wheel for scrolling in all directions

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Did you know that you can press down on the mouse wheel and have it act as a third button? For many applications that have an editor, pressing the mouse wheel displays an icon indicating which directions you can scroll in. Some require holding down the mouse wheel; others don't. In the editor, press the mouse wheel just once and you'll see an icon indicating which directions you can scroll in.



A couple of things to note:
  • The farther away the mouse is from the directional icon, the faster the editor will scroll.
  • Pressing the primary mouse button stops the scroll, but you have to press the button again to move the cursor to the desired location.


Happy Programming! =)
Posted by Nils-Holger at 2:20 PM with 691 comments.

Tuesday, April 9, 2013

Tip 1.24: How to enable virtual space

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

This tip is mutually exclusive to the previously mentioned word wrap feature, Tip 1.23. Try as you might, you won't be able to enable both word wrap and virtual space. But if you figure out a way to do it, please don't hesitate to let her know how you did it!
In the following example, the cursor is located in the virtual space. She has enabled the Visible White Space option to illustrate there are no spaces after the Program class name.



Sara Aside

She never uses word wrap, and she made it through only a few weeks using virtual space when she was testing it. Neither option was quite for her. When she posted this tip, she asked readers to describe why they use these options. She knew she would learn something new.


Happy Programming! =)
Posted by Nils-Holger at 1:02 PM with 467 comments.

Monday, April 8, 2013

Tip 1.23: How to enable word wrap

"Visual Studio Tips, 251 ways to improve your Productivity, in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



The next image illustrates wrapping a line of text onto the next line.



Go to Tools–Options–Text Editor–All Languages–General, and check the Word Wrap option. When it is checked, you'll also have the option to Show Visual Glyphs For Word Wrap.



You can customize the foreground color of the visual glyph for a word wrap on the Tools–Options–Environment–Fonts And Colors by modifying the Visible White Space item.



Happy Programming! =)
Posted by Nils-Holger at 1:26 PM with 442 comments.

Sunday, April 7, 2013

Tip 1.22: How to use Ctrl+G without the Go To Line dialog box popping up

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



This tip is pretty straightforward: Pressing Ctrl+G will pop up the Go To Line dialog box.



But did you know there's a way to use Ctrl+G without bringing up this dialog box?
  1. Press Ctrl+D to go to the Find combo box on the standard toolbar.
  2. Type in the line number.
  3. Press Ctrl+G. (Note: Do not press Enter; if you do, you'll search for the number!)
Congrats! You've just navigated to the line without the Go To Line window coming up. You can try to navigate to line 0, but Visual Studio will take you to line 1.

Happy Programming! =)
Posted by Nils-Holger at 12:08 PM with 462 comments.

Saturday, April 6, 2013

Tip 1.21: How to enable URL navigation within the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Under Tools–Options–Text Editor–All Languages–General, there is the Enable Single-Click URL Navigation option. This option is enabled by default for most editors. But, just in case you're not able to click on a URL, here's where to go to verify the option is set.



Happy Programming! =)
Posted by Nils-Holger at 1:54 PM with 438 comments.

Friday, April 5, 2013

Tip 1.20: You can use F6 to jump between split panes in the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

When she originally wrote and published this tip, she had to laugh at the fact that there was a six-month gap between this tip and Tip 1.19, which describes how to split the panes. The first week she started the "Tip of the Day" series on her blog, she came to the harsh reality that you actually have to write a tip of the day every single day. She was at a conference during the first week of writing "Tip of the Day," so the initial tips were those she could write the fastest. There was no rhyme or reason behind the madness; hence, the six-month gap between Tip 1.19 and Tip 1.20.


Once you have used the splitter to split the editor window, you can use F6 to jump between the editor views.



Happy Programming! =)
Posted by Nils-Holger at 12:30 PM with 435 comments.

Thursday, April 4, 2013

Tip 1.19: How to split a window and create new windows

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



There are two ways to split the current window:
  • From the Menu Bar, go to Window–Split.
  • Using the mouse, grab the splitter control found directly above the document scrollbar, as shown in the next illustration.




But the split command works only horizontally. If you need to split vertically as illustrated in the following picture, use the Window.NewWindow command found at Window–New Window. This will create the windows "Program.cs:1" and "Program.cs:2." Then you can use the Window–New Vertical Tab Group command to separate both files with a vertical divider.



Happy Programming! =)
Posted by Nils-Holger at 12:14 PM with 665 comments.

Wednesday, April 3, 2013

Tip 1.18: How to reach the navigation bar via the keyboard

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



At the very top of the editor and just below the file tab channel, you'll find the navigation bar. The left combo box lists objects, and the right one lists the selected object's members. These combo boxes are very useful when you need to jump to various functions throughout a large solution or you want to see what functions an object has.



To jump to the navigation bar via the keyboard, press Ctrl+F2. This keyboard shortcut is bound to the Window.MoveToNavigationBar command. To toggle between the Objects list and the Members list, press Tab or Shift+Tab. Additionally, you can hide (or show) the navigation bar by going to Tools–Options–Text Editor–All Languages–General and setting the Navigation Bar option to the desired setting. Note that since this option is found in the All Languages pane, you can customize it for any listed language under the Text Editor node.



Happy Programming! =)
Posted by Nils-Holger at 1:00 PM with 444 comments.

Tuesday, April 2, 2013

Tip 1.17: How to use Undo to jump the cursor back to the last insertion point

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



In Tip 1.16, you learned more than you ever wanted to know about go-back markers. For this tip, you'll learn how insertion points are slightly different. They are similar to the go-back markers, but they are applied anywhere you click the mouse or jump the cursor to. The go-back marker "11 or more lines" rule doesn't apply.



The option, which is shown in the next illustration, can be found at Tools–Options–Text Editor–General.



To give it a try, just click somewhere, then click somewhere else (or use Find or a Go To Line if you're using the keyboard), and then click Undo. You'll move back to that previous location.

Happy Programming! =)
Posted by Nils-Holger at 1:04 PM with 438 comments.

Monday, April 1, 2013

Tip 1.16: How to navigate forward and backward in the editor all because of go-back markers

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



In the standard toolbar, there are Navigate Backward and Navigate Forward icons.



In the editor, the Navigate Backward command is bound to Ctrl+Minus, and the Navigate Forward command is bound to Ctrl+Shift+Minus. She finds these commands most helpful when navigating around multiple files or jumping through call stacks. This concludes your "Basic Editor Navigation 101" course. Now it is time for the "Advanced Editor Navigation 201" course. You may have noticed that the Navigate Backward button additionally contains a drop-down list box. Displaying the items in this list box shows you all the places that have a go-back marker. In other words, when you hit the Navigate Backward button, you are going to the most recently visited go-back marker. If we've done our jobs right, the go-back navigation should feel natural. But if you're like her, you like to know the little ins and outs of how things work. A go-back marker is dropped under the following conditions:
  • An incremental search (including reverse) leaves a go-back marker at the beginning of the search and another one at the end.
  • A Go To Line action, like Ctrl+G, or a mouse-click that moves the cursor 11 lines or more from the current position drops a go-back marker at the new location.
  • A destructive action (like hitting Backspace) after having moved the cursor to a new location drops a go-back marker.
  • Doing a search, like Ctrl+F, drops a go-back marker at the found location.
  • Opening a file drops a go-back marker wherever the cursor was on the old file and drops another on the opened file.
  • If you've found a condition where you'd like to see a go-back marker dropped, let her know.


Happy Programming! =)
Posted by Nils-Holger at 11:23 AM with 1758 comments.

Sunday, March 31, 2013

Tip 1.15: You can hide the vertical and horizontal scroll bars in the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



This tip truly embraces the spirit of "Did you know?" Go to Tools–Options–Text Editor–General, and under Display, you can uncheck the Vertical Scroll Bar and the Horizontal Scroll Bar options.



Now your scroll bars are hiding from you. And yes, you can still scroll both vertically and horizontally in this state.



Happy Programming! =)
Posted by Nils-Holger at 1:27 PM with 515 comments.

Saturday, March 30, 2013

Tip 1.14: How to jump to the top or bottom of the current view in the editor without scrolling

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Unlike pressing PgUp or PgDn, which causes the editor to move either up or down a page, the following keyboard shortcuts cause only the cursor to move:
  • Ctrl+PgUp jumps the cursor to the top of the current editor view without moving the current view, unlike a PgUp.

  • Ctrl+PgDn jumps the cursor to the bottom of the current editor view without moving the current view, unlike a PgDn.



If you find yourself using the keyboard shortcuts just shown, you may find these additional shortcuts helpful:
  • Ctrl+Shift+PgUp selects all the text between the current cursor location (near the bottom of the screen in the following illustration) and the top of the current editor view.

  • Ctrl+Shift+PgDn selects all the text between the current cursor location and the bottom of the current editor view.



One thing to note is that all four commands jump the cursor straight up, meaning that it doesn't go to the beginning of the line on that top line, but rather it goes as close as possible to the current column position, as you saw in the preceding illustrations.

Happy Programming! =)
Posted by Nils-Holger at 2:03 PM with 738 comments.