On Thursday 2013-01-03 16:44 -0800, Nicholas Nethercote wrote:
> 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.
> 
> In theory neither of these values needs setting is necessary because
> our code files shouldn't have spaces, but in practice it's probably
> sensible to have a setting.  I suggest that we change the emacs
> tab-width value to 2 in the style guide to match the vim value, though
> I'm happy to hear arguments for other values.

Are there any common installations of vi/vim that actually honor
modelines anymore?  The ones on the Linux distros that I used
stopped doing so as a security measure.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to