3 ms·
I tried Input for a bit but wasn't really fond of the way it looked. My favorite coding font for some time has been Trebuchet MS. It looks really nice in the en
by Stratoscope 9y ago
I tried Input for a bit but wasn't really fond of the way it looked. My favorite coding font for some time has been Trebuchet MS. It looks really nice in the environment I use: fairly large fonts on a high-DPI display.
With one exception, it has easily distinguished punctuation and characters like 0Oo and 1lI|. The exception is that it has a rather poor tilde. One of these days I'll load it into a font editor and put in a better tilde.
Regarding deeply-nested functions not lining up, the solution there is to stop using column alignment and use indentation instead. As an example, the Rust team recently changed their style from this alignment-based format:
let mut rewrites = try_opt!(subexpr_list.iter()
.rev()
.map(|e| {
rewrite_chain_expr(e,
total_span,
context,
max_width,
indent)
})
.collect::<Option<Vec<_>>>());
to this indentation-based format:
let mut rewrites = try_opt!(
subexpr_list
.iter()
.rev()
.map( |e| {
rewrite_chain_expr( e, total_span, context, max_width, indent )
})
.collect::<Option<Vec<_>>>()
);
Even if you use a monospaced font, the latter style is much more practical. For example, if the arguments to `rewrite_chain_expr` were longer in length, you would simply change it to:
let mut rewrites = try_opt!(
subexpr_list
.iter()
.rev()
.map( |e| {
rewrite_chain_expr(
e,
total_span,
context,
max_width,
indent
)
})
.collect::<Option<Vec<_>>>()
);