Live data from Hacker News

Fira Code: monospaced font with programming ligatures

github.com

41–50 of 84 posts

Re: Fira Code: monospaced font with programming ligatures

#41
post #8

Probably not possible with ligatures/glyph variants but really cool would be grouping of numbers: In groups of three the first digit would be moved to the right and the last one to the left to simulate a narrow space as thousands separator.

It's a shame the C/C++ standards committee(s) didn't just copy Verilog's base-n notation when they added the "0b" prefix. It's nice to be able to write large constants with optional underscores every four or eight digits, e.g. 32'hffff_0867_5309_beef, or 12'b1101_1110_1010.

Re: Fira Code: monospaced font with programming ligatures

#42

that looks amazing, but I kinda wish that certain ligatures were optional (which they might be, need to look at the CSS docs again for atom) I (personally) don't exactly want == to look too similar to a single =, after all!

Escape using zero-width space character to break up the ligatures ...

Re: Fira Code: monospaced font with programming ligatures

#43
I'm not sure why this has to be done in the font. Vim has support for conceal characters, which can "conceal" syntactic constructs into other characters, i.e., any Unicode code point. This works out pretty well in LaTeX documents for example, because you can see the mathematical symbols. [1]

One gripe I have though is that columns become misaligned when you have concealed characters or ligatures. In the source, \alpha is 6 columns and \beta is 5. Displayed, α and β are both 1 column. This messes up things like visual block insert mode, because the location of that column in the source and what's being displayed might differ. Should you line up the displayed version and make it look nice for you and those with the same plugin, or don't you?

[1]: https://github.com/vim-pandoc/vim-pandoc

Re: Fira Code: monospaced font with programming ligatures

#44
I'm trying out Atom, and ligatures in Erlang don't always render. For example, -> in the head of a function clause doesn't render as a ligature, while inside the function body it does.

EDIT: In developer mode I can see the -> is being rendered as two single character s when in the head of the function. The solution is probably to fix it in the grammar definition: https://github.com/jonathanmarvens/atom-language-erlang/blob...

Re: Fira Code: monospaced font with programming ligatures

#45
post #32

After so many years, there's still no better coding font than MS Consolas. I use it everywhere (where by "everywhere" I mean Linux and OSX, since I don't use any MS products other than this font).

Do you not like Inconsolata? https://www.google.com/fonts/specimen/Inconsolata

When it comes to my eyesight, why settle for anything but the best? Consolas is free as in beer to use. I just checked it into my dotfiles which I clone to all my machines.

Re: Fira Code: monospaced font with programming ligatures

#46
post #8

Probably not possible with ligatures/glyph variants but really cool would be grouping of numbers: In groups of three the first digit would be moved to the right and the last one to the left to simulate a narrow space as thousands separator.

It's a shame the C/C++ standards committee(s) didn't just copy Verilog's base-n notation when they added the "0b" prefix. It's nice to be able to write large constants with optional underscores every four or eight digits, e.g. 32'hffff_0867_5309_beef, or 12'b1101_1110_1010.

You can write 1'000'000 for a million in C++14. http://en.cppreference.com/w/cpp/language/integer_literal.

They didn't use underscores because _100_000 is a valid identifier in C/C++.

Arbitrary bases aren't there.

Re: Fira Code: monospaced font with programming ligatures

#48
post #33

On what planet does it make sense to release a programming font which explicitly refuses to support both vim and emacs?

Vim and emacs are terminal applications, thus it's down to the terminal emulator to support the font. Some terminal emulators do (eg Konsole). However many do not.

Frankly, I'm amazed at the number of programmers who have made the complaint about vim and emacs support since writing terminal applications (ie stuff that prints to STDOUT) is basically programming 101. It should be pretty obvious to any programmer where the support is required.

Re: Fira Code: monospaced font with programming ligatures

#50
post #44

I'm trying out Atom, and ligatures in Erlang don't always render. For example, -> in the head of a function clause doesn't render as a ligature, while inside the function body it does. EDIT: In developer mode I can see the -> is being rendered as two single character s when in the head of the function. The solution is probably to fix it in the grammar definition: https://github.com/jonathanmarvens/atom-language-erlan…

I found the same thing, in Ruby -> was split up, while in Swift it was fine.
Post reply on HN