7 ms·
I hope not.
by sunstone 8y ago
I hope not.
- namnemul 8y agoWhy not? There are enough people that use Vim to just write prose. You don’t need monospaced fonts then.
- mseepgood 8y agoI also program in non-monospaced fonts. There is no reason not to.
- stinos 8y agoNo reason at all? Not saying you're wrong per se, but basically you're saying all the monospaced fonts out there used by default in a ton of code editors are there for no reason. Or at least not a good one. Can you elaborate?
- Stratoscope 8y agoMany programmers believe that it is impossible, or at least impractical, to code effectively in a monospaced font. For most kinds of code, this is a mistaken belief. You only need a monospaced font if you want to use column alignment. But it's really quite rare that column alignment is necessary. It can almost always be replaced with simple indentation. Here's what I mean by column alignment: function foo(firstArgument, secondArgumentFunctionCall(itsArgument, itsOtherArgument), thirdArgument) { bar(); } Obviously, those arguments won't line up in a proportional font. But this kind of column alignment is a bad practice anyway. It leads to excessive line lengths, spurious VCS diffs, and is just generally fiddly. The Rust/Servo coding guidelines formerly mandated column alignment like this. But after seeing the problems it caused in their codebase, they switched to a pure indentation style like the one I've used for many years. The idea is simple. Stop making a distinction between statements and expressions, and instead format expressions just as you would format blocks of statements: function foo( firstArgument, secondArgumentFunctionCall( itsArgument, itsOtherArgument ), thirdArgument ) { bar(); } Once you start using this kind of format, it no longer matters whether you use a monospaced or proportional font. It doesn't even matter whether you use tabs or spaces! The notion of "tabs for indentation, spaces for alignment" goes away when you don't use alignment. I think every programmer should try using proportional fonts for a while. Even if you decide you prefer monospaced after all, it's an educational experience to see that monospaced fonts are just not necessary for most programming, and that tabs work fine once you stop using alignment.
- geezerjay 8y ago> Many programmers believe that it is impossible, or at least impractical, to code effectively in a monospaced font. Your post was the very first place I've ever saw that assertion in any shape or form. I never heard anyone come close to make that assertion ever. Moreover, modern IDEs started featuring functionalities that rely on monospace fonts, such as selecting blocks of text by both rows and columns. You should pass off your personal opinion as your own personal opinion instead of posting baseless assertions wrapped in an unbelievable appeal to popularity.
- pmoriarty 8y ago> > Many programmers believe that it is impossible, or at least > > impractical, to code effectively in a monospaced font. > > Your post was the very first place I've ever saw that assertion in > any shape or form. I never heard anyone come close to make that > assertion ever. That's almost certainly a typo, and the GP almost certainly meant to say "without a monospace font" or "in a proportional font". In fact, 2 sentences later he/she says "You only need a monospaced font if you want to use column alignment." This is presumably meant to contradict the assertion in the first sentence.
- Stratoscope 8y agoI'm sorry, I meant to get back to you a week ago. As pmoriarty pointed out, that was indeed a typo, and a rather embarrassing one! The funny thing was that as I was writing that sentence, I first wrote: "The vast majority of programmers believe..." And then I decided to tone down the language a bit. But my initial wording would have made the typo fairly obvious. So it goes. :-) > functionalities that rely on monospace fonts, such as selecting blocks of text by both rows and columns. I use that "column selection" mode with proportional fonts too. It works fine, even though the selected block has ragged right edges.
- wruza 8y agoVCS diffs are broken by design (in a sense of this subthread). Remove a single “if” around a block of code, reindent it, and now you got all lines changed. I wish VCS had special modes for source code that would compare lextoken-wise and show only what actually changed, leaving formatting to personal tastes. Yeah, no more style wars: tab/space, space/newline/none, trailing comma – all become irrelevant. Sigh. Edit: a worst nightmare is a diff that removed “if” and also fixed a mistype in one of 20 reindented lines.
- geezerjay 8y ago> but basically you're saying all the monospaced fonts out there used by default in a ton of code editors are there for no reason. That assertion only makes sense if you assume that indentation or even indentation style have no relevance in software development, and thus there is no reason to consider those basic requirements in any activity related to coding.
- deleted 8y ago[deleted]
- metaphor 8y agoWas curious what language(s) you regularly program in, and if you generally develop/maintain solo or as part of a team? I don't agree with your disposition, but I don't think it's necessarily wrong either...perhaps subjectively driven based on your "norm" vs. what others have experienced, e.g. I ocassionally program in a niche language where the first 7 columns are strictly defined by BNF, uses relatively heavy ASCII art commenting by local coding convention, and will throw obscure errors if a character on any line exceeds the 80th.
- ur-whale 8y ago>There is no reason not to If you've reached that conclusion, I suspect I would not enjoy reading your code very much.
- geezerjay 8y ago>There are enough people that use Vim to just write prose. One of vim's main features is enabling users to navigate by row/vertically while traversing the same column. If someone uses non-monospace fonts then columns won't be aligned and that sort of move makes traversing text an illogical and unintelligible endeavour. Thus defeating the whole point of using vim.
- ealhad 8y agoI thought the whole point of using vim was having access to powerful, mnemonics and highly composable commands to edit text efficiently… Guess I was wrong.
- geezerjay 8y agoComposable, yes, as in compose movements with commands. The thing is, that only works if the user is able to understand what a movement does and know exactly where the cursor ends up after a command. With non-monospace fonts that is not possible, as users have no clear idea where the cursor will end up after, say, pressing j or k. That's the point.
- ealhad 8y agoDo you often use j or k? I know I don't. Text objects (word, paragraph, brackets, quotes, sentence, etc) usually do everything I need.
- geezerjay 8y ago> Do you often use j or k? Yes, extensively. I mean jk let users navigate between adjacent statements. That's a pretty basic usecase. In fact, they are used more often than i or l as word movements express intent more clearly than moving a character at a time.
- ur-whale 8y ago>Do you often use j or k All the time. All the more so because I code using vertical alignments.
- quickthrower2 8y agoWhy not offer people some rope?