How I can save my layout on Visual Studio Code - visual-studio-code

The idea behind this question, is have my document upfront, right on the sidebar, a split between files and upload to GitHub, and down below the terminal, in all projects starting now, I open every time my projects! I saw different questions on the platform, but didn't accurate answer to that, I thought.
Thanks,
Miguel.

You should take a look at documentation which explains that in VS Code there are 2 modes for saving a setup of IDE - user settings and workspace settings.
Your modifications were probably saved in current workspace so when you open a fresh instance of VS Code by default you are using global user settings.

By default, it keeps the same screen.

Related

How to prevent VS Code remembering files outside work folder?

My workflow with VS Code is to always use project folders on projects. This works great, but there's one thing that's messing things up right now;
When opening just a single file from another project while working in another project, lets's say webpack.config.js, I use Windows Explorer rightclick to open that file in VS Code. However, this always opens the file in the currently open VS Code instance.
This adds the file from that other folder now to the memory of the previously opened files in the open project while it has nothing to do with that project.
When using the quick file open of VS Code now it happens a lot VS Code opens a file from that other folder, only because that outside file has been opened once while I was working on this project.
This is error prone as now it happens a lot, especially when working fast, that the wrong, for instance, package.json or webpack.config.js file gets opened, because VS Code now also suggests files that are outside this project. That's pretty frustrating and causes changes to be made in the wrong files pretty quickly.
I know we can clear the editor history and have to do it a lot now. But to me that's the other way around, doesn't solve the real problem and when not done often the issue remains.
So I want to get rid of this issue and have the following questions:
1) How can we change the 'Open with Code' rightclick menuitem in Explorer to open files always in a new instance of VS Code?
2) Is there a config settings to disable the behaviour that VS Code remembers files that are outside of the current work folder?
Thanks in advance, this thing is bothering me for quite some time now!
How can we change the 'Open with Code' rightclick menuitem in Explorer to open files always in a new instance of VS Code?
I assume you are a Windows user. You can edit the context menu behavior from Regedit.
Follow the below steps:
Press Windows + R
Type regedit and press OK
Go to Computer\HKEY_CLASSES_ROOT\*\shell\VSCode\command in regedit
Add -n parameter to the command like below
It will help you to open every file in a new window when you use Open with Code.
For your second question, Is there a config settings to disable the behavior that VS Code remembers files that are outside of the current work folder?
Open VS Code settings
Search window.openFilesInNewWindow
Make it off to on like below
With this configuration, you can't open new files in the current workspace therefore technically you prevent VS Code remember outside files. Not directly but it helps.
I don't like how "recently opened" files are shown in VS Code Quick Open (Ctrl+P). I think OP is describing this behavior...
The behavior to remember "recently opened" files causes me problems when I mistakenly open a temporary/copy of my file, i.e.
C:/users/temp/code.js
... instead of the true file (i.e. located inside the currently-open VS Code project)
C:/git/source-control/code.js
...my confusion happens because because both files are listed among the options when I use Quick Open Ctrl+P and type "code"
For me , the Quick Open list also has the answer, any "recently-open" files should have an "X" icon on the right side. You may need to hover your mouse over the file you want to remove.
Click the "X" icon to "Remove from recently open". Quick Open will always be able to find files in your current project, even if you remove them from recently-open:
Please note I don't have access to regedit as suggested in the accepted answer; my answer here does not require regedit

Visual Studio Code Edit From External GUI

I want to create a designer for the code of the current active editor (a tab in VSCode). So I would like to ask you, how this is accomplishable.
In this video the developer is showing impressively that this is possible:
https://www.youtube.com/watch?v=lgPYdtcNRwg
I looked already for the some API's like https://code.visualstudio.com/api/extension-guides/custom-editors, but they all doesn't offer what I want: grab and manipulate existing code of current tab, or maybe I am missing something?
Perhaps I have to think out of the box and work with the file path of current tab/editor, and change the code in files on the filesystem directly?
I am grateful for any hint and help.

How do I turn off "Contains emphasized items" in Visual Studio code?

I need to figure out how to turn off emphasized items in Visual Studio Code
This might sound like a strange requirement, but in my workflow vscode functions as less an IDE than a cross-platform ViM-esque frontend with lots of remote development tools built-in.
Due to this use case, I don't need or want the linting features to show up in the file browser. How might I accomplish this?
Attempts to solve the problem
I've run out of search terms here and cannot find an answer.
Searches including terms in this question's title yielded little
SO-specific search queries also yielded little
This seems to be somewhat related, at least as a representation of the "feature" I'm referencing: VS code containes emphasized items but no error
VSCode "preferences" do not appear to show what I'm looking for, likely an issue with me not searching for the right variable name.
In my experience with VSCode it has been wonderfully customize-able, so I'm guessing there's a setting somewhere ready to be modified to accomplish this. Any help much appreciated, thanks!
My use case was a bit different: after viewing some files in a git submodule those files became linted, and errors and warnings cluttered up my VS Code Explorer file browser window on files I had no intention of ever handling. I basically wanted a way to clear out those lint warnings, and found it here. The solution is to reload the window:
CtrlShiftP on Windows/Linux, ⌘ShiftP on Mac -- then select "Developer: Reload Window"
One by-product of reloading the window is that it clears out those unwanted warnings (at least until the next time I visit the file). It also has the effect of clearing out warnings on files that I would normally want to see, of course, but chances are I'll be visiting those files again soon, so it's fine. Not a perfect solution, but it works for me and my use-case; hopefully it can help others.
I don't know how to turn it off, but I had this on multiple folders and I fixed it by renaming the folder to a random name, then naming it back to the name it was before and the error would go away.
If you have this issuse then uninstall extention then CtrlShiftP on Windows/Linux, ⌘ShiftP on Mac -- then select "Developer: Reload Window" then type developer: relode page this issuse automatically resovle
i have this issuse then i uninstall extension then this issuse resolve.
I was able to permanently prevent this by adding the files to the .gitignore file. It seems that this happens in a cloned repository when you add new files.

How to set each tab to a specific directory in VS Code?

Recently I switched from sublime to vscode.
In some cases I want to open multiple projects/folders, and the feature called 'Multi-root Workspaces' works to some extent. But I want to have one large project tab for each individual project,and each project can have many small file tabs. A picture is worth a thousand words, so this is the result i want to see:
Please take the gif below for a reference, which was made here by bpasero.
VS Code originally did not support tabs for each dir/project. We used to have multiple windows for different dir/projects.
Multi-dir feature was well discussed in this issue. This feature was added and explained in the doc Multi-root Workspaces.
But it is not exactly the same with some other editors.

How to know if a Scala file modified with IntelliJ Idea is saved and if it is checked into CVS?

I'm a long-time Eclipse user and I just now decided to try IntelliJ IDEA 9 (free edition) for Scala.
A couple of dumb questions:
How can I tell if a file I've modified has been saved?
How can I tell if I file I've saved has been checked into CVS?
I feel incredibly "exposed" to some sort of imminent danger when I don't see the familiar visual cues from Eclipse that indicate a file has been saved and/or checked in.
Thanks
In IDEA 11:
Settings->Editor->Editor Tabs->Mark modified tabs with asterisk
UPDATE
In IDEA 15:
Settings->Editor->General->Editor Tabs->Mark modified tabs with asterisk
Under Settings -> IDE Settings -> General -> Synchronization you can control when files are saved. I save files on Frame Deactivation (that is, switching to another program), and after 60 seconds of idle time.
You should also look at the Local History feature, which is a local VCS for your project, capturing all the individual edits between commits. This allows you to roll back changes that were made by the auto-save feature, which some people find unnerving at first.
If a file is modified but not saved, there's an asterisk, *, in its tab.
If a file is newer than its VCS counterpart, its name is displayed in dark blue instead of black. If it is not under VCS at all, it is shown in dark red. This goes for the editor tab as well as other places such as the Project window.