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.
Related
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
Usually when an editor is empty, the editor hides the scroll bar, but when there are just two lines in V.S. Code, the scrollbar is visible. Is there a way to configure V.S. Code so that the scrollbar remains hidden until the number of lines-of-code exceeds the amount of lines that are visible in the editor?
V.S. Code Scroll-bar
Your not going to be able to get exactly what your looking for, but I will clarify, what you are able to do, and you can decide the best option that works for you. I will attempt to outline the answer to cover the topic in a way that it is useful to anyone else who is looking for the same topic via stack overflow search-queries.
The setting that affects the visibility of the scrollbar is editor.scrollbar.vertical, and it is the only one, however; there is also editor.scrollbar.verticalScrollbarSize which changes the size of the scroll-bar (I guess, as a technicality it can affect its visibility as well, since setting it to 0 hides the scroll-bar).
editor.scrollbar.vertical has 3 settings, and they are as follows.
Auto – "Assigning the value auto will hide the scrollbar whenever the editor is not in focus."
Visible – "A better name perhaps, would be "Always Visible", since assigning the value visible always makes the scrollbar visible, even when working in the workbench, or terminal."
Hidden – "I think we can all take a pretty good guess at what assigning hidden does. It hides the scrollbar.... I guess I should point out that this too is a case of "always", as it always hides the scrollbar."
V.S. Code is a highly configurable editor, and I personally love it for that reason, but to be fair; V.S. Code lacks in configurable scrollbar settings, there isn't a lot that can be done to customize it, and this has lead to several issues and suggestions created in the V.S. Code Repository. Perhaps the most appealing aspect to V.S. Code, is there team. The VSC team listens to suggestions, as they deliver when a suggestion is popular, perhaps try creating a suggestion — just remember to make sure no one else has already suggested it.
Check this setting:
Editor > Scrollbar: Vertical
the default is auto, is yours changed to visible? Which would be always shown.
There's a little column to the right of your code window which shows all of your code at a huge glance. It's kinda handy to click to jump to a certain portion if you have a large file....ultimately, especially when I have 2 windows side by side, it takes up a lot of useful space. Anyways I can remove this? (Having a hard time researching it because I don't even know what it's called)
Okay...I tried some different search terms and found this article.
https://stackoverflow.com/a/44774811/8887398
It's called "minimap".
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.
Doe anybody know of an eclipse plugin, which can be used to insert short text (in the form of memo) to remember what that line of code does or a block of code does to help me understand the existing code better and i can also refer it back later on.
Just like "Task" can be added on a line of code, although i can use "tasks" for this purpose, but that is not very convenient and intuitive.
If you want to add a short text to "remember what that line of code does or a block of code does to help me understand the existing code better", use comments. That's what they're for, and practically every formal language in the world has them.
If you want the ability to quickly jump to an arbitrary point in the code, using bookmarks is a convenient option - right click the bar immediately left of the text and choose to add a bookmark. You can then easily jump between bookmarks with the "bookmark view", which you can enable from the Window -> Show View menu.
The closest thing I can think of is bookmark support. There is native bookmark support in Eclipse and also several other vendors supply more function.
I'm assuming that there's a very good reason that you don't want to or can't modify the code.