Get rid of the vim mode lines at the end of each file

Bug #522708 reported by Numérigraphe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Wishlist: Remove the VIM directives at the end of each file:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
To my knowledge, the only use for this is to render the file properly in the VIM editor.
We shouldn't do that: it's not the source code's concern to configure the text editor.
This is a practice of another age.
If you can't get VIM to show the source properly, then you should use another editor.
Lionel.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

I don't believe it hurts anything (or anyone) to have these directives, and they're useful to vim users. What's the problem exactly?

> We shouldn't do that: it's not the source code's concern to configure the text editor.

Actually, these hints are very useful as they ensure a modicum of respect for the project's conventions, even for people who might have different conventions on other projects (and have configured their editor for those settings).

> If you can't get VIM to show the source properly, then you should use another editor.

I believe it's more about ensuring non-broken edits than about properly showing files, I'd certainly expect VI to display python files correctly even without any hint.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Please note: I don't wan't to go on a flame war with VIM users (they're so used to it!), only pointing at bad separation of concerns.

> What's the problem exactly?
It's mostly useless and it takes time to maintain. Little time I grant you, but that's a pointless distraction.

>Actually, these hints are very useful as they ensure a modicum of respect for the project's conventions(...)
>I believe it's more about ensuring non-broken edits(...)
These are none of the source's business. IMHO: know your tools, use your tools.

If you want to help VIM users, can't a config file be set up in a .vimrc or something?
Is VIM so important in our community?
Lionel

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 522708] Re: Get rid of the vim directives at the end of each file

Hello,

BTW, I'm pretty sure showing to your audience you rely on VIM so much that
you even put such directives right inside the code will frighten lot's of
potential adopters who may think you belong to the "old" generation
of programmers. I know that for now Pydev and similar tools have their
limits with OpenERP because they can't resolve yet the meta-programming
tricks (at least they have a spell checker on by default...), I'm just
saying it looks dinosaur to some potential adopters.

Those past weeks I've trained US guys to OpenERP. The guys where talking
about investing millions and making thousands of developers switch from .Net
to OpenERP. But when they see the tooling with OpenERP is the Dia slideware
dead end and aside from that it's plain vi + be smart, they were just
too frightened to continue investing on it I think...

2010/2/16 Numérigraphe <email address hidden>

> Please note: I don't wan't to go on a flame war with VIM users (they're
> so used to it!), only pointing at bad separation of concerns.
>
> > What's the problem exactly?
> It's mostly useless and it takes time to maintain. Little time I grant you,
> but that's a pointless distraction.
>
> >Actually, these hints are very useful as they ensure a modicum of respect
> for the project's conventions(...)
> >I believe it's more about ensuring non-broken edits(...)
> These are none of the source's business. IMHO: know your tools, use your
> tools.
>
> If you want to help VIM users, can't a config file be set up in a .vimrc or
> something?
> Is VIM so important in our community?
> Lionel
>
> --
> Get rid of the vim directives at the end of each file
> https://bugs.launchpad.net/bugs/522708
> You received this bug notification because you are subscribed to
> OpenObject Addons.
>
> Status in OpenObject Addons Modules: New
> Status in OpenObject Server: New
>
> Bug description:
> Wishlist: Remove the VIM directives at the end of each file:
> # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
> To my knowledge, the only use for this is to render the file properly in
> the VIM editor.
> We shouldn't do that: it's not the source code's concern to configure the
> text editor.
> This is a practice of another age.
> If you can't get VIM to show the source properly, then you should use
> another editor.
> Lionel.
>
>
>

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : Re: Get rid of the vim directives at the end of each file

> It's mostly useless and it takes time to maintain.

I utterly fail to see what time I takes to maintain. There is literally nothing to change in that snippet, it takes less time to maintain that the license block at the top of the files.

> These are none of the source's business. IMHO: know your tools, use your tools.

How is defining its coding standards less important for the source than defining its encoding, especially when pretty much every single source only contains ascii characters in the first place?

> But when they see the tooling with OpenERP is the Dia slideware dead end and aside from that it's plain vi + be smart, they were just too frightened to continue investing on it I think...

It's not like removing that line from the source would improve the OpenERP tooling in any way, shape or form though. It would still be dia + whatever your favorite text editor happens to be.

Revision history for this message
xrg (xrg) wrote : Re: [Bug 522708] Re: Get rid of the vim directives at the end of each file

On Tuesday 16 February 2010, you wrote:

> Those past weeks I've trained US guys to OpenERP. The guys where talking
> about investing millions and making thousands of developers switch from
> .Net to OpenERP. But when they see the tooling with OpenERP is the Dia
> slideware dead end and aside from that it's plain vi + be smart, they were
> just too frightened to continue investing on it I think...
>
Let those guys stay with .Net and keep their crap code.

Really, dropping the standards of the OpenERP code just because some people
fail to appreciate the worth of vi, or Linux, or Postgres, or even Python
would be a huge regression for OpenERP. If they are frightened to use this
code, it seems that OpenObject is advanced in some way, which is good at the
end of the day.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

> How is defining its coding standards less important for the source than
> defining its encoding, especially when pretty much every single source
> only contains ascii characters in the first place?
Everyone needs the encoding - it's pep-0263.
Every developer needs the licence to know their rights.
But only VIM users use VIM modelines. And VIM users are gurus - they
don't need us to configure VIM in the first place.

I propose we remove the modelines, bundle a .vimrc at the root of the
source tree and tell VIM users to either add it to their own .vimrc, or
"set exrc", or use the -u option.
Lionel

Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: Get rid of the vim directives at the end of each file
Revision history for this message
Numérigraphe (numerigraphe) wrote :

Here is an example bzr merge file.
You can remove all the mode lines with this find and GNU sed:
find <path to your branch> -name '*.py' -type f -print -exec sed -i '/^# vim:/d' '{}' ';'

summary: - Get rid of the vim directives at the end of each file
+ Get rid of the vim mode lines at the end of each file
Changed in openobject-addons:
status: New → Won't Fix
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Sorry, none of the arguments used here really make any point. This is such a trivial matter, let's stop wasting time on it please, I think we have all more important stuff to do :-)

Changed in openobject-server:
status: New → Invalid
Changed in openobject-addons:
status: Won't Fix → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.