Do you know if there's a way to fold/collapse functions and subroutines (and better yet: ifs and whiles) in the Visual Basic 6 IDE? At least with a plugin or something similar?
I have to deal with files of thousands of lines sometimes and with no cropping it's just impossible (It's a very old app off course).
Please note that it's not Vb.Net, it's VB6.0
Thanks!
No, in Visual Basic 6 IDE is no fold/collapse functions. What to do instead?
Use Ctrl + Arrow Up or Ctrl + Arrow Dn for skipping between functions
Use the list of functions in the upper right corner instead of scrolling
Toggle Procedure View / Full Module View by two buttons in the bottom left corner
Must-to-have: install Scroll Wheel Fix for VB6 and scroll source with mouse wheel (nirvana!)
Related
In Visual Studio 2013, is it possible to change the keyboard shortcut for switching the overload on the Parameter Info popup to something other than up and down arrows?
For example, when you type:
System.Text.RegularExpressions.Regex.Matches(
A little box pops up telling you about overload 1 of 3 for that method. Pressing the down arrow will go to 2 of 3 etc. As a point of fact, the up and down arrows already serve the nifty function of moving the cursor. When that box is visible, you have to hit escape to get the up and down arrows back to their normal behavior.
My question is this, can you change the Parameter Info box up + down keyboard shortcuts to be something else, like control up or down?
I did notice that the left and right arrow keys might be a bit better than the escape key, but I'd still prefer to remap the up and down behavior so they can make the box go away.
I realized how much time (and hand movement) I spend hitting the escape and figured it'd be worth asking. I do not think this falls under the category of the keyboard shortcuts that you can remap from the Options screen.
Many thanks!
Superfluous qualifier: This is probably a silly question, but...
Using VB.NET and / or C#:
Is there a way to jump to a region quickly, similar to the way you can choose a class and find functions / methods / events from drop-down lists? I have organized thousands of lines of code into neat regions but it seems like a waste if I can't find them quickly.
I now realize Ctrl-M + O (outlining) will basically give me what I was looking for, but the question stands.
Update: Since the community and myself can't seem to find a way to do this, the answer to my question is: No, there is no way to do this. With this knowledge, I won't be so concerned with regions in the future as their usefulness is limited.
Update 2: This question originally applied to VS2010. However it seems to be applicable to later versions as well. At least in 2015, it seems you can quickly jump between regions using keyboard shortcuts.
Relevant Question: VS 2015 shortcut for "GoTo Region" #region / #endregion
Depending on how your code is wrapped in #regions you can use the built-in feature to Collapse to Definition Ctrl + M , O. Then navigate to the region you want. You can undo the collapse by using Ctrl + M , P
You can create bookmarks in Visual Studio 2010. Nice article here - http://www.codeproject.com/Articles/42973/Using-Bookmark-in-Visual-Studio
You can try the extension CodeNav that let you see also the code regions on the left pane.
Is it possible to change the width of the text editor in VS2012 - I've got a fairly wide screen and use fairly small text so I end up with a lot wasted real-estate in the middle of my screen.
I don't want to turn off word wrap - I just want the wrap to start further right on the line. If that makes sense!?
You can set this with HTML in Visual Studio 2012 but there is no global setting and it's missing in quite a few languages.
You can just put another "dummy" window next to the one you are writing in, so the actual editor window will be smaller. You can put it on the left if you want to pan the text to the right, and to the right if you want to shorten the lines.
I actually found the answer elsewhere; VS doesn't appear to provide this functionality but Resharper does. Resharper -> Options -> Code Editing -> C# -> Formatting Style -> Line Breaks and Wrapping -> Right margin (columns)
I put mine to 200 which fixed the issue
I know that this is not what you are looking for, but I believe it solves the same problem. I too have a fairly large screen and try to make use of it as optimally as possible.
I hate tabbing between code or design tabs and try to avoid that as much as possible.
VS has a feature that permits the user to create Horizontal or Vertical Tab groups and ever since I have started using it, I have found it very helpful. These options are present in the context menu by right clicking the tab or in the VS Window Menu (Menus are seen only if the tab groups feature is not active).
I have created a screenshot with Vertical Tab Groups created as shown below. In this example, I have a overview of both the designer and the code view at the same time.
We can use tab groups whenever there is a dependency such as comparing code, redesigning a module, etc. I know it takes a little time to get used to this feature but try it out and see :)
Maybe this isn't a "programming question" per se, but it relates to the coding process:
One of the really neat features I like about the WPF-ized VS IDE is being able to hit Ctrl (I think it is) and thumb the mouse wheel to quickly change font size in the code editor.
For work (desktop PC) that works great, but at home, on my laptop, I can't figure out how to accomplish it (other than going into Properties or whatever and changing font size there, which is obviously way less "handy" (no pun intended)).
Is there a quick way to change edit font size without resorting to the dialog accessed via the menu?
You can set the shortcut in the Tools -> Options -> Environment -> Keyboard shortcuts for View.ZoomIn and View.ZoomOut. I think they are by default: CTRL + Shift + Comma for zoom out and CTRL + Shift + Period for zoom in .
http://weblogs.asp.net/jgalloway/archive/2010/04/15/visual-studio-2010-zooming-keyboard-commands-global-zoom.aspx
Tools -> Options -> Environment -> Format is the place where you can change as per your need
If you don't have a scroll wheel, you'll have to create your own macro to do this. Check out the first answer in this post:
Shortcut for changing font size in Visual Studio
I have been searching for months for a way to map a key combination (CTRL + something) to a directional key (like down or up).
I desperately want in Visual Studio to be able to press CTRL + j and have the cursor move down a line. I hate having to move my hands off of the home row to move up and down for things like intellisense or even just navigating up and down lines.
Does anyone have a solution for this? I would be ok with a Visual Studio-only solution, but something that works at the OS level would be ideal since this kind of navigation would be nice in any editor window and for instance SQL Server Management Studio also has intellisense.
I haven't considered any macro hotkey type solutions since they could conflict with in-app hotkeys (for instance if CTRL+j were assigned to something in Visual Studio already)
I think the answer is nothing out there exists that would do this. I have done a lot of research.
I am now using Autohotkey instead of what would have been ideal. I have been familiar with this application for years and it does a pretty good job, but doesn't work across remote desktop for instance and so doesn't quite fill the need.
I mapped ctrl + i to do up, ctrl + k to be down, ctrl + j as left and ctrl + l for right.
VS-only solution is simple.
At least in Visual Studio 2017 you can assign Ctrl+XXX key combinations to corresponding commands for Text Editor.
CharLeft
CharLeftExtend
CharRight
CharRightExtend
LineUp
LineUpExtend
LineDown
LineDownExtend
PageUp
PageUpExtend
PageDown
PageDownExtend
LineStart
LineStartExtend
Delete
DeleteBackwards
WordPrevious
WordPreviousExtend
WordNext
WordNextExtend
and so on.
All using standard Tools / Options / Environment / Keyboard settings dialog.