I've got 2 monitors, and most of the time I've got some reference material open on one screen, and Visual Studio on the other. To really get in the zone, though, I need my code to be the only thing I see. Does anyone know if it's possible to have multiple code windows in Visual Studio? So far the best I can do is put debugger output and the solution explorer on my left monitor, and the rest of VS on the right. I would love to have code on both windows, however.
If you right click on the file tabs, there's an option for "New Vertical Tab group" Just maximize across both monitors and put the divider on the monitor divide and I think that's what you're after.
See also the "Visual Studio and dual/multiple monitors: how do I get optimized use out of my monitors?" question.
Though I use StudioTools for other purposes, it has a "Tear off Editor" option, with which you can "tear off" the file to a window and resize the window. Find it quite helpful
Instead of enlarging the VS2008 window to span the two monitors, you can display the 'Code Definition Window' on another monitor: just drag it outside the main window! I find this very handy to avoid switching between code windows: it is very often that one is interested in the definition of the symbol under the cursor...
The same is true for other windows like the 'Class View', the 'Call Browser', etc. You can choose to keep them grouped in the same group with tabs, or drag each of them separately (click on the label of the tab to start the drag).
Related
I use Visual Studio 2015 on dual monitor configuration, having main window with code on primary monitor, and other window with code on secondary monitor. Is there a command that can be be used with keyboard shortcut so that i move .cs file opened in one window to the other. I know that i can drag and drop tabs with mouse, but that is too slow and clumsy.
I used my tool FeinCtrl and found the following commands related to document arrangement:
Window.MoveToMainDocumentGroup
Window.MovetoNextTabGroup
Window.MovetoPreviousTabGroup
Unfortunately, dragged-out documents create separate top-level windows that appear to be non-addressable (you can move them back home).
Of course, you can bind those commands to some keyboard shortcuts, but that's not exactly what you were asking.
I need to see and edit multiple classes at the same time.
With Eclipse I can achieve it with drag&drop.
Is it possible with Visual Studio 2013 Express and how?
Something similar to this:
With at least two files open, you can use the "Window->New Vertical Tab Group" or "New Horizontal Tab Group".
This will create a new pane and you can move tabs between them.
You can do the same with a single file by using 'Window->New Window'. That creates a second view of the same file and you can then split as a separate group.
You can split a window by dragging an almost-invisible handle at the top down, this shows you 2 areas for the code. I don't think you can do it side-by-side however, unless you undock the code window for one of the files you're working on and position it to the side.
You can dock one code window to the side of another. Marc Gravell's answer below to a similar question shows how:
Undocking a code window in Visual Studio
I've just come to Visual Studio 2008 from a UNIX / Java background.
In Visual Studio, how can I have multiple overlapping editor windows? In Eclipse, I can open a new Window, add an editor to each of them, then Alt-Tab between them, overlap them, select them in the Taskbar, etc. Similarly, I'd like to put 'Output' in it's own 'first class' window so I can easily Alt-Tab between that and an editor when on a laptop.
Studio tools lets me 'tear off' and editor window, but the 'torn off' window doesn't respect Alt-Tab rules, and always hides the main Visual Studio pane.
Update: By way of example, In 'Word' I can have two documents open. I can Alt-Tab between them. I can Alt-Tab between either document, or Alt-Tab from either one to Outlook if I wish. I can overlap the documents, or place them side-by-side. I can place one document on one monitor, and one document on the other. I can have have Outlook open on one screen, overlapping one of the Word documents, while I edit the other. This is the kind of thing I would like to do with my source files!
You can change the window layout in the Tools menu under Options. The very first item is Environment\General. You can choose Multiple Documents (versus Tabbed Documents). That may give you the "look" you are describing.
However, I don't think it is possible to use alt+tab to change windows since those windows still belong to the single instance of VS2008. You can change windows with ctrl+F6. In addition, a nice trick when using Tabbed Documents is to press ctrl+alt+down arrow. That brings up a list of all open editor windows.
Alt+Tab is for switching between applications on Windows.
To switch between windows within Visual Studio use Ctrl+Tab.
This should work on any mutli-windowed application.
You can click on the tab of the window and drag outside making it a standalone window.
If you are a vim user, and install VsVim, you have an effective work around for dealing the quirky behaviour Visual studio has for moving between file editing windows.
You can easily make vertical and horizontal split windows within the "main" file editing window, just as you would in vim, using the regular vim keys. e.g. with any of the regular vim commands :vs, <C-w>s, <C-w>v, ...
If you tear off a second editing window (e.g. with the mouse) and put it on a separate monitor, you can use Vim's global marks, or <C-w>w (and similar commands for navigating between panes in vim) to jump between file editing windows across different monitors/screens with just a few keys.
In Visual Studio 2008, it seems that Window -> Split only gives me a horizontal split, and Window -> New horizontal tab group does not allow me to edit the same file in both panes.
Note that I am talking about C# code windows, not HTML editing mode.
I want to edit the same file in two horizontally arranged panes.
Is this possible? Free add-ons are fine.
Edit: I have CodeRush Express installed, and it seems to have done something to my code window borders.
Edit #2: It's not CodeRush. I tried on VM with no CodeRush, and I have exactly the same issue.
Ok, I found the solution here.
The answer is:
Window -> New Window
Window -> New Vertical Tab Group
This duplicates the current tab so you'll get [Form1.cs:1] and [Form1.cs:2] tabs; and then you can use a vertical tab group to view them side by side.
I believe that it's not CodeRush's fault. A vanilla 2008 install only lets you do the split view with one file on the top and one file on the bottom. The only side-by side option is the horizontal tab-group feature (with the problem of only having a file open in one of them, as you mentioned.)
The obvious workarounds would be to either make a read-only copy of the file elsewhere and use that in one tab-group, or open up a second instance of VS. It does have decent handling of files that get changed in other apps, so having the same file open in two instances isn't a problem.
In VS2010 I couldn't find the Vertical Tab group button. The workaround is:
1. Open Fullscreen mode
2. Click and drag the window to the far right (or left) and it should give
you an option to view both windows side by side.
3. Exit full screen mode and you should now have the ability to click and
drag windows between vertical tab groups, and it even now allows you to
drag to a new vertical tab group.
No idea why you have to jump into fullscreen first, and i seem to remember not having to do that before.
As a one-time developer on CodeRush, I doubt that this would be caused by CodeRush Xpress. I'm currently running the latest beta of CodeRush 9.1.0 on Visual Studio 2008, and splits are working fine. However, you could certainly try uninstalling CodeRush Xpress to see if that clears up the problem. If it does, I would recommend posting in DevExpress' peer-to-peer forums.
alt text http://diditwith.net/content_images/CRXSplits.png
I like the vertical tab group option. The only thing that bothers me about it is that I cannot put the solution explorer on both windows (Or properties for that matter). I have to navigate all on one side and move screens around.
I found this nifty add on tool for VS 2012 that allows you to compare two files at the same time and make changes.
Check this out:
Does anyone know how to prevent task panes from expanding unless you click on them? Sometimes I hover over one, and it takes a bit to load breaking my concentration.
Thanks!
EDIT: Now that I've had a few days to reflect on my question, I realize the answer is to close it. Let me provide an example. When you are in Word, and you want to look up a synonym to a word, you open the a thesaurus to find an alternate word. You press ALT+F7 and it bring it up. The thesaurus opens in a Task Pane, and when you are done, you click the X to close it. You don't unpin it and have it sit on the side and get annoyed when you hover over it and it pops into view, covering your content and getting in the way. With that being said, the same mental model applies to visual studio. Don't have windows or panes open which you don't need. Open them when you want to preform a task, "close" the task pane, don't hide it.
Cheers!
P.S. This doesn't mean I feel it isn't bad design to pop open windows when you hover over them (I'm sure someone will debate me on this). I still would like an option to choose when to open collapsed windows.
I keep it closed. I open it only when needed. I do the same for tools and servers.
Try to memorize their shortcuts, and keep'em closed.
Use the little "Pin" icon (right between the triangle and "X" icon of the pane) to fix it, then resize or close it.