I switched from notepad++ to visual studio code but notepad++ had an interesting feature which was to reload the file
In this way the changes with control z and control y were eliminated.
And you started the editor again from 0.
It was very useful to me.
Now in visual studio code there is no option.
How could I get it?
Edited I found a way to do it but it has a problem.
Edit this shortcut by removing the developer option from it.
But the problem is that if you have multiple files it updates them all.
What you want is for it to reload only the file you have open in the foreground.
Same thing notepad++ does when you hit the reload from disk button.
Related
I'm working with a Jupyter notebook. How would you copy cells in Visual Studio Code? C to copy and V to Paste did not work for me as it would online.
Also, Visual Studio doesn't seem to offer right click options when working in the notebook. Is there a extension that would give me some options such as Cut, Copy, Paste, Delete Cell, Etc.?
I'm a developer on this extension, and I have a bit of a two part answer for you.
In the current (as of 2/16/21) stable release version of the extension notebook UI is done by a hosted webview, it was the only supported option at the time. As such it is lacking features both of Jupyter and of VS Code editor instances. It does not currently support cutting, copying and pasting of cells.
We are currently in the process of moving over to VS Code's new notebook UI that they provide. This allows better UI both for matching Jupyter and supporting more VS Code editor features. This current UI does allow for copying / cutting / pasting cells with the familiar Jupyter commands.
This support will not be added to the old editors, but currently the new UI is available if you use the extension with VS Code - Insiders and will soon start rolling out to VS Code Stable.
https://devblogs.microsoft.com/python/notebooks-are-getting-revamped/
Short answer: Supported with VS Code - Insiders now, and will be supported on stable VS Code in the future.
The new version of the visual studio Jupyter Notebook extension support all the standard operations for one or multiple cells of the jupyter notebook. For example, the following list shows some tested shutcuts:
To copy a selected cell(s) use: ctrl+c
To paste a selected cell(s) use: ctrl+v
To cut a selected cell(s) use: ctrl+x
To delete a selected cell(s) use: ctrl+x
etc.
Note that, as usual, to select multiples cells one should hold the ctrl button before selecting.
As of 2021-01-14, you can now select the cells, right click on any single one of the cells you selected (this will select them as a group if you select more than one) and have the option to press COPY. Or you can simply ctrl+C as a keyboard shortcut. The key here is when you copy and paste the cells to another notebook, your cursor needs to be outside any cells; that is you need to press somewhere outside the cell before pasting. In COLAB notebook, even if your cursor is on a cell, the copy and pasting method works. BUT here if you do that you will be pasting all of the codes inside the cell where your cursor is active; it will not paste the actual cells you copied.
Hope this wasn't too confusing.
Visual Studio Code Save All button is always enabled even without any file changes. How can we solve this issue? Ideally it should be grayed Out if no file changes are there in the workspace.
It's an intentional feature, just in case someone is not sure if they saved their files, VS Code will always show it to prevent closing without saving (besides the exit prompt).
Now, if for some reason they decided to change this, it would we worse, as people are used to the always blue button.
I would like to have an additional feature in Visual Studio Code - essentially the "Scope to This" from the full Visual Studio Solution Explorer.
It is basically a context menu (right click) entry in the File Explorer of Visual Studio Code - which then should limit which files and folders are displayed.
Is such a thing possible with a Visual Studio Code Extension?
I never built an extension for VS Code before and would like to know if this is even possible or if I would just waste my time.
According to the API docs, there is no way to filter visible files in the Explorer like it can usually be done with the files.exclude setting. However, it is possible to open another folder with the workspace.openFolder complex command. This will probably also close all opened editors, and forget about the original workspace root path.
Your extension would need to remember the initial root path and opened editors to undo this "Scope to This" menu, and reopening everything every time could cause quite some lag.
You can't customize the normal explorer view.
However, you can do something like this with custom views. It allows you to create a new explorer view that can list what you want and behave as you want.
For an example implementation, check the vscode-code-outline.
If you can add a context menu entry separately too.
I have recently switched from Sublime Text to Visual studio code, but there is something that i truly miss, and it is the scroll bar at the top right corner of the which shows a smaller version of the file being edited (I don't know the exact name).
I find it pretty useful to navigate through my files, especially when i want to start deleting blocks of code i have commented out, before i submit my code.
Is there any plugin to get this on visual studio code, or is there any ongoing plans in order to implement it? Thanks!
Tracked in this feature request: https://github.com/Microsoft/vscode/issues/4865
according to the documentation here I can add multiple cursors in visual studio code by using alt+Click in the editor. Sadly alt+drag is already used by the window manager to move the window around, so visual-studio-code does not get any key events. So how do I change that keyboard configuration in visual studio code? I could not find anything in the default key combinations file.
I am not looking for solution that changes my window manager, I really like that behavior and use it very frequently already for a very long time.
The easiest way in my opinion is:
From the top-level menu, click on
Selection -> Switch to Ctrl+Click for Multi-Cursor
Then you can use Ctrl+Click rather than Alt+Click.
You can see where this is in this screenshot:
My VSCode version is 1.24.1
There is currently no way to do this but already an open issue on GitHub which addresses that.