How to completely hide comments in eclipse? - eclipse

I'm not sure if this is a good place for this question, but I did see a similar question posted here on overflow.
I'm just getting started with Eclipse as an IDE and having difficulty finding a comments toggle. I'd like to completely hide them sometimes. I've seen suggestions that would allow me to collapse entire comment blocks to a single line, but I'd want to hide ALL comments (single lines, blocks, etc) like in visual studio as a comparison. The goal is to gain the screen space to see more actual code simultaneously.
Anyone know of a way, plugin or otherwise?
Thanks!

This might be a bad way of doing it but you could set the syntax highlight for comments to be the same as your background color.

Related

Configure Visual Studio Code to highlight code blocks

Qt Creator has a really nice feature where based on the cursor location, they change the background color of the rest of the buffer to make it easy to see the block of code one is working in. They have two levels of highlighting - please see picture.
I've been trying to recreate this in VSCode but with no luck.
I tried various VSCode settings and they don't seem to scope down to the block.
Blockman is visually very noisy i.e. I'd really like to have the lines have the background changed.
Blockman is visually very noisy
Hello, author of Blockman here. Blockman has so many configurations that can be used to reduce the noisy visual of default Blockman behavior. You can hide all blocks and show only the focused block. Also you can show +-1 or +-2 or +-3 ..... depth blocks from the focused block, or from the ground block, or both. Also you can hide all backgrounds and show only borders. And there are also many more settings. Please see the GIF instructions and textual instructions on Blockman page:
https://marketplace.visualstudio.com/items?itemName=leodevbro.blockman
Also this instruction is useful:
Tutorial - Blockman - How to show only focused block
https://github.com/leodevbro/vscode-blockman/issues/97
If you still have some difficulties, feel free to reach me on GitHub or here or anywhere and I'll try to help you with your specific preferences.

Is there a way I can get a code block always visible while scrolling in VS Code?

That's all, sometimes I miss I could do that while working on different parts of a kinda long script or whatever... So I think it'd be nice if, as we can do in a spread sheet by fixing a row for example, we could quickly define certain part of the code we want always visible and then can scroll to any other part of the script while still being able to see such "fixed" lines of code as a reference, copy, etc.
It seemed to me that it could be an already existing feature, but I've been not able to find anything... not even an extension, but maybe someone here knows? Well, I hope it makes sense and thanks in advance!
How about spliting the editor?
Hard to guess for how large "sticky" portion of code you are actually aiming, but if it is just, say, function "signature line" or nesting header in general, you may try experimental "Editor sticky scroll" (editor.experimental.stickyScroll.enabled) feature that was just released in VSC v1.70:
https://code.visualstudio.com/updates/v1_70#_editor-sticky-scroll

How to change the weird light color block in VS Code editor area

Actually I don't know when it existed, but recently after changing some themes, the editing area has a strange light color block.
It's neither a blank string nor a blank line break, it 'jumps' with the area you're editing. This is quite annoying and I have not been able to find a real answer to this problem.
In some cases, changing the theme occasionally helps, but it mostly doesn't work, and I don't think that's a good idea because those light blocks are always stubbornly present, can anyone help?
P.S I hope I can express the problem precisely enough, I'm attaching a screenshot to point out the so-called 'light blocks'.
Thanks for any help!
After some time of research, I have to think that this seems to be the only solution for now. Originally I used developer tools in an attempt to change the CSS, but decided that was an illegal hacking solution, and I thought the app could be overwritten if I updated it, so I abandoned that idea.
Now I found a possible solution.
Go into settings, search for: #id:workbench.colorCustomizations workbench
Note: You must choose to also modify on User, otherwise it will only work on the current window workspace.
After entering setting.json, look for Workbench: Color Customizations and add editor.background to workbench.colorCustomizations, example:
"workbench.colorCustomizations": {
"editor.background": "#19485964"
},
The most important point is that transparency must be set! As long as editor.background is set to a certain level of transparency, then the "strange light color blocks" will disappear.
Although I'm not sure if this is a real solution, it can solve the problem to some extent, and no failure has been found yet, so I assume this is "barely a solution" for now.
If there is a better answer, I would welcome any additional information, thank you.

Marking/commenting Matlab code?

Is there any way to mark Matlab code (in Matlab) via some kind of add-on? I'm looking for something similar to what Microsoft Word has with its "Review" mode where you can highlight a certain phrase/section and make a comment on the side. When I say "comment", I don't mean the regular code comments that you do with "%" in Matab.
I've googled for this, but I couldn't find anything. Anyone know if something like this exists that I may have missed? It would really help me when I'm reading someone else's code and I have to keep track of things / make comments for certain lines. Even if commenting isn't possible, it would be nice to be able to highlight certain lines via some kind of "highlighter" like the one in Word.
No. This isn't possible.
In fact, most editors and IDEs (if not ALL of them) that I know don't even support this feature as each IDE will have to be specific in the way this is implemented (à la Trojanian). The only thing that I can think of is if you print out the code in PDF, then use bubbles within the PDF viewer to tack on your comments.
However, if you want to highlight a specific line in your editor, you'll have to set this up in your settings. Go to preferences, then in the Editor / Debugger options, choose the Display option, then choose Highlight Current Line. Choose whichever colour you see fit. I'm running MATLAB R2013a on Mac OS, and this is the window I get:
You'll see the Highlight Current Line feature. Change that to whichever colour you want. I have it as gray because I do like having the current line highlighted.

How to highlight current method body in Eclipse?

There is a nice feature called "show selected element only" in Eclipse. When it's turned on, clicking on a method in the outline pane will show just this method only in the editor, allowing to focus on this one only, especially useful in that you don't need to worry about scrolling hard and overshooting this method when there are many nested parenthesis inside.
But sometimes I would like to have a glance of more codes around here, so have to turn this off, then back, time and time again, which is quite inconvenient. So I wonder if there is a better mechanism?
I know a built-in feature called "range indicator" (http://stackoverflow.com/questions/7049098/how-to-forbid-eclipse-to-highlight-current-method-class-in-the-margin) , but I always tend to overlook that because it's too thin.
One better solution I can imagine is using distinguished background color for currently investigated method body, and when move cursor to other methods, background highlight turn to them accordingly (works like the range indicator, but renders more obviously). In this way, both navigation flexibility and reading assistance are gained.
Is this solution possible?
Take a look at the Editbox plugin.
You might have to do a bit of tweaking to the colors to set it up. Here is a sample screenshot :
Is this what you wanted ?
Yes, with editbox and the following settings may suit your need.