<div dir="ltr">If someone takes effort to learn Vim to the point when he/she develops code in it, they most definitely have their preferred settings already, why overwrite them? If those settings conflict with the style guide -- it has been said, pep8 and hacking check will notify.<br>
<br><div>I always thought that leaving some hints to text editor by adding specific content to file content is just a dirty hack -- files should not be editor agnostic, the editor should be smart enough to figure everything out by himself. And yeah, also a happy Vim user for 4 years.<div>
<br></div><div>Replacing the long paragraph with a short response:<br>+1, remove them :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 4:45 PM, Vishvananda Ishaya <span dir="ltr"><<a href="mailto:vishvananda@gmail.com" target="_blank">vishvananda@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 style="word-wrap:break-word">Interesting Background Information:<div><br></div><div>Why do we have modelines?</div>
<div><br></div><div>Termie put them in all the files of the first version of nova</div><div><br></div><div>Why did he put in modelines instead of configuring his editor?</div><div><br></div><div>Termie does a lot of python coding and he prefers a tabstop of 2 on all his personal projects[1]</div>
<div><br></div><div>I really don't see much value outside of people who prefer other tabstops</div><div><br></div><div>+1 to remove them</div><div><br></div><div>Vish</div><div><br></div><div>[1] <a href="https://github.com/termie/git-bzr-ng/blob/master/git-bzr" target="_blank">https://github.com/termie/git-bzr-ng/blob/master/git-bzr</a><br>
<div><div><div><div>On Oct 24, 2013, at 5:38 AM, Joe Gordon <<a href="mailto:joe.gordon0@gmail.com" target="_blank">joe.gordon0@gmail.com</a>> wrote:</div><br></div></div><blockquote type="cite"><div><div>
<div dir="ltr">Since the beginning of OpenStack we have had vim modelines all over the codebase, but after seeing this patch <a href="https://review.openstack.org/#/c/50891/" target="_blank">https://review.opeenstack.org/#/c/50891/</a> 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.<div>
<br></div><div>Sidenote: This discussion is being moved to the mailing list because it 'w<span style="font-family:'Arial Unicode MS',Arial,sans-serif">ould be better to have a mailing list thread about this rather than bits and pieces of discussion in gerrit</span>' as this change requires multiple patches. <a href="https://review.openstack.org/#/c/51295/" target="_blank">https://review.openstack.org/#/c/51295/</a>.</div>
<div><br></div><div><br></div><div>Why remove them?</div><div><br></div><div>* Modelines aren't supported by default in debian or ubuntu due to security reasons: <a href="https://wiki.python.org/moin/Vim" target="_blank">https://wiki.python.org/moin/Vim</a></div>
<div>* Having modelines for vim means if someone wants we should support modelines for emacs (<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>) etc. as well. And having a bunch of headers for different editors in each file seems like extra overhead.</div>
<div>* There are other ways of making sure tabstop is set correctly for python 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 have never used modelines.</div>
<div>* 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</div><div>* Why have the same config 828 times for one repo alone? This violates the DRY principle (Don't Repeat Yourself).</div>
<div><br></div><div><br></div><div>Related Patches:</div><div><a href="https://review.openstack.org/#/c/51295/" target="_blank">https://review.openstack.org/#/c/51295/</a><br></div><div><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>
</div><div><br></div><div>best,</div><div>Joe</div></div></div></div><div>
_______________________________________________<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>
</div></blockquote></div><br></div></div><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></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Sincerely, Ruslan Kiianchuk.</div>
</div></div></div>