Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Indentation. Monospaced fonts allow much easier scanning of indentation levels. For Python this is crucial; for brace-delimited languages it's merely important for many of us.


I don't follow you -- `easier scanning of indentation levels'?

With proportional font, the left-hand whitespace used for indentation of your code looks exactly as with monospaced font. Only the text itself changes somewhat.

The width of tab/positions of tabstops has nothing to do with font itself; it's property (often settable) of the editor (or in rare case of the underlying terminal). May be expressed as `times the space width', but that's it.

Perhaps you mean aligning of function argument and/or parameters one below another, or indentation of parts of expressions one below another? That indeed can't work with proportional font IF the peers in your project use different font (size or shape) or tab-stop setting. Can't work with monospaced font either -- again, IF the peers on your project use different tab-stop settings. Which is prevalent, AFAIK. Some use 12'' netbooks, other use 23'' desktops. I've even known a guy who used a T221 [1]. One size does not fit all.

Nb., you may want to read up on http://nickgravgaard.com/elastictabstops/ if you like to align stuff that way. I don't like that idea though.

----

[1] http://en.wikipedia.org/wiki/T221


This is probably the best advice. If you're doing all your own code, then non-fixed may work.

If you're on projects with other devs where there is an in-grained fixed-width coding practice, it may be very hard to suddenly go non-fixed.




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

Search: