Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dreamweaver 18.2 line height / leading of code view

Explorer ,
Oct 08, 2018 Oct 08, 2018

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 😕

2.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 09, 2019 Jan 09, 2019

If you want to change the line-height in code view manually:

1) Create a custom code theme in edit > preferences > interface

1.add_custom_theme.jpg

2.my_custom_theme.jpg

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

3.edit_custom_theme.jpg

3) Add the desired line-height property to main.less for the .CodeMirror selector

for example:

.CodeMirror {

line-height: 12px;

}

4.add codemirror_selector.jpg

4) Save/close the file main.less and make sure you new custom code theme is selected in edit > preferences > interface

Translate
Community Expert ,
Oct 08, 2018 Oct 08, 2018

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

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2018 Oct 24, 2018

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 24, 2018 Oct 24, 2018

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%.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 06, 2019 Jan 06, 2019

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2019 Jan 07, 2019

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.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 07, 2019 Jan 07, 2019

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:

line-height.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2019 Jan 08, 2019

I'm on Windows 10.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 09, 2019 Jan 09, 2019

If you want to change the line-height in code view manually:

1) Create a custom code theme in edit > preferences > interface

1.add_custom_theme.jpg

2.my_custom_theme.jpg

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

3.edit_custom_theme.jpg

3) Add the desired line-height property to main.less for the .CodeMirror selector

for example:

.CodeMirror {

line-height: 12px;

}

4.add codemirror_selector.jpg

4) Save/close the file main.less and make sure you new custom code theme is selected in edit > preferences > interface

Paul-M - Community Expert
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 11, 2019 Feb 11, 2019
LATEST

OH yessssssss you champ! Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines