On 1/3/13 7:44 PM, Nicholas Nethercote wrote:
Hi

https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style
says that mozilla code files should have the following Emacs and Vim
mode lines:

   /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil;
c-basic-offset: 2 -*- */
   /* vim: set ts=2 et sw=2 tw=80: */

AIUI, |tab-width| in Emacs and |ts| in Vim are equivalent -- they
dictate how wide tabs that appear in files should appear.  I can't see
a good reason why they aren't the same value in the above lines.
I thought that "tab-width" was equivalent to "tw" and not "ts". In any case, the purpose of tab-width: 8 is to make it obvious when code has hard tabs and is mis-indented. I'd be willing to entertain a larger value such as 17 or 23 ;-) But I really don't think we should use 2, because it would be easier to introduce hard tabs into a file by accident.

--BDS

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to