<div dir="ltr">After reading <a href="https://wiki.python.org/moin/Vim">the article Joe linked</a> I created a python.vim in my ~/.vim/ftplugin directory. I also have tabstop defaults set in my .vimrc for global defaults that are different from python preferences. So I get to keep my preferences for other stuff while making python indentation correct.<div>
<br></div><div>+1 to removing the lines entirely.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 11:20 AM, Joe Gordon <span dir="ltr"><<a href="mailto:joe.gordon0@gmail.com" target="_blank">joe.gordon0@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><p dir="ltr"><br>
On Oct 25, 2013 12:24 PM, "Dan Prince" <<a href="mailto:dprince@redhat.com" target="_blank">dprince@redhat.com</a>> wrote:<br>
><br>
> -1<br>
><br>
> Slight preference for keeping them. I personally would go the other way and just add them everywhere.</p>
</div><p dir="ltr">May I ask why? Do you use the modeline?</p><div class="HOEnZb"><div class="h5">
<p dir="ltr">><br>
> ----- Original Message -----<br>
> > From: "Joe Gordon" <<a href="mailto:joe.gordon0@gmail.com" target="_blank">joe.gordon0@gmail.com</a>><br>
> > To: "OpenStack Development Mailing List" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
> > Sent: Thursday, October 24, 2013 8:38:57 AM<br>
> > Subject: [openstack-dev] Remove vim modelines?<br>
> ><br>
> > Since the beginning of OpenStack we have had vim modelines all over the<br>
> > codebase, but after seeing this patch<br>
> > <a href="https://review.opeenstack.org/#/c/50891/" target="_blank">https://review.opeenstack.org/#/c/50891/</a><<a href="https://review.openstack.org/#/c/50891/" target="_blank">https://review.openstack.org/#/c/50891/</a>>I<br>
> > took a further look into vim modelines and think we should remove<br>
> > them.<br>
> > Before going any further, I should point out these lines don't bother me<br>
> > too much but I figured if we could get consensus, then we could shrink our<br>
> > codebase by a little bit.<br>
><br>
> I'm not sure removing these counts as a meaningful codebase reduction. These lines can mostly be ignored. Likewise, If the foundation required us to double or triple our Apache license headers I would count that as a codebase increase.<br>
><br>
> ><br>
> > Sidenote: This discussion is being moved to the mailing list because it<br>
> > 'would<br>
> > be better to have a mailing list thread about this rather than bits and<br>
> > pieces of discussion in gerrit' as this change requires multiple patches.<br>
> > <a href="https://review.openstack.org/#/c/51295/" target="_blank">https://review.openstack.org/#/c/51295/</a>.<br>
> ><br>
> ><br>
> > Why remove them?<br>
> ><br>
> > * Modelines aren't supported by default in debian or ubuntu due to security<br>
> > reasons: <a href="https://wiki.python.org/moin/Vim" target="_blank">https://wiki.python.org/moin/Vim</a><br>
> > * Having modelines for vim means if someone wants we should support<br>
> > modelines for emacs (<br>
> > <a href="http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Specifying-File-Variables" target="_blank">http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Specifying-File-Variables</a>)<br>
> > etc. as well. And having a bunch of headers for different editors in each<br>
> > file seems like extra overhead.<br>
> > * There are other ways of making sure tabstop is set correctly for python<br>
> > files, see <a href="https://wiki.python.org/moin/Vim" target="_blank">https://wiki.python.org/moin/Vim</a>. I am a vIm user myself and<br>
> > have never used modelines.<br>
> > * We have vim modelines in only 828 out of 1213 python files in nova (68%),<br>
> > so if anyone is using modelines today, then it only works 68% of the time<br>
> > in nova<br>
> > * Why have the same config 828 times for one repo alone? This violates the<br>
> > DRY principle (Don't Repeat Yourself).<br>
> ><br>
> ><br>
> > Related Patches:<br>
> > <a href="https://review.openstack.org/#/c/51295/" target="_blank">https://review.openstack.org/#/c/51295/</a><br>
> > <a href="https://review.openstack.org/#/q/status:open+project:openstack/nova+branch:master+topic:noboilerplate,n,z" target="_blank">https://review.openstack.org/#/q/status:open+project:openstack/nova+branch:master+topic:noboilerplate,n,z</a><br>
> ><br>
> > best,<br>
> > Joe<br>
> ><br>
> > _______________________________________________<br>
> > OpenStack-dev mailing list<br>
> > <a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
> ><br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</p>
</div></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>