VS Code manual folding ranges disappear randomly - visual-studio-code

I think the main cause of manual folding ranges disappearing for me is when I open the file that is on my OneDrive on my laptop after I created folding ranges on my desktop PC and vice versa. Also they disappear for no reason even when I only edit on desktop PC on some days.
So I would assume that these ranges are not actually defined in the file you're working on but in some settings file that's in .vscode folder maybe?
So my question is how to make VS Code manual folding ranges constant for a file no matter where/how you open it (different machines or maybe even web version of vscode).
Does anyone know where these ranges are defined?

Related

VS Code opens a new editor group for data viewer

I'm using two editor groups in VS Code to write Python code. The left group has open files, and the right group has an interactive Jupyter-like window to test code and also displays data frames with the data viewer.
Alas, since a few days ago, VS Code always opens a third editor group to the right when I open the data viewer (subsequent data frames will also be displayed in this group). This, of course, needs space and everything is reshuffled and it's driving me nuts.
I must have changed something inadvertently so that VS Code is no longer limited to opening 2 editor groups, but I can't find the setting. How do I turn this back?
I have looked through the settings (global and workspace) and can't find anything remotely indicating how to configure it.

Revert/Reload all open files in Visual Studio Code?

I have been trying to figure this out, and cannot determine if it is possible or not.
Essentially, I commonly work with a VSCode window containing many files located on an external network drive (CIFS mount in Linux). When these files are changed "on-disk", they do not update in the editor until I switch focus to each file by changing the active editor tab. This means I have to switch tabs, wait for the update to process, and then repeat for all open tabs (could be 10 or 20 tabs).
Is there anyway to force all open editors to refresh or revert at once? That would ease my workflow a lot for examining differences between these open files on the fly. There's a command to "Revert File", but that only works on the open file, rather than all currently-opened ones. I've looked in the settings and browsed for an extension, but I can't find anything to accomplish this task.
Well, You can try to map the external network drive to local disk and give appropriate permission for read and write restriction.
If your computer has firewall or anti virus installed, then you must exclude vs access restriction from fw/av inspection.
Otherwise you can also improve your network adapter performance, associate to buffers, throughput, packet latency, etc.
Alternatively, you can use any source control, so your codes could be persist locally and could be synchronized from/to source control server.
Hope this could helps.

How do I share the search pattern across editors in VS Code?

VS Code: 1.23.1
OS: OSX 10.12.6
If I have two different editors open (I think that's the term for two different windows, each of which could have multiple tabs, and could also be workspaces), and I run Find... in one window, the search text and settings (e.g. Match Case, Match Whole Word) in the other window are unaffected. I'd like to find a way so that these are always linked, they're always kept in sync. Is there a setting or an extension to do this? I could not find one. Thanks!
That does not seem to be possible, as each Windows has its own GUI states (including the current find search pattern)
This is similar to issue 10121 "Allow for floating windows" where Terminal or Debug Console would be applied to all opened editor windows instead of being tied to the current one.
For now, those GUI elements (including Find) are specific to the current opened editor, not sharing their state with other VSCode windows.

Cinnamon show an application in all workspaces

I have a number of monitors. I typically move between up to 4 or 5 workspaces for different areas of focus during the day (simply different projects, PyCharm for Python projects vs Eclipse for Java projects, e-mail and project management activities, etc.)
I would like to throw a chat application up on a monitor that would be mapped into all workspaces so that it's always up attracting my attention and doesn't change when I change workspaces.
I don't see in Cinnamon any option to do this and find no search expression getting me help in Google to solve it.
At the moment, this is not possible in Cinnamon. It is a long standing feature request (since 2012!).
However, there are alternatives to it. Namely, the program devilspie2 (available in the repositories) allows one to manage windows and their placement, with the help of a small Lua script.
Here1 is how I stick my Firefox and Pidgin window on all workspaces, while some other windows in a given workspace WORK (because I don't want to see them when I'm not working (: ).
-- Make windows of all these apps visible on all workspaces
GLOBAL_WINDOWS='Firefox;System Monitor;Pidgin'
if (GLOBAL_WINDOWS:find(get_application_name())) then
pin_window();
end
-- Firefox should be tall maximised
if (get_application_name() == 'Firefox') then
maximize_vertically();
end
-- Put the Sublime on their correct workspaces
if (get_application_name() == 'Sublime Text' and get_window_name():find('WORK')) then
set_window_workspace(4);
end
This should be placed in a config file in your home directory. Check the documentation :). And don't forget to set devilspie2 as the first startup app.
1 also posted in that issue

Where do I specify the text of a Pocket PC app's shortcut?

I'm unfamiliar with Pocket PC development, but I have to make a few minor changes to an VS2005, Pocket PC 2003 Device application. One of the changes (which I thought would be trivial) is changing the text of app's shortcut, but I can't figure out where this text is set. The solution includes a setup project, so I'm looking for it in there, but I can't find it. I know it's got to be in there somewhere because building the setup project generates an AppSetup.inf file that contains the shortcut information.
This can't be that difficult. Surly I'm suffering from what my wife refers to as "male vision" when I can't find the bottle of mustard in the refrigerator that's right in front of my face. Where do I specify this text?
It depends on exactly how the shortcut is generated. There are generally 3 mechanisms that are used.
Via the CEShortcuts section of the INF. For this, it's the text before the first comma
Via copying an LNK file via the CopyFiles section of the INF. With this mechanism, you create a physical LNK file on the desktop that gets rolled into the CAB and it's copied like any other file. The name on the device is again the first string before the comma.
Via a programmatic call (usually to SHCreateShortcut) in a custom CE Setup DLL.
You'll have to figure out which is being used in your deployment scenario to know exactly what needs to be changed.
Thinking more about this, are you trying to simply find where in the Studio UI of the installer project to change the shortcut? If so, this MSDN article may help. What is very non-intuitive is that there are little icons at the top of the Solution Explorer that change the view of the installer, allowing you to see things like files, registry entries, etc. It may be that you simply aren't looking at the right view and you need to select a different icon. There are no menu items that do what these icons do, and they are hard to notice the first time you start using an installer project.
Well, as I suspected, it was right in front of my face. We'll call this project PDAProject. In the solution explorer, under the PDAProjectSetup project is an item labeled Primary output from PDAProject (Active). If I double-click on this item two panes appear in the code editor window. The one on the far left shows a folder tree labeled File System on Target Machine. Under this are three folders labeled Application Folder, Program Files Folder, and Programs Folder. When I click on the Programs Folder, the application shortcut appears in the pane on the right and I can modify its text.
I don't know why I was never compelled to double click on that Primary output from PDAProject (Active) project item even though that's how you open any class or form for editing. I kept right-clicking and opening the Properties. Maybe it's time to give up programming and take up basket weaving.