On Dec 25, 9:31 pm, pansz <[email protected]> wrote:
> Richard Hartmann 写道:
>
> > And with tabs, people are a lot more flexible.
>
> > That as may be, let's agree to disagree.
>
> I agree it is good to be flexible.
>
> But by using hard tabs for indent you're *forcing* a non-standard
> tab-size, and you're forcing tab size to be the same as indent size. (In
> vim, that means you're forcing ts=sw)
You seem to be saying that we should all keep ts=8 and mix tabs and
spaces for leading indent so that people who don't like to view
indents as 8 spaces can keep their ts=8, rather than simply setting
their tabstop to match their viewing preferences. If it were not
possible to change tabstop to something other than 8, I can understand
why people would mix tabs and spaces for leading indent. Perhaps this
was the historical origin of the sw != ts stragegy. Are there still
editors in existence that hardcode a tabstop at 8 spaces? Granted, if
so, such a user might be forced to view an indent as 8 spaces, which
may be wider than he would prefer. (However, I would argue that
someone using an editor that doesn't support changing tabstop will be
used to putting up with all sorts of inconveniences;-) Perhaps the
argument against changing ts to match viewing preferences has to do
with the existence of legacy code? i.e., people who edit legacy code
and write new code want to be able to have the same settings for both?
If so, I understand the argument, but it just seems to me that mixing
tabs and spaces for leading indent was a solution to a problem
(inability to change tabstop from 8 spaces), which is a bit of a
historical anachronism, and it seems a shame to perpetuate this
solution now that the problem no longer exists and the "tab as
indentlevel" approach is much simpler and cleaner (and IIUC is the
only approach that ever would have been used if it weren't for the
hardcoded tabstop limitations of early editors). Is there still a
valid reason not to set ts=sw and set ts to match indent preferences?
Brett S.
>
> Indent size of 8 is too big for most programmers (except Linus Thorvald
> and some kernel hackers), if you use hard tabs for indent you *forced*
> that hard tab size should be the same as indent size and those people
> viewing your code will have to change the tab size to a smaller value in
> order to view your code more comfortably.
>
> If you do not use hard tabs in source code, we can still keep tab size
> as the standard 8 and view the code as indent size 4, since 4 spaces
> will always be 4 spaces. Keep tab-size as 8 does not mean I want to use
> shift-width or indent-size as 8, I use shift-width as 4 and keep
> tab-size to 8.
>
> Think considerably what is discouraging collaboration when you *force*
> other programmers to change the standard tabsize=8 into 4 just in order
> to view your code?
>
>
>
>
>
> > Richard- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---