Multiple Tabs within Visual Studio - python-3.x

I am brand new to programming, and I think I have a simple question for those of you that have been programming for quite some time.
How do I add multiple python scripts (as multiple tabs) within Visual Studio?
I keep going to File, New Project and that gives me one tab to work from.
I would like to have multiple tabs so I can go back and forth looking at the files I have created.
Thank you in advance.
-Robert

So, I had to do more research and here is the answer:
In the right pane of Visual Studio there is a few lines of references to Python.
To keep your original project, and add a new tab:
1.Right click on your project in the right pane.
2.Click add new item.
3.In the new window click empty Python file.
4.Rename that tab (at the bottom of the window).
You are golden!

Related

Android Studio isn't showing the xml editor [duplicate]

How can I enable the text/design Tab on the a src/main/res/layout folder on the activity_main.xml file that was created automatically during create new project? If i do right click and create xml file on the said folder, the design/text tab exist. Any suggestion? Thanks.
No Text/Design Tab on the Bottom Part of the Android Studio
Creating a new XML in the Res/Layout Folder, the design/text tab is now present.
Any help? this is super weird guys...
In Android Studio 3.6 use these three buttons (Code | Split | Design), on top right, to switch between views.
I had the same problem, restarting the IDE did make that tab appear again.
On Android Studio 3.6.1
Top Right corner under the main toolbar you have three different icons (Code, Split, Design).
View -> Tool windows -> Preview .
Output view:
use the three buttons (Code|Split|Design)on top right hand side to switch between views.
I also had this problem after upgrading to 1.5. None of the above suggestions worked for me. I noticed that the default relative layout xml has changed with a third xmlns line and an app behavior line. I opened an older project and copied the old relative layout header to replace the new. Instantly the preview function was restored.
You can also Move between Design / Text tabs in layout’s view with simple shortcut:
(Mac) : control + shift + ← / →
(Windows / Linux): alt + shift + ← / →
On the top right corner of the activity_main.xml file view, there are 3 icons representing "Code", "Split" and "Design". Click on the leftmost icon of the three ("Code") for the text tab.
In the android Studio window, at the left side there are two options available(Project and Resource Manager). Go to resource and there you will see an ADD Module option, click on that. After this you will see your text and design option will get enabled, you can go to your work area by Project Name->app ->src ->main->res ->layout.
Yes, Even I had the same problem. For the first time... I think It wont show, restarting the IDE did make that tab appear again.
I had this problem too, I deleted all the preference files, such as the AndroidStudioPreview folder & com.google.android.studio.plist, then restarted android studio, it worked.
You do not need to restart an IDE. All you need is to close an xml file that does not get a tab and reopen it within an editor. It is a little bug.
Navigate to activity_main.xml tab then Design and Text tab appears.
It doesn't appear in MainActivity.java tab.
You do not need to restart IDE.
If text/design tab is missing in new android studio, this can solve by two methods.
You have re-install android studio. And don't forget to delete android studio related all files from temp and local.
Or you can re-install SDK (software development kit) according to your device.

In vscode, how to put editor regions inside tabs, and not the other way around?

I've been trying Visual Studio Code for a few days, and it's the first editor that I used in years that makes me feel I could switch from my beloved vim.
Now, it's hard to get used to new habits when you have years of muscle memory, but I'm trying to keep an open mind. There's one thing that's bugging me, though, and I could not find a way to get around: it's the fact that editor regions and tabs are "swapped". Let me explain:
In vscode, you define editor regions by splitting your screen, then each region can contain as many tabs as you want.
My problem is, that does not fit my workflow. Here's what my workflow used to be with vim, where regions are inside a single set of tabs (I mainly work with Django):
In a first tab, I've split my editor in half and I'm editing my models.py and forms.py side by side.
In a second tab, I've split the editor in half, I'm editing my views.py on the left hand side, and the right hand side is again split horizontaly, allowing me to edit multiple templatetags files.
In a third tab, I'm editing my main template, and I don't split the editor since the file may contain very long lines.
In a fourth tab, I'm editing several html files and the editor is split multiple times.
Etc.
That way, I can very quickly go to edit my models, then my views, then the templates, and start over in quick iterations.
With vscode, where the tabs are inside the fixed regions, not so much.
So my question is, what solution could I use? Am I missing a big feature here? Are there any extension that would allow me to get my old workflow back?
I'm also open to suggestions about new workflows.
As #romainl pointed out: the workflow is different, it doesn't work that way with VS Code (and I know, I'm a vim user, too).
The best you can get that is vaguely close to what you're used to is to consider VS Code windows as you did with vim tabs.
To give you an idea using your example:
You open a VS Code window and open side by side models.py and forms.py
You hit Ctrl+Shift+N (or Command+Shift+N on a Mac) and open a new window. There you open your views.py on the left and split the right one horizontally for the templates.
You open a new window again and repeat.
This way you can switch between different layouts with Alt+Tab
(or Command+Tab).
You could speed this up a bit by saving different workspace files for different files that you want open, because I think (not 100% sure) that saving the workspace also saves the layout.
There's a couple of annoying things with this approach though:
If you have multiple windows open in general (say, a browser, slack app and so on), they'll also appear in the list when you try to switch.
I'm not sure if the open folder will be remembered when opening a new window, but you can work around that by saving the workspace and opening it.
It's annoying but at least there's already a feature request about this ( https://github.com/Microsoft/vscode/issues/41486 )

can't find layout and classes in Android Studio

I'm a noob in Android studio and Java, I do have a solid c# background, but I can't seem to fix this problem:
Some of my partners asked to add a button to a previous android build created by someone else, so I downloaded Android studio and imported the project, but I can't seem to find anything in there. We can't contact the creater of the project to ask in what he developed the app.
As you can see, there's no layout in the project.
And this is what the project folder looks like:
Where Can I edit layouts? Am I in the wrong IDE?
Thanks
If you want to change the Layout, you can do Two things:
OPTION 1
1. Simply click into your Xml file and select the "Text" option at the bottom on your screen
2.Change to layout
OPTION 2
1.Just drag another layout in Design and put your items in it, delete your old layout PS. you can have layouts in other layouts
Now, Thats just for the Layouts, to see classes just do...
after double clicking that, itl bring up a new tab.
PS This is somewhat a Duplicate, try to search up your question first instead of making a new question
link to duplicate: Android Studio - How to change layout

Visual Studio 2012 Dff tool only show one file

I was using the built in file compare utility in VS 2012 to compare two files in source code history. It did something to cause one side of the comparison to go away and I have gone insane trying to figure out how to bring it back. How do I make it so both files show side-by-side?
I have already tried: Closing all windows and re-opening them, restarting VS, Deleting the .SUO file and reloading the project. - No dice.
The toolbar at the top of the window will have a dropdown list button that looks like two papers side by side. Click on the button and select "Side-by-Side-Mode".
Choose the "Side by Side mode" in the tool bar.

Visual Studio 2012 changes focus to design pane

when you change documents (ctrl+tab) on WPF (maybe others too) the focus always goes to the design pane.
So imagine - you edit XAML and want to copy an existing element from another existing document.
You are in Doc1 XAML type somethinng next you switch to Doc2 where you have been in XAML pane before.
Now the Designer of Doc2 gets the focus. Since I left the focus in XAML I use shift arrow to select some XAML text - instead the focused control is moved.
The same when you switch back.
VS 2012 simply doesn't remember in which pane (XAML / design) the focus has been.
This is really hard for me since I do this often - and now I have always to grab the mouse and switch back to XAML after changing the current document.
Any idea if this can be change? Or at least if there is a keyboard shortcut to swicht from one XAML to another.
Are you looking for Shift+ESC. This closes the current window that is in focus in Visual Studio Eg. Solution Explorer, Output Window, Immediate window, etc.
Doesn't pressing Shift+F7 help you?
I was getting so frustrated by this but I finally found a work around! If you have a pane collapsed then and only then shift+F7 seems to switch between the panes. The work around drawback is that you only get to view one pane (Designer or XAML) at a time. For some reason Shift+F7 doesn't work when in split view. Small caveat, I am in Visual Studio 2015. I suspect the behavior is the same for 2012. This answer may be more relevant to whomever comes across this knowing that it works for vs2015 though.
Hit Collapse View
Another thing that is important to note is how to ensure one pane is collapsed.
Visual studio seems to remember the last view you had the XAML designer in for that particular XAML file. You can change them per file and visual studio will remember or you can change the default mode a .xaml file will open in by going to (in visual-studio-2015) the tools menu item. Then click options, which opens the options window. Then click XAML Designer, which is the last option in pane on the left of options window. Then change the selected item in the combobox labeled Default Document View from Split View to Source View.
When I first changed the default I didn't think it worked; changing the default will not overwrite the settings saved for the last document view you were in for a particular file. The only way I found to have the default applied was to just wipe out my .suo file for the solution and close visual studio. Deleting the .suo file and closing and re-opening the solution didn't work. I had to delete the file and close visual studio, open visual studio back up, and reload the solution.
The .suo file is hiding in a hidden folder called ".vs" inside the solution folder. I initially just renamed it .suo.bak just in case something happened that I didn't like, but once I reloaded the solution and everything was fine I deleted it.

Resources