From nobody Sun Nov 13 12:28:29 2022 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N9BYn5nDvz4dLHl for ; Sun, 13 Nov 2022 12:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N9BYn5F1Hz4Pdt; Sun, 13 Nov 2022 12:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668342509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5ORSzf3boW+JA7JdZrA+fg3CvKBBUgRMOVGQ7pG9QM=; b=HWrnNru7VRVFzHqJ+As1bQewkBLaX3erSlwccTZZxxYw8waw50jHVg26mzJ0aLZvs8bYC1 LB8SXkTfRLNa+IaWP9JQDUC0SbxVFkDXZ3/k6wAAwb8kkq9ZVPQHLj2EB9LdHuJ5NKhwA6 CGW/O4B+otevJYygxZtI7XlSbpdqCV3a+1vCtsvtveuZ4wYPYuvD1/YKRYutzFmaRTQyzu VJ1pAPa+IyJlnslJCruzaoesnUko2it6ve98y/uf92XqWGMlaCnWSCY62dQAEN5NjMdwEX VZ4dkTiQzL0pTl1EqQ4mQjzzWbmOEjS5x4z//Y4AzlTto0wJHw41aIkMWXFBfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668342509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5ORSzf3boW+JA7JdZrA+fg3CvKBBUgRMOVGQ7pG9QM=; b=LH2QpU6nxsNpZ45h8/iYy5dcNH1wJGt4iKFpbjWTWbfr85SCaKiE8YE/vv5RkAACSEb+Ic nYPHDwxaOjJYk9Q8jrrURUWse1PPI4Z0yzVmpSv9FYaDJbQnt9FsaxFbk9tJpSL51PrNOl iINPbqKHyeLcOlYHkvGsLnQ74tCClUb41KRB0qYvrb66NIsn8iNrcLg7cepajYFEeoRxa4 M7FMoHj9g/iwVH1QqcDjyliRs1DVnjzqcK9SC5/6fBgc12L8mRHxqABA9a6mXghxlzv1Uz LCwdrbdgUvIl/bCkbaMQoHQ0tWuQYBkQWFf9BWvhdLtQ3s16EVDD+4b4up1Ycg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668342509; a=rsa-sha256; cv=none; b=MgbXSGPtp1+2ftLFqHc/PG2CHSHSdIo+TqP1yztUJ3FwkqT/LmT/RM2nASq8Z9llpFANIa IbWIlrTcoc9FEZghHnlyRYsA1sm2Jn+024Vy07WTNVtRt5uJTuECrFkGCZQPZrAtMnWCOP YmyTVA9BFLkeR+CtHehGqE89TsX3Xznx00k+Q1l/CVTZEJEJaTwOoUhnelAgXViiYzUCj8 qOKK+P1I9XJyuK4Jg/ctjuH7+2itiWLKUA36gS3sXhiLJFqlQ6NBijwu6im36ZTHUxagbT az/Peyo3ZRpxRpgq3PjOcCf/VLy1wQdOU2tZWPJ76xzr7VCAsN/rZov3okyWKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N9BYn4CBtz12Pl; Sun, 13 Nov 2022 12:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ADCSTS5080055; Sun, 13 Nov 2022 12:28:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ADCSTrJ080054; Sun, 13 Nov 2022 12:28:29 GMT (envelope-from git) Date: Sun, 13 Nov 2022 12:28:29 GMT Message-Id: <202211131228.2ADCSTrJ080054@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: b52e5e46b6 - main - fdp-primer: vim configuration for vale List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b52e5e46b6b4e1397ef14fe8b24b0f13812479b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/doc/commit/?id=b52e5e46b6b4e1397ef14fe8b24b0f13812479b9 commit b52e5e46b6b4e1397ef14fe8b24b0f13812479b9 Author: Muhammad Moinur Rahman AuthorDate: 2022-11-13 12:26:57 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2022-11-13 12:26:57 +0000 fdp-primer: vim configuration for vale Update vim configuration details for using with vale. Approved by: bcr Differential Revision: https://reviews.freebsd.org/D37377 --- .../en/books/fdp-primer/editor-config/_index.adoc | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/documentation/content/en/books/fdp-primer/editor-config/_index.adoc b/documentation/content/en/books/fdp-primer/editor-config/_index.adoc index e6218dfb88..1b0797132a 100644 --- a/documentation/content/en/books/fdp-primer/editor-config/_index.adoc +++ b/documentation/content/en/books/fdp-primer/editor-config/_index.adoc @@ -62,6 +62,34 @@ Manual page writers can use the following keyboard shortcuts to reformat: * Press kbd:[P] to reformat paragraphs or text that has been selected in Visual mode. * Press kbd:[T] to replace groups of eight spaces with a tab. +A linter named link:https://vale.sh[Vale] has been introduced to check grammatical and cosmetic errors on the documents. +Vale has support for various editors and IDEs. + +Install package:textproc/vale[] + +[source,shell] +.... +$ pkg install vale +.... + +Install link:https://github.com/dense-analysis/ale[Ale] to integrate into package:editors/vim[], for using package:textproc/vale[] + +[source,shell] +.... +% mkdir -p ~/.vim/pack/vendor/start +% git clone --depth 1 https://github.com/dense-analysis/ale.git ~/.vim/pack/vendor/start/ale +.... + +Users who are using plugin managers for package:editors/vim[] do not need the above and should follow the instructions of the plugin manager to install link:https://github.com/dense-analysis/ale[Ale] + +At this moment due to a bug in the link:https://vale.sh[Vale] it is necessary to copy the link:https://vale.sh[Vale] configurations to the home directory. +Considering the repository was cloned into [.filename]#~/doc# copy as following: + +[source,shell] +.... +% cp -R ~/doc/.vale* ~/ +.... + [[editor-config-vim-config]] === Configuration @@ -123,8 +151,22 @@ function Set_MAN() call Set_Highlights_MAN() return 0 endfunction " Set_Man() + +let g:ale_fixers = { +\ '*': ['remove_trailing_lines', 'trim_whitespace'], +\} +let g:ale_linters = { +\ 'asciidoc': ['vale'], +\} +let g:ale_fix_on_save = 1 .... +[IMPORTANT] +====== +Above configuration will automatically remove trailing line, trailing space and multiple spaces which might display additional unwanted changes in `git diff` output. +In such cases properly mention that in the commit log. +====== + [[editor-config-emacs]] == Emacs