Hello,

On Tue, 22 Jan 2019 at 16:49, Levi Morrison <le...@php.net> wrote:
>
> On Wed, Nov 29, 2017 at 2:54 PM Peter Kokot <peterko...@gmail.com> wrote:
> >
> > Hello,
> >
> > I'm not sure if this has been discussed before, but I find these local
> > variables in C, H and other files a bit strange and bloated:
> >
> > /*
> >  * Local variables:
> >  * tab-width: 4
> >  * c-basic-offset: 4
> >  * End:
> >  * vim600: noet sw=4 ts=4 fdm=marker
> >  * vim<600: noet sw=4 ts=4
> >  */
> >
> > Is there any chance to start omitting them and use a single
> > .editorconfig file instead or is this something that is a must have in
> > C projects of today?
> >
> > Thank you for some clarification on this :)
> > --
> > Peter Kokot
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> I use vim, and do not enable these per-file settings. I don't think
> any distributions enable them by default either. My opinion: I think
> we can get rid of them.
>
> I have used .editorconfig and .clang-tidy for other projects and liked
> it. I tried using it with tabs, and the experience seemed less
> polished but still worked.

Thank you for both feedback. There is a pull request [1] prepared to
remove these. It is split into several commits that did these in
multiple steps for easier reviewing.

Changes:
- All footers (local variables blocks) removed since they don't
provide anything drastically useful in most editors with default
settings
- Removed the so called Vim modeline in some *.phpt files to set the
PHP syntax highlighting, because this functionality for *.phpt files
specifically is not important. Most editors show the PHP syntax by
default already neither the modelines wer synced across all of phpt
files. For example // vim600: syn=php
- The ext/ext_skel.php script also adjusted to not generate the footer
with local variables.

I have left two local variables/modelines:
- in *.w32 files the modeline sets the syntax highlighting in some
editors and on GitHub also: // vim:ft=javascript
- In certain *.phpt files the modeline sets encodings which probably
also don't work properly everywhere but for the documentation purposes
I've left those in for now // vim: set encoding=cp936

Hoping that EditorConfig will also get improved with additional
features over time here a bit.

So, that's good to go in master branch in the next days? If not, let me know...

Cheers.

[1] https://github.com/php/php-src/pull/3757
-- 
Peter Kokot

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to