Copy link to clipboard
Copied
Hi everyone, just wondering if anyone can tell me if I can change the default line height in the code view?
I've switched to Lucida Console because I find Courier new a hideous choice for a coding font, but it looks the leading is some kind of fixed rather than a relative value.
So since Lucida Console at 11pt is taller than Courier New at 11pt, the leading is now tiny and headache-inducing.
I haven't been able to find anything on this, googling just throws up a bunch of articles on CSS and Design View, of course 😕
If you want to change the line-height in code view manually:
1) Create a custom code theme in edit > preferences > interface


2) Select your newly created code theme and click 'edit' (pencil icon)

3) Add the desired line-height property to main.less for the .CodeMirror selector
for example:
.CodeMirror {
line-height: 12px;
}

4) Save/close the file main.less and make sure you new custom code theme is selected in edit > preferences > interface
Copy link to clipboard
Copied
I use Source Code Pro with a large font size. You can also click in code view window and hit Ctl++ to make code bigger or Ctrl+- (minus) to make it smaller. Ctrl+0 (zero) will revert to normal zoom. AFAK, there is no option to change line heights

Copy link to clipboard
Copied
Bummer. 11pt is exactly the height I want for the font itself (14 is gigantic for me
), but the leading is just awful.
It's not the end of the world as mostly I don't use DW for coding (mainly because of things like this), but I was hoping to swap back because my current choice (Brackets) doesn't do autocomplete quite as well.
I have to admit "You can't" isn't the answer I was hoping for, but I suppose technically my question has an answer.
Copy link to clipboard
Copied
rickibarnes wrote
11pt is exactly the height I want for the font itself (14 is gigantic for me ), but the leading is just awful.
Check your OS display settings. If 14pt font looks gigantic to you, I think your zoom level needs to be reset to NORMAL or 100%.
Copy link to clipboard
Copied
Or.... my personal preferences are different to yours. I'm obviously using hyperbole when I say that 14pt is gigantic - but also, that suggestion doesn't address the issue in hand, which is the ratio of font size to spaces between the lines.
Copy link to clipboard
Copied
2 months later and still a problem?
This is what Source Code Pro, 14pt, normal zoom looks like on my system. The line-height looks fine to me.

Copy link to clipboard
Copied
Well no, not still a problem - I've just stopped using DW at all. I just came across the notification while clearing out my inbox yesterday and replied before I thought about how irrelevant it was ![]()
Interestingly though, in that screenshot you've included, the line spacing is what I would call fine - but for me it's not. Are you on a Mac - it might be a Mac/PC difference?
Check out how cramped mine is:

Copy link to clipboard
Copied
I'm on Windows 10.
Copy link to clipboard
Copied
If you want to change the line-height in code view manually:
1) Create a custom code theme in edit > preferences > interface


2) Select your newly created code theme and click 'edit' (pencil icon)

3) Add the desired line-height property to main.less for the .CodeMirror selector
for example:
.CodeMirror {
line-height: 12px;
}

4) Save/close the file main.less and make sure you new custom code theme is selected in edit > preferences > interface
Copy link to clipboard
Copied
OH yessssssss you champ! Thanks.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now