From patchwork Thu Nov 17 10:09:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 39304 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp993911pzb; Thu, 17 Nov 2022 02:10:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf5CSmtUqOBoG8D7sSfrYsoiqibdHJ8cN+gRC32fda6KYZcMV5kW9FFc8QxpT4XyzeYqYsTs X-Received: by 2002:a05:6402:1768:b0:463:ce05:c00e with SMTP id da8-20020a056402176800b00463ce05c00emr1532643edb.46.1668679818315; Thu, 17 Nov 2022 02:10:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668679818; cv=none; d=google.com; s=arc-20160816; b=CH0WLHmSzVcAEmoPx8LcEQFzRHjZz+ipxzYtqAxZwalOisR3VenId1URSbn2E1h92l vmPvsWD5t/Tmgr7jWl/zmoiMY/Y9eZb5CB6EbyFjXhENKjiMBZnHvbWgLA7SOsnkwzKb fE8FRqAZcJqz7L9IeSH7UVC1K6JfaAsmnL1TMkg1m308smZ4joJSX+npiuGspZri2jN/ 7x9L6rSoVLIBmtNIuehjO01jwBNb3uMiZ/DyzeyOwptaiU3YDOGzp5S7ySfoVhtQ/Wro pwGiD73LKKQXCYXmYiKkyhepzQEn4bS3aLcXXOeBsmPA+w27EYqkZwlU/9rCeVmQqzrC sm4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=F6KIcOgkFGTKx6FeBB6nsLFGhUanBIygtDgL7zceo2I=; b=EYLxHqTNst2PaEgtB+YXmETZg3KZA6X6Iff883pk6BiNP5p+a+zskpktPkv5ee/Y7V Mn6w4K/BFKAjB64jxAkaqPkY1PbFN5EoDlz4grOeuKiNziZN+XA2PaWVuYMsMUyZXj1L GwrmsscVa8ZAKWb2f7kU7pin+MW/siYVKzYRkdL9tLyxA65nI3yOOGFaQMTvVeXwUUNn ODbJMwQbofA4qjRv5LG7lwI9ZVsjjhghb21LF6LpZ8ZroBPHTMc4LlFsdr+hJIUrjQ3h 5MFvlgoOWfXISP/QwltR8oQqG+5IbjhAh1EuAhg7j064xDqE8psxMVivmNvTil0vMv84 ueaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e13-20020a056402190d00b00447a8836a56si618187edz.208.2022.11.17.02.10.17; Thu, 17 Nov 2022 02:10:18 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8B8F268BCA6; Thu, 17 Nov 2022 12:10:05 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F0FC968BA90 for ; Thu, 17 Nov 2022 12:09:57 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id B30092400F5 for ; Thu, 17 Nov 2022 11:09:57 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id jZqeT2rX7f3y for ; Thu, 17 Nov 2022 11:09:57 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 7FF152404F8 for ; Thu, 17 Nov 2022 11:09:56 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 34B973A058F for ; Thu, 17 Nov 2022 11:09:50 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 17 Nov 2022 11:09:40 +0100 Message-Id: <20221117100942.6217-5-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221117100942.6217-1-anton@khirnov.net> References: <20221117100942.6217-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/7] doc/developer.texi: move editor configuration under formatting X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 5sRyzYw6b9zp It logically belongs there. --- doc/developer.texi | 67 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/doc/developer.texi b/doc/developer.texi index 44da6e41af..d0e2e04a2d 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -119,6 +119,40 @@ The presentation is one inspired by 'indent -i4 -kr -nut'. The main priority in FFmpeg is simplicity and small code size in order to minimize the bug count. +@subsection Vim configuration +In order to configure Vim to follow FFmpeg formatting conventions, paste +the following snippet into your @file{.vimrc}: +@example +" indentation rules for FFmpeg: 4 spaces, no tabs +set expandtab +set shiftwidth=4 +set softtabstop=4 +set cindent +set cinoptions=(0 +" Allow tabs in Makefiles. +autocmd FileType make,automake set noexpandtab shiftwidth=8 softtabstop=8 +" Trailing whitespace and tabs are forbidden, so highlight them. +highlight ForbiddenWhitespace ctermbg=red guibg=red +match ForbiddenWhitespace /\s\+$\|\t/ +" Do not highlight spaces at the end of line while typing on that line. +autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@