[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable-width font indentation

From: Herring, Davis
Subject: Re: Variable-width font indentation
Date: Tue, 6 Mar 2018 04:05:37 +0000

> I don't know of a good solution to this problem: in general,
> there's not enough information to distinguish 'indentation'
> spaces (the two spaces before `printf (', `pr ()', and `return 0')
> and 'line-up' spaces (the spaces before `char ()').

This is of course an argument in favor of "smart tabs" 
<https://www.emacswiki.org/emacs/SmartTabs>: you make each tab occupy some 
user-specified width, and _then_ count one character per space to do alignment. 
 That doesn't help if those tabs aren't present, although heuristics to detect 
certain exact numbers of spaces, comparing to the previous lines and looking 
for enclosing delimiters, might close enough of the gap between "treat all 
spaces as ASCII art alignment" and the ideal.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]