visual studio code: hide (NOT remove) empty lines? - visual-studio-code

I'm studying a long, well documented code form a colleague and I'm allowed only to read it, not edit.
My screen wastes a 20% in blank lines. It is possible to show/hide the empty lines (NOT remove) via a shortcut so I can see a 100% code lines on my screen?

Related

How to display more files on top tab in VS Code?

Is there a way to configure VS Code to increase the number of files that are able to be displayed across the tabs at the top?
There are currently just 4 files1 visible in that top area, but ~10 would be ideal:
Example
Sublime text uses smaller font on file names (despite similar font size of the code itself), and so allows about twice as much space for displaying files:
Current work around
I hit opt + command + right arrow a few times to quickly survey open files.
Ideas
Perhaps open files could be quickly surveyed (without key presses) if it is possible to:
Expand the area to have more than 1 row of files
Configure VS Code to show only part of the filename
Use smaller font on the file names (not the code itself), similar to sublime text
Something else?
1 The habits of using long file names, and having a lot of files open at the same time don't help, I'm aware of that.
workbench.editor.tabSizing
There's the "workbench.editor.tabSizing": "shrink" setting value, which is documented as so:
Allow tabs to get smaller when the available space is not enough to show all tabs at once.
(the default value for workbench.editor.tabSizing) is "fit".
workbench.editor.wrapTabs
As other have mentioned, there's the workbench.editor.wrapTabs setting, which you can find more about in this Q&A: Multirow Tabs for VSCode.
TL;DR from the setting's description:
Controls whether tabs should be wrapped over multiple lines when exceeding available space or whether a scrollbar should appear instead. This value is ignored when #workbench.editor.showTabs# is disabled.
git.decorations.enabled
You can shave a few pixels by disabling git decorations if you're working on a git project (of course- this is only if you're okay with disabling git decorations). Git decorations add letter indicators to the tab handles that summarize what has changed about those files. Ex. "M" means the file has been modified, and "A" means it has been added.
"git.decorations.enabled": false
workbench.editor.tabCloseButton
You can shave a few pixels by disabling the close button on tabs (if you're okay with that (you'll still be able to close the tab with the associated keyboard shortcut, or by middle-clicking the tab handle)):
"workbench.editor.tabCloseButton": "off"
workbench.editor.showTabs
If your aim is really to declutter, you can take the hardcore/nuclear route and do:
"workbench.editor.showTabs": false,
Et voila! Now the tab handles take up zero space because they're gone :D (and you can navigate tabs using ctrl+tab and ctrl+shift+tab (that's on Windows and Linux- not sure what it is on MacOS), or by using the Explorer view's "Open Editors" section (you might need to enable it first under the three-dots menu))

Remove the space before line numbers which is used for breakpoints in VS Code [duplicate]

This question already has answers here:
Is there a way to make vscode line number field smaller width?
(5 answers)
Closed 12 days ago.
My laptop has a small screen and I often use VS Code in half of the screen for multitasking, but I want more space in VS Code so that I can see more text on the screen, so I want to remove these spaces because I don't use breakpoints, and for me, it is a waste of space in the editor.
If is there any way to remove these spaces before lines?
Put the following in your settings.json file:
"editor.glyphMargin": false
The setting's description says:
Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.
This section of the UI is often called a "gutter" in IDE terminology. You might not belive it, but I found this tip as part of the first result by googling "vscode gutter" (a comment in the GitHub issue: Can the VSCode gutter be made smaller, i.e., decreased size/width? #30795).

How to turn off wavy red lines before code VS Studio Code

I am getting the error wavy lines before each tab in VS Code. Every google search points to error indicator below text, but my issue is before any code (tab spaces). I can delete space and add it back and it removes it for that one space. The file is set for the correct language.
Thanks

Eclipse: scroll space below code

is there any plugin for eclipse to add some space below the code so that I can scroll the last line up to half the screen / up to the top? I hate it when the line I am writing on is always on the bottom of my screen.
Of course, I could add these lines myself, but that would also mean that I have to remove them later, and I don't feel comfortable with so many empty lines...
If there is no such plugin, would it be easy to write one?
I suggest as you are saying adding these lines manually and in the end hit Ctrl+Shift+F to format your code which also includes removing those empty lines at the bottom.

How can I get Eclipse to scroll past the bottom of the document?

When I scroll to the bottom of an open document in the Eclipse editor, the last line is at the bottom of the file. This is a tad annoying when editing code at the bottom of the file / screen.
How can I enable Eclipse to scroll (much like Vim or VS) down far enough that the last line of code reaches the top of the editor window?
I'm asking for the reverse of this question, in Eclipse: How to make Visual Studio editor stop scrolling past bottom of a file?
Considering the current implementation of a Scrollbar, this is not possible.
(See org.eclipse.swt.widgets.ScrollBar.java)
At any given moment, a given scroll bar will have a single 'selection' that is considered to be its value, which is constrained to be within the range of values the scroll bar represents (that is, between its minimum and maximum values).
In the JDT (Java Editor) realm, the range is strongly linked to the number of lines a source file has.
Adding artificial "logical lines" to allows scrolling past the last line would have unintended consequences on many other parts of the JDT, related to displaying informations based on the line number of a source file (like a compilation error red underline).
This is also why there is no soft wrapping in those editors, despite
a 7-years old bug 35779 (one of the most upvoted).
Allowing word/soft wrap in the editor while typing is easy but not enough, a mapping between the model lines and the visual lines must be introduced to e.g. correctly show annotations.
It also introduces various problems that need to be solved, e.g. 'Go to Line': tools like a debugger, compiler etc. will report the model line but a user it will look strange that a different line will be selected than the one entered into the 'Go to Line' dialog
So for now, the SWT scrollbar example is still limited by the bottom of the window: