Max Waterman wrote:
> Sir Robert Burbridge wrote:
>> Max Waterman wrote:
>>
>>> I feel the need to make my tuppence worth...so I'm gonna :
>>>
>>> I'm curious how the distinction between 'indent' and 'alignment' has
>>> been made. I see them as exactly the same thing; as English words, I
>>> mean. It's obvious from the diagram above what is meant, but the purpose
>>> of the 'indent' is to 'align'...
>>>
>>> ...or am I missing something?
>>>
>>> How is the difference between the two instances above best described?
>>> Perhaps 'block indentation' as apposed to 'line-wrapping indentation'?
>>>
>>> I wonder if it's getting to the point where vim would have to be a
>>> compiler in order to make these distinctions accurately. Perhaps that's
>>> something that is easier for something like Emacs to do.
>>>
>>> I would like to be able to make use of a real compiler in order to do
>>> this kind of code parsing. I'm told that the gcc people, for example,
>>> aren't really interested in doing this.
>>>
>>> Max.
>>>
>>>
>> Max,
>>
>> The difference between indentation and alignment (in English, as you
>> say), is subtle, but it's there. You alluded to it yourself when you
>> said, "but the purpose of the 'indent' is to 'align'". "Indentation" is
>> refers to a line's (or block's) horizontal distance from the margin,
>> whereas "alignment" refers to its horizontal distance from other
>> (usually nearby) lines. So you're right that indentation (varying the
>> distance from the margin) is for the sake of alignment (adjusting the
>> x-distance from other lines) ... which is exactly why they are not the
>> same! It's why something is considered "aligned" (well) only when there
>> is uniformity of indentation, but something can be considered indented
>> (well) when the indentation varies quite a bit -- such as in code.
>>
>> Etymologically, "align" is related to "line" -- it means "to line up";
>> whereas "indent" is related to "dent" -- it means, "to dent inward" (ok,
>> "indent" is a little more complex than that, but it's a reasonable
>> synopsis that captures the spirit of it!).
>>
>> Hope that helps shed some light on it.
>>
> Hrm. Interesting. I think they obviously have different meaning, else
> there wouldn't be two words.
>
> However, I have further thoughts (*all my own opinion, of course*) :
>
> 1) tabs are for tabulating - kind of like making tables - not (just)
> for indenting. It's supposed to cause the 'cursor' to move to next tab
> stop'; ie there's nothing to say you can't use then *within* a line,
> mixed with other text,
1a) also, there's nothing to say they have to be set all to the same
position either....ie they don't *all* have to be an exact multiple of a
single number from the left edge
> 2) spaces are not for indenting *or* aligning (using the current
> parlance) - they're for separating words. For example, what happens if
> I want to view with a variable width font - ie the problem most of us
> are seeing with these email messages?
>
> This leads me to think that the person requesting this feature should
> use tabs and not spaces, and put a tab in the middle of the text to
> which he wishes to align.
>
> <tab>if (<tab>thisIsTrue ) {
> <tab><tab>DoThis();
> }
>
> ...or something like that.
>
> Of course, the flexibility to do what is asked/wanted would be nice,
> but I don't consider this particular case as being something that
> *should* be done because it's *the right way*. On the contrary, IMO,
> it's more a side case that is *the wrong way* but would be nice to be
> able to do. Yeah, I'm not afraid to say it's wrong (if that's what I
> think) ... religious or not :p ... let the flames begin ;)
>
> Max.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---