VS Code - Is there a way you can make the Minimap bigger? - visual-studio-code

I have enabled the MiniMap in Visual Studio Code (VSCODE) with the following code:
"editor.minimap.enabled": true
But can I make it bigger? It's so small at the right.

thanks Alex there is a new setting from VSCode release 1.40.0 onwards:
"editor.minimap.scale": 2
before VSCode 1.40.0:
there is no zoom-level for the minimap.
But i think the following settings is useful as it renders it schematically which looks much nicer than with true! Maybe this improves it! ;-)
"editor.minimap.renderCharacters": false

In the settings, you can set the width with
// Limit the width of the minimap to render at most a certain number of columns
"editor.minimap.maxColumn": 120

From vscode release 1.40.0
"editor.minimap.scale": 2,

There are two new minimap settings which are in v1.43:
Editor › Minimap: Size
values: proportional, fit and fill
From https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_43.md#minimap-size:
When set to proportional (the default), each line gets a certain
amount of vertical space in the minimap, depending on
editor.minimap.scale. For example, on a high-DPI monitor, with a
configured scale of 1 (the default), each line gets 4 px in the
minimap. So for a file of 100 lines, the height of the lines rendered
in the minimap is 400 px, and for a file of 1000 lines, it is 4000 px.
That means that for large files, the minimap will also scroll, as the
current file is scrolled.
When set to fit, the height of the minimap
is limited to never be larger than the editor height. So if a file has
many lines, they will be sampled and only a subset will be rendered in
the minimap, such that there is no need for the minimap to scroll.
When set to fill, the height of the minimap is always the editor
height. For large files, this is also achieved by sampling lines, but
for small files, this is achieved by reserving more vertical space for
each line (stretching the lines).
Here the size is changed from proportional to fit, and then in a smaller file, from fit to fill:

Not yet, but the pull request is on its way https://github.com/microsoft/vscode/pull/82265

Related

How do I increase the size of the status bar on visual studio code?

The status bar shown on the bottom of VSCode is too small as it's hard for me to read vim commands that I'll be typing on there. I don't want to increase the font size of the editor nor the zoom since they're big enough for me.
Basically, I want to increase the size (font, icon, bar size, etc.) of the bottom status bar without changing the size of any other component of VSCode.
Is there a way to do that or an extension I can use to change it?
AFAIK there is no setting to adjust the height of the status bar. A common practice is to set the zoom level and decrease the editor and terminal font size, but this will also increase the activity bar icons and other areas.
In your settings.json add
{
...
"window.zoomLevel": 0.5,
"editor.fontSize": 14,
...
}
Adjust zoomLevel to your liking, by default is 0 you should increment the value by the decimal, e.g. 0.1, 0.15 ...
Or in your Settings Cmd + , search for window zoom level and change the value there

Setting the split editor sensitivity - VS Code

I want to be able to split the editor when I drag them but not have to point as much at the corners of the editor when I drag them
The red line is the minimum distance for the horizontal division option to come out, which is approximately 10% of the width of the editor
Is there any configuration in vs-code that allows to increase that?

checking how long are comments in a file

I just finished an assingment and according to the instructions I can't have a line of code or comment longer than 120 chars. is there a quick way to check that?
I'm using VSCODE on windows 10. I saw somewhere that I can make a verticle line in the editor to see if a row is too long but I can't find it now.
for example :
// return stack->size since stack->size holds the number of values that can be stored inside the array at a given time.
this comment is 119 chars so it is ok but anything bigger will cause me to lose points.
I know I can hold the last char in the sentence and see the 'col' number in VSCODE, I was hoping for something better.
thanks
"editor.rulers": [120]
Look at the Editor: Rulers setting:
Render vertical rulers after a certain number of monospace characters.
Use multiple values for multiple rulers. No rulers are drawn if array
is empty.
You can change its color or opacity like so (in your settings.json):
"workbench.colorCustomizations": {
"editorRuler.foreground": "#ff0000ff",
}
That changes the color to red, the last two hex digits are opacity. ff is 100% opaque. So you could try more transparent with #ff000080 for example. Color and transparency are the only two modifications you can make to rulers.

Resizing EchoArea of Emacsclient

I am facing a strange problem. After I change the KDE window rules for emacs according to http://www.emacswiki.org/emacs/KdeMaximized, that is, I created a special window setting:
the size of echoarea (the area shared with minibuffer) is doubled by default whenever the font size is larger than 115 (1/10 pt):
,
while normally it should be like this:
Moreover, this only occurs when emacsclient is maximized and without menubar (it is fine when fullscreened or not maximized or with menubar). Maybe it is just a problem with KDE? But I couldn't find other way to fully maximize KDE without creating special window settings.
Surely a workaround is to set font size to be at most 115, but that looks too small on my 13.3 ultrabook and I usually set it to 125.
So I am just wondering if there is a way to resize the EchoArea (or change the font size of EchoArea.) by emacs settings? I tried adjusting the font size of the minibuffer, but it does not work since only the minibuffer font is changed while the Echoarea is not affected.
I am using emacs 24.3.
Thanks!
Explanation
Emacs cannot fully use arbitrary screen sizes because it (for the most part) displays a grid of characters.
As a simple example, consider characters that are each 10 by 10 pixels, and screen real estate of 1024 by 768. You'll have four pixels of width and eight pixels of height that cannot be used by Emacs.
The article you linked to is about forcing Emacs into a particular screen size. From the page:
Once you try to maximize the window, emacs resizes itself to a slightly smaller portion of the screen. This is because emacs rejects the geometry given to it by KWin, because it’s not an integral multiple of the width/height of one character.
When you tell KDE to force a particular size, the Emacs frame ("window" in non-Emacs terminology) will be the size you want, but the windows inside it ("splits" in non-Emacs terminology) may not fit properly. This usually leads to "wasted space" at the bottom of the screen like you are seeing.
As you noticed, changing your font size can give different results. If your character width is 8 pixels, for instance, you won't have any wasted horizontal space since 1024 divides by 8 evenly (128 times).
Similarly, going fullscreen and enabling the menubar both alter the amount of vertical space that Emacs has available for its windows.
Workaround
One workaround might be to adjust the size of your KDE taskbar. I believe it can be adjusted with single pixel granularity. If you adjust it smaller by a few pixels one at a time you should find a small adjustment that will make Emacs use its space more efficiently.
A you suggested, you might try to alter the font size of the minibuffer:
(add-hook 'minibuffer-setup-hook 'my-minibuffer-setup)
(defun my-minibuffer-setup ()
(set (make-local-variable 'face-remapping-alist)
'((default :height 0.9))))
(via Altering the font size for the Emacs minibuffer separately from default emacs?)
This will make the font size just a bit smaller. Try playing with the height and see if it can resolve the issue...

How to automatically set optimal frame width of Emacs?

How to automatically set optimal frame width of Emacs?
When open a file with Emacs from command line, how to let it automatically set the frame size such that
width is 2 characters wider than the widest row or the computer screen width, which ever is smaller
height is 80 rows, or the computer screen height, which ever is smaller?
You can use a find-file-hook which sets your frame's size. You'll need things like display-width and display-height, and you'll need to loop through the whole file computing the width of each line (using forward-line to move to the next line, end-of-line to go the end of the line and current-column to find the width). And you'll probably need to fiddle with off-by-one details in order to account for things like the menu-bar, the fringes, ...
Me? I prefer to declare that files should not go over 80 columns so I don't need to adjust the frame width.
This is just what libraries fit-frame.el and autofit-frame.el are for. See also http://www.emacswiki.org/FrameSize.