[openstack-dev] Remove vim modelines?
Dolph Mathews
dolph.mathews at gmail.com
Thu Oct 24 13:38:29 UTC 2013
On Thu, Oct 24, 2013 at 8:19 AM, Flavio Percoco <flavio at redhat.com> wrote:
> On 24/10/13 13:38 +0100, Joe Gordon wrote:
>
>> Since the beginning of OpenStack we have had vim modelines all over the
>> codebase, but after seeing this patch https://review.opeenstack.org/**
>> #/c/50891/ <https://review.opeenstack.org/#/c/50891/>
>> I took a further look into vim modelines and think we should remove them.
>> Before going any further, I should point out these lines don't bother me
>> too
>> much but I figured if we could get consensus, then we could shrink our
>> codebase
>> by a little bit.
>>
>> Sidenote: This discussion is being moved to the mailing list because it
>> 'would
>> be better to have a mailing list thread about this rather than bits and
>> pieces
>> of discussion in gerrit' as this change requires multiple patches.
>> https://
>> review.openstack.org/#/c/**51295/<http://review.openstack.org/#/c/51295/>
>> .
>>
>>
>> Why remove them?
>>
>> * Modelines aren't supported by default in debian or ubuntu due to
>> security
>> reasons: https://wiki.python.org/moin/**Vim<https://wiki.python.org/moin/Vim>
>> * Having modelines for vim means if someone wants we should support
>> modelines
>> for emacs (http://www.gnu.org/software/**emacs/manual/html_mono/emacs.**
>> html# <http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#>
>> Specifying-File-Variables) etc. as well. And having a bunch of headers
>> for
>> different editors in each file seems like extra overhead.
>> * There are other ways of making sure tabstop is set correctly for python
>> files, see https://wiki.python.org/moin/**Vim<https://wiki.python.org/moin/Vim>.
>> I am a vIm user myself and have
>> never used modelines.
>> * We have vim modelines in only 828 out of 1213 python files in nova
>> (68%), so
>> if anyone is using modelines today, then it only works 68% of the time in
>> nova
>> * Why have the same config 828 times for one repo alone? This violates
>> the DRY
>> principle (Don't Repeat Yourself).
>>
>>
>> Related Patches:
>> https://review.openstack.org/#**/c/51295/<https://review.openstack.org/#/c/51295/>
>> https://review.openstack.org/#**/q/status:open+project:**openstack/<https://review.openstack.org/#/q/status:open+project:openstack/>
>> nova+branch:master+topic:**noboilerplate,n,z
>>
>>
>
> /me is a vim user!
>
> +1 on removing those lines!
>
>
+1 for dd:wq
> best,
>> Joe
>>
>
> ______________________________**_________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.**org <OpenStack-dev at lists.openstack.org>
>> http://lists.openstack.org/**cgi-bin/mailman/listinfo/**openstack-dev<http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>>
>
>
> --
> @flaper87
> Flavio Percoco
>
>
> ______________________________**_________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.**org <OpenStack-dev at lists.openstack.org>
> http://lists.openstack.org/**cgi-bin/mailman/listinfo/**openstack-dev<http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>
--
-Dolph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131024/302a9984/attachment.html>
More information about the OpenStack-dev
mailing list