Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103773 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 64757 invoked from network); 22 Jan 2019 12:38:14 -0000 Received: from unknown (HELO mail-it1-f169.google.com) (209.85.166.169) by pb1.pair.com with SMTP; 22 Jan 2019 12:38:14 -0000 Received: by mail-it1-f169.google.com with SMTP id a6so19135370itl.4 for ; Tue, 22 Jan 2019 01:15:50 -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 :cc; bh=VrUEaYiVKdf5rg3gU3pqnBTVgDYoWyP/QTBbBy0u/0I=; b=m0FTiwg/MSiSN8L+jw29GTxnQy3T1qzjzyErXpNLHqF2xpBqURhr1+GfCBKpHt5B24 1HdVa1+h2Bx0V8F5zmdCM6PJuejk7+cZiCgHU3AmT0mVOSkD+Elr6Ms8BfvJRHCQRNKt zeBHSSlHg6Tl1FG+YB8l+iPvNXY28o1MQudjlYdHtR/sUwDx0GSpq3risRcn/A/tZPru s7kKf/fpkgwvQozxG0mJnURRjhWIfBKZ+h6n0VvQ5qpeEbcRYQ32jhN7XRJGshlv4Pw6 FCFgpNnGV1AbFw5TF7+cvC57QaYOBoSHMd18tJbwZNFDVIWOcOoPf4vSnBJnQT6fDAtm QWpw== 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:cc; bh=VrUEaYiVKdf5rg3gU3pqnBTVgDYoWyP/QTBbBy0u/0I=; b=OWbzTbPd/TtGmk/QQF92lC+SZf4KDviCvgqAX4rMAZ/v2/2oJ+mG7QHZBOH6+mS7eq Tx/NQzeaPOzl76NGt6v+pGaSE0E0tVdgIg7fInM0CyY72bK/zQUN1JheOrJlxfJ/dpUb 8E/1xT3jAzmtXWFxjNn35ouPJzIGWrSmgulHoPVG4HKgjowqzefiaUwq8bgaVKOTGHw2 c+c5svSS7wqg3QMQ6V2R3649O7cet6nhHSaYBk1qxfPNDwcBs2BjErl5otSKpTtR5gUC ISan+/o+oLGVV0Cq9bc42zwlbZYKXGE+DPhlfti8LAXLI3OBUnZv/J1oVp7W6z1by2Fr jWHw== X-Gm-Message-State: AJcUukfkH/JYvRsPoAg8aB3gm7JAQVb44JH9IMNaVpgGUuaaRw3PUu9L PtOf6ecF4b/GludsAHi8iCqEhT2kl1nPAiL+Iw8= X-Google-Smtp-Source: AHgI3IbmAMl9VzsJCt5T9EloihQs/74WfLyz0slNT+hO4GK1/OhakegjhHi6ahqOQJcuKchsDjCTIVx2pUyjOkZ6+1Y= X-Received: by 2002:a05:660c:81a:: with SMTP id j26mr1672104itk.70.1548148549669; Tue, 22 Jan 2019 01:15:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 22 Jan 2019 10:15:34 +0100 Message-ID: To: Peter Kokot Cc: Internals Content-Type: multipart/alternative; boundary="0000000000005cdbac0580086c47" Subject: Re: [PHP-DEV] Re: Local variables for editors From: nikita.ppv@gmail.com (Nikita Popov) --0000000000005cdbac0580086c47 Content-Type: text/plain; charset="UTF-8" On Sat, Jan 19, 2019 at 10:09 PM Peter Kokot wrote: > On Wed, 29 Nov 2017 at 22:53, 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 :) > > Hello, I'm bumping this question since it was brought up also in the > pull request for fixing the code style of the libmbfl [1]. > > Going through these editor settings: > - tab-width: 4 is already set in the .editorconfig file > - c-basic-offset: 4 is emacs setting for indentation level [2] > - noet is setting for vim to not expand tabs to spaces > - sw means setting the shift width in vim > - ts means tabstop > - fdm=marker means folding method [3] > > Since these are specific for the C code, we should instead set other > ways of code style fixes methods for this task. For example, Clang > format and Clang tidy can fix existing code quite nicely from what the > settings they have available. And EditorConfig mostly can do all that > what is set above - set the indentation style and its width. Not to > mention that with the default Vim configuration (tested on latest > Ubuntu), this doesn't work as it should anymore. > > So, the main question here, can we start removing these comment blocks > from the *.c and *.h files together with the footer file [4]? > > [1] https://github.com/php/php-src/pull/3754 > [2] https://www.emacswiki.org/emacs/IndentingC > [3] http://vim.wikia.com/wiki/Folding > [4] http://git.php.net/?p=php-src.git;a=blob;f=footer;hb=HEAD > I think it's okay to drop these. I'm using vim, but I don't think these variables ever did something for me. Nikita --0000000000005cdbac0580086c47--