Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103851 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76573 invoked from network); 27 Jan 2019 19:23:54 -0000 Received: from unknown (HELO mail-ot1-f54.google.com) (209.85.210.54) by pb1.pair.com with SMTP; 27 Jan 2019 19:23:54 -0000 Received: by mail-ot1-f54.google.com with SMTP id t5so12708344otk.1 for ; Sun, 27 Jan 2019 08:02:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=3hc7G+NstHMpgZxizJj0ntDYTNTnvQb0GU+7fM57cKA=; b=gtlyowGdJ6D8v+fkvVGmL0TUrMgoUBt3FSt8g8F21ZzTVnCBIMfNKQXaHDXNk+mRf3 X9KcrGNwLlqNYqTTFdH+yTr8bBMZhQDoQiSUlg+0tOxfGvlDm24mbXADpOyRKpJQwiWz t8JbR+E/iYIXEPRAhXCl3tpSjNPXaGIKbItd0k8M+ZwHKCQ/hJZBgAbn5XbKL7CmP3G9 JZ0dWYNkJTUDEn8zrSjGdL5ebAJG5IKSWlKKIBoodA0q7jTQeLllSj02UVv4E2q4VlNw 308DsHW1hh55vNIyGA04iZBARVDT4+eObHjtwmUR1KR0GV2gQ/qfQd58z9kEu7v5Butt ERNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3hc7G+NstHMpgZxizJj0ntDYTNTnvQb0GU+7fM57cKA=; b=M0/+AvIGMEs86EqIO7DDRpChj4trc/KHhRSNTKS8Qnf+FrS5bfSUjmEVOWcO/Vow6T Vw3GNkoBM4WLGPkHSmj6g3oqZ6G3HMZHUopyimvwVAyZDrchwEiMc1btXBlQXto9WIIE hvbHUXwLv+WHF5EU3z/x/DoBrAJaCX+E5bWrM9uiioNxBNcqTa/6Mu5DfqpT4V9JV49e bmsrIC5H8oV8aBBNEgxX+qRbDrINnBAMgup8pbKyFYe7bPDTe3yK6DOwTjWuUC87C2tB a0tNiCkJiyA1wR/amL3VuJcxGkxNVFNqumEsGdUnZ0e5ZIViv9CjAlWNoM4pNq27PEWm 6e2g== X-Gm-Message-State: AJcUukelfO9FDjyrZjy0ZZ2PEFbDki2vKjYWTXVLh1Nmy4FSin8r9UGj MDvtsCs9ImqjZdharHezLP7QMFVZwkcXLUoQUkuNViTh X-Google-Smtp-Source: ALg8bN5/lkFlpBS9L0mXFod66TIP8YWmsDihzm4DbO833uXctncIrCCboeAsgQmdx5JJew5Cv7luew9qLPe0sw2/UEo= X-Received: by 2002:a9d:7059:: with SMTP id x25mr14482523otj.35.1548604968967; Sun, 27 Jan 2019 08:02:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 27 Jan 2019 17:02:38 +0100 Message-ID: To: Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Local variables for editors From: peterkokot@gmail.com (Peter Kokot) Hello, On Tue, 22 Jan 2019 at 16:49, Levi Morrison wrote: > > On Wed, Nov 29, 2017 at 2:54 PM Peter Kokot 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