Hacker News new | past | comments | ask | show | jobs | submit login

What’s weird about programming in proportional fonts? I’ve been doing that for a decade now. Auto formatter mandated at work doesn’t allow for manual format directives anyways, so no one notices.

Ligatures can be nice if you can solve the edit problem: keeping an -> as two characters even if it looks like → can help a lot. Unfortunately, editors don’t do that, so they become too annoying to use (maybe when we render code like we render latex will it be accepted).




> Editors don't do that

VS code does it at least, if i'm interpreting you correctly. You can position your cursor in the middle of the ligature and change either side


I use vim in Windows Terminal as my daily driver, and the terminal definitely treats ligatures as separate characters (taking up multiple character widths, you edit the characters one at a time, etc). I'm mildly curious what editor doesn't, because that would lend significantly greater creedance to the article's arguments.


That sounds pretty nice. Like if you do a backspace into a right pointing arrow (->) does it turn a dash?


Yes. I use ligatures on my system (Windows) and this is true in all IDEs, editors and terminal Windows, including when I SSH to a Linux system and use vim.

It really becomes seamless, and you get used to it in a similar way to syntax highlighting or high resolution screen. Yes, I can code on 768p laptop screen with laggy input and a crappy keyboard, but it's not as nice as my usual workstation.


I tried it in Visual Studio (not Code) once, and was disappointed by the experience. Perhaps they just got it wrong.

Now if only there are any proportional coding fonts with coding ligatures baked in :p.


I think NF Code does? https://github.com/sgigou/NF-Code

Input and Go Font are the two main coding proportional fonts I know. Neither advertise ligature support. There are hacks to copy ligatures from Fira Code in to other fonts but I don't know if they would work for this purpose. https://github.com/ToxicFrog/Ligaturizer


Awesome! I'll definitely take a look at those.


It's OK with nVim in Terminal.app on OSX, when you set a nerd-font of some sort. Has presentational ligatures, doesn't interfere with editing.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: