change line height in sublime text default theme after changing the font-size
Asked Answered
G

3

49

I found this link on stackoverflow: Sublime Text 2 how to change the font size of the file sidebar?

I followed the directions and changed the font size, but now the font is too big with too small of a line height, so it looks stacked on top of each other and cut off, without any room to breathe.

Is there a json label that I can use to change the line height/padding? Thanks.

Grisby answered 25/4, 2015 at 23:30 Comment(0)
D
147

Go to Preferences>Settings-User and add this two line:

{
    "line_padding_bottom": 3,
    "line_padding_top": 3,
}
Danette answered 11/8, 2015 at 4:0 Comment(1)
this sets the padding top and bottom for the code in the file, but does not change the padding of the file sidebar menu.Grisby
B
9

Go to Preferences > Browse Packages, then open folder Theme - Default and open file Default.sublime-theme in your editor. Search for sidebar_tree and edit value row_padding. It should be something like this:

{
    "class": "sidebar_tree",
    "row_padding": [8, 3],  // increase second value e.g. [8, 6]
    "indent": 12,
    // ... more definitions ...
},
Blayze answered 16/9, 2015 at 14:48 Comment(2)
This should be the answer. Plus if you're using custom theme and [sidebar_tree] does not exist, simply create it and adjust accordingly.Cordie
Not there anymore??Gentianaceous
C
0

Echoing Sazzadur Rahman's answer about bottom and top line paddings on Sublime Text 3, it works for reducing the line height (as in VS Code) as well by setting line paddings to negative values as follows [from PreferencesSettings].

{
    "line_padding_top": -1,
    "line_padding_bottom": -1,
}

side note: my intuition to reduce the line height is using my favorite monospaced font Fira Code in Sublime Text.

Cassell answered 11/11, 2022 at 19:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.