Live data from Hacker News

Monospaced Programming Fonts with Ligatures

hanselman.com

191–200 of 246 posts

Re: Monospaced Programming Fonts with Ligatures

#191
post #183

Earlier quoted context omitted.

Sublime-text-style multiple cursor text manipulation would break here. And your code would look different than everyone else's machine. How would you display a guideline to make sure you were under a characters-per-line style? What advantages are there? I could never see it working for me. I want a program to format my code with resonable defaults and be done with it.

How would multiple cursors be affected by this? I use a proportional typeface and multiple cursors for all sorts of things, I can't really see how these concepts are even related. As you say, use automatic formatting and you don't need to worry about line-length. (Otoh, having a mandatory max line length makes about as much sense as having a max identifier length or a max lines per file.)

You can't drag a cursor down vertically and know what will happen, something I do surprisingly often because it is very powerful.

Line length guide lines makes sense for me as a visual indicator of what will wrap when I hit the max lines per file. They are also nice ways to gauge when you are nesting too deep or making overly complicated expressions.

Max line length allows you to do nice things with window management and diff tool layout and not spend forever moving around to see the text. I am a convert after thinking it didn't matter. Now it being 80 characters is arbitrary but so would almost any other number be.

Re: Monospaced Programming Fonts with Ligatures

#192

> Picking a programming font is like picking a religion. No matter what you pick someone will say you're wrong. Most people will agree at least that monospaced fonts are ideal for reading code and that both of you who use proportionally spaces fonts are destined for hell, or at the very least, purgatory. I guess I'm destined for hell or purgatory then. Hanselman is not alone. I had the CEO of one company look over my…

At least you still get people complaining about you. It means they care for your soul.

Try using a tab-size of 3 spaces.

Re: Monospaced Programming Fonts with Ligatures

#193

Earlier quoted context omitted.

> For example, it cured the bad habit I had of lining too many things up in columns I don't like this style either, but it's a style not a "bad habit."

nah, it's a bad habit. It means constant readjustment and unnecessarily bloated diffs every time you change a function or variable name. or the lovely foo := a; bar := b; then a day later foo := a; bar := b; foobar := cd; which also points to the problem that it lends itself to premature constant readjustment because a day later you have to move every thing again because as it turns out you really needed foobarlist a…

Alas, if only tabs realized columns could occur in locations other than 8 or 4 space tab stops.

http://nickgravgaard.com/elastic-tabstops/

Re: Monospaced Programming Fonts with Ligatures

#194
post #177

Earlier quoted context omitted.

Just recorded this GIF of typing out a function with the added visual cues: http://imgur.com/a/LQVV2 IMO it's comparable to a WYSIWYG equation editor vs looking at raw LaTeX - conceptual errors pop more.

OT, but out of curiosity what did you use to record this?

I used https://getkap.co/

Re: Monospaced Programming Fonts with Ligatures

#195
post #65
post #55

Earlier quoted context omitted.

What are you going to do when you get older and your eyes go through "the change"? You can keep your font sizes and wear readers, but then don't you have to move your head a lot to view the entire magnified image? Any presbyopic developers care to chime in on what the experience is like? I'm 40, so mine could cross over any time now. I hate 16:9 too. Please give me back the bottom of my screen that you chopped off.

You could try rotating your screen to get 9:16, although I find that it tends to be a bit narrow if you want to split vertically and have two pieces of code side by side. With 16:10 screens however I think it work rather well, I currently use three 1920x1200 monitors and two of them are vertical, it looks like this: https://svkt.org/~simias/emacs-vertical.png It's also great for looking at docs.

I spent some years with dual 24" 10:16 screens. It was a convenient coding and documentation reading environment. If the workstation had supported a third screen, I would've requested one to run horizontally, for the rare times I had to view video, or something.

Re: Monospaced Programming Fonts with Ligatures

#196

Earlier quoted context omitted.

It transforms them from individual characters being put together to approximate symbols into the actual symbols. The act of joining together particular character combinations into more aesthetically pleasing forms is common and very old practice. It looks odd only because we're accustomed to seeing the individual characters due to display limitations inherited from typewriters and TTY machines.

> The act of joining together particular character combinations into more aesthetically pleasing forms is common and very old practice. Yep, the ampersand symbol "&" originated as a ligature for et , Latin for "and". You can see this more obviously in italic families and some fonts expose a more fancier variant as well. Example: http://i.imgur.com/Rsmmql9.jpg .

You sometimes see "&c." for "etc.".

Re: Monospaced Programming Fonts with Ligatures

#197

Earlier quoted context omitted.

> For example, it cured the bad habit I had of lining too many things up in columns I don't like this style either, but it's a style not a "bad habit."

nah, it's a bad habit. It means constant readjustment and unnecessarily bloated diffs every time you change a function or variable name. or the lovely foo := a; bar := b; then a day later foo := a; bar := b; foobar := cd; which also points to the problem that it lends itself to premature constant readjustment because a day later you have to move every thing again because as it turns out you really needed foobarlist a…

[deleted]

Re: Monospaced Programming Fonts with Ligatures

#199
post #33

Apparently I'm one of the two users of proportionality spaced fonts for coding. I've used this now for five years and I don't understand why developers still see this need to code as if monospaced terminals is all that's available. Especially on large screens with high dpi it reads much faster. It also makes it less awkward to use editor unicode substitution for display purposes.

Every time I've tried using a proportional font, my mind doesn't want to see it as code. I can force it, but that gets uncomfortable, so I switch back after a short time. Even if I take the time to adapt, that means switching fonts in all my dev environments (between home and work, 7 OSes, 1-4 editors used in each). And a lot of my hobby code is data format conversion, emulation, etc, so I'd need to find a nice way to format the data tables.

There's a good-sized category of things that have a bit of an adoption cost that I'm assured is worthwhile, but that I don't see a really solid reason to commit to. Proportional fonts is one of those (for me).

Re: Monospaced Programming Fonts with Ligatures

#200

Earlier quoted context omitted.

Why did you format the code snippets in your comment in a monospace font? Also, I'm curious. I want to see how the code looks like. I want to know what are the downsides of monospace and the benefits of proportional. The one you cited isn't too much of a deal, since it is just a habit you can create using monospace still.

> Why did you format the code snippets in your comment in a monospace font? Because I don't know of a way to get HN to format text in a proportional font without losing the line breaks. Believe me, I've tried. :-) > Also, I'm curious. I want to see how the code looks like. I am glad you are curious about it! > I want to know what are the downsides of monospace and the benefits of proportional. The one you cited isn't…

[deleted]
Post reply on HN