Oliver Zheng wrote:
> On Tue, Dec 23, 2008 at 3:57 PM, Max Waterman
> <[email protected]> wrote:
>   
>> How is the difference between the two instances above best described?
>> Perhaps 'block indentation' as apposed to 'line-wrapping indentation'?
>>     
>
> The difference is it allows for a variable width display of tabs.
> Different people have different preferences for their tab width.
> Personally, I prefer 8 columns for a tab, but the guy next door might
> like 3. A scheme that has tabs for indents allows for everybody's
> preference.
>   
That's the difference between using spaces and tabs, or combinations 
there of. I'm talking specifically about the difference between trying 
to align 'blocks' of code (where you want to use tabs) and wrapped lines 
of code (where you want to use spaces in addition to the tabs for the 
blocks).

I guess my question/thought isn't particularly relevant, but IMO the 
words are confusing - they're both there for 'alignment' and 'indentation'.

So, I suppose you can forget what I said, if you feel like it ;)
> The spaces are particular to the statement. The width of alignment
> depends on the previous line of the statement, not on how wide I
> prefer my tabs to be.
>   
Sure...but tabs are for alignment too, so the terminology is confusing - 
at least to me.

The diagram helps that though.
>
> So it seems like there is no feature available. I guess I'll request
> this feature on vim.org.
>   
I think I saw such a thing in eclipse - it had fairly comprehensive 
'rules'/settings for such things (eg when splitting a line, which part 
of the previous line should the next line be aligned with - the '(', or 
the 'space', or the first word inside the '(').

I think vim would benefit from such a thing too, so long as it didn't 
require it to become a compiler (or the parser part of a compiler, at 
least), which might mean it becomes hugely bloated, especially when it 
needs it for many languages.

We'll see :)

FWIW, and not directly related, but I attempted to come up with some 
Qt/C++ syntax rules for vim, and it was mostly done by someone on this 
list (thanks!), but the result only worked some of the time and the 
times it didn't work were kind of annoying - to the point that I ended 
up not using it. I *really* think there's a place for tools like g++ to 
output the parsed code (in xml, for example) so that tools such as vim 
can make use of it.

FWIW2, our org have set our indentation 'style' - no tabs at all :); 
your question reminds me of someone who objected to me posting with very 
long lines, since it forced him to scroll in order to read to the end of 
the line. I responded that by wrapping the lines, I would force 
*everyone* to view them at the length I decided on - at least this way 
people can wrap them to the width of their window. I think the tab/space 
thing is at least valuely similar.

Max.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to