How to hide/unhide comments with Microsoft VSCode? - visual-studio-code

I have a code with many comments, how can I hide these ones, but no delete, I need them after.
I need to hide all the comments in one click, not a simple collapse one

Can't find such feature as well.
Read this issue from GitHub - https://github.com/Microsoft/vscode/issues/46505
Seems like that VSCode can't do it (from the box) and all people waiting for that feature.

I was looking for a way to do that too as I put way too many comments making it hard to debug... and I came across this https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hide-comments it makes all the comments invisible, but it leaves special characters in place. There are also commands to toggle show/hide.

Hide Comments - Visual Studio Marketplace
We now have an extension for that. On the editor title, a toggle action is available to show/hide the comments quickly.

You can download from inside Visual Studio 2022 called unobtrusive code and it will hide all comments and put "+" symbols on the collapsed line to the left of your code that you can open or close them with. It works great.
*** TO GET THE EXTENSION: ***
I went to the Extensions menu at the top of VS 2022 and chose manage extensions.
Then in the manage extensions window that opens up, choose online then Visual Studio Marketplace. In the search at the top right of the manage extensions window type in unobtrusive code. download it and then exit Visual Studio. You should see a window pop up to install it.
When you start VS 2022 again and open a C# script, it should have all the comments minimized to the "plus symbols" to the left of the code!
Hope it works for anyone wanting to hide their comments.

Related

Middle click in Visual Studio Code for scrolling?

I'm checking out this Visual Studio Code but when you middle-click for scrolling as you would everywhere else it selects code instead of scrolling. Not exactly like a left click but still, annoying for me. Is there a way to solve this issue?
No, unfortunately not (yet). But you can contribute here on github to make it happen.
Since the issue has been reported but not fixed for 5 years, you should upvote that issue, and then use the autohotkey workaround:
https://github.com/qooqu/vs-code-mbutton-scroll-ahk
(You have to hold the middle-button down in vscode and drag the mouse up or down to autoscroll, and it scrolls one line at a time instead of smoothly, but it's much better than nothing.)
(To use: Install AutoHotkey, then you can download and run the linked .ahk file)
There's an extension that allows this kind of behaviour in Visual Studio.
Visual Studio Marketplace Link

Enabling auto scroll in Visual Studio Code

Is there any way that we can enable auto scroll in Visual Studio Code? I have been looking in the settings but could not find anything(unless i missed something).
I am reviewing a log file and as it gets updated, its refreshed on my side. But it is not showing the latest logs but just stays where my cursor was and highlights everything that gets populated after that.
Had the same problem but did not find a setting within VS Code.
However there is an extension for VS Code:
https://marketplace.visualstudio.com/items?itemName=pejmannikram.vscode-auto-scroll
Works quite well for me.
There's now a built in VSCode setting - you can untick Smart Scroll option (output.smartScroll.enabled).
As described here:
VSCode: Turn auto scrolling permanently ON
"An option to turn off the smart scroll feature was included in one of the recents update (probably in the March 2020 update, I didn't found this on the changelog), see more: issue #69480
Since then, I've been able to "save" the scroll state, try this:
Go to File > Preferences > Settings (or Ctrl + ,)
In Features > Output, disable Smart Scroll option (or search output.smartScroll.enabled)"

sublime text-like code scrollbar on visual studio code

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

How do I remap the `Alt+Click` action in visual studio code?

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.

Plugin for Eclipse or Visual Studio that lets me see an overview of the Text similar to Sublime Text

Are there any plug ins for mentioned IDEs that let me see the whole text file similar to how sublimetext does it? See their website, to the right of the text there is a super minimized overview of the entire file. Amazing feature which makes me want to change to it but i rather want an IDE :/ so i hope eclipse or visual studio might have something similar?
Visual Studio has a plugin called ProgressiveScroll which works on 2010+
It hasn't been updated for a while but seems to work okay in 2013.
Eclipse now has a built-in feature like this since version 4.9, called Minimap.
You can access it from Window -> Show View. If it's not in the list, click Other... at the bottom, and it's under General.