Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/documentation/content/en/books/fdp-primer/editor-config/_index.po
18099 views
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR The FreeBSD Project
# This file is distributed under the same license as the FreeBSD Documentation package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: FreeBSD Documentation VERSION\n"
"POT-Creation-Date: 2025-05-01 19:56-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: YAML Front Matter: description
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:1
#, no-wrap
msgid "Configuration used in the texts editors in the FreeBSD Documentation Project"
msgstr ""

#. type: YAML Front Matter: title
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:1
#, no-wrap
msgid "Chapter 13. Editor Configuration"
msgstr ""

#. type: Title =
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:14
#, no-wrap
msgid "Editor Configuration"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:52
msgid ""
"Adjusting your text editor configuration can make working on document files "
"quicker and easier, and help documents conform to FDP guidelines."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:54
#, no-wrap
msgid "Vim"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:58
msgid ""
"Install from package:editors/vim[], then follow the configuration "
"instructions in crossref:editor-config[editor-config-vim-config, "
"Configuration].  More advanced users can use a proper linter like "
"link:https://github.com/dense-analysis/ale[Ale] which can also act as a Vim "
"link:https://langserver.org/[Language Server Protocol] client."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:60
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:309
#, no-wrap
msgid "Use"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:63
msgid ""
"Manual page writers can use the following keyboard shortcuts to reformat:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:65
msgid ""
"Press kbd:[P] to reformat paragraphs or text that has been selected in "
"Visual mode."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:66
msgid "Press kbd:[T] to replace groups of eight spaces with a tab."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:69
msgid ""
"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."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:72
msgid ""
"Vale may already be installed as a dependency of the package:textproc/"
"docproj[] meta-port.  If not, install package:textproc/vale[] with:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:76
#, no-wrap
msgid "$ pkg install vale\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:79
msgid ""
"Install link:https://github.com/dense-analysis/ale[Ale] to integrate into "
"package:editors/vim[], for using package:textproc/vale[]."
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:84
#, no-wrap
msgid ""
"% mkdir -p ~/.vim/pack/vendor/start\n"
"% git clone --depth 1 https://github.com/dense-analysis/ale.git ~/.vim/pack/vendor/start/ale\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:87
msgid ""
"Users who are using plugin managers for package:editors/vim[] do not need "
"the above and should follow the instructions of that plugin manager to "
"install link:https://github.com/dense-analysis/ale[Ale]."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:90
msgid ""
"At this moment due to a bug in link:https://vale.sh[Vale] it is necessary to "
"copy the link:https://vale.sh[Vale] configuration to the home directory.  "
"Considering the repository was cloned into [.filename]#~/doc# copy as "
"following:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:94
#, no-wrap
msgid "% cp -R ~/doc/.vale* ~/\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:97
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:243
#, no-wrap
msgid "Configuration"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:100
msgid "Edit [.filename]#~/.vimrc#, adding these lines to the end of the file:"
msgstr ""

#. type: Block title
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:102
#, no-wrap
msgid "`~/.vimrc`"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:108
#, no-wrap
msgid ""
"if has(\"autocmd\")\n"
"  au BufNewFile,BufRead *.adoc call Set_ADOC()\n"
"  au BufNewFile,BufRead *.[1-9] call Set_MAN()\n"
"endif \" has(autocmd)\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:113
#, no-wrap
msgid ""
"function Set_Highlights()\n"
"  \"match ExtraWhitespace /^\\s* \\s*\\|\\s\\+$/\n"
"  return 0\n"
"endfunction \" Set_Highlights_Adoc()\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:119
#, no-wrap
msgid ""
"function Set_Highlights_MAN()\n"
"  highlight default link OverLength ErrorMsg\n"
"  match OverLength /\\%71v.\\+/\n"
"  return 0\n"
"endfunction \" Set_Highlights_MAN()\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:125
#, no-wrap
msgid ""
"function ShowSpecial()\n"
"  setlocal list listchars=tab:>>,trail:*,eol:$\n"
"  hi def link nontext ErrorMsg\n"
"  return 0\n"
"endfunction \" ShowSpecial()\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:138
#, no-wrap
msgid ""
"function Set_COMMON()\n"
"  setlocal number\n"
"  setlocal shiftwidth=2\n"
"  setlocal tabstop=8\n"
"  setlocal softtabstop=2\n"
"  setlocal formatprg=\"fmt -p\"\n"
"  setlocal autoindent\n"
"  setlocal smartindent\n"
"  call ShowSpecial()\n"
"  call Set_Highlights()\n"
"  return 0\n"
"endfunction \" Set_COMMON()\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:145
#, no-wrap
msgid ""
"function Set_ADOC()\n"
"  setlocal syntax=asciidoc\n"
"  setlocal filetype=asciidoc\n"
"  call Set_COMMON()\n"
"  return 0\n"
"endfunction \" Set_ADOC()\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:158
#, no-wrap
msgid ""
"function Set_MAN()\n"
"  setlocal syntax=man\n"
"  setlocal filetype=man\n"
"  setlocal textwidth=70\n"
"  \" Rewrap paragraphs\n"
"  noremap P gqj\n"
"  \" Replace spaces with tabs\n"
"  noremap T :s/        /\\t/<CR>\n"
"  call Set_COMMON()\n"
"  call Set_Highlights_MAN()\n"
"  return 0\n"
"endfunction \" Set_Man()\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:166
#, no-wrap
msgid ""
"let g:ale_fixers = {\n"
"\\   '*': ['remove_trailing_lines', 'trim_whitespace'],\n"
"\\}\n"
"let g:ale_linters = {\n"
"\\   'asciidoc': ['vale'],\n"
"\\}\n"
"let g:ale_fix_on_save = 1\n"
msgstr ""

#. type: delimited block = 6
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:172
msgid ""
"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."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:175
#, no-wrap
msgid "Emacs"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:178
msgid "Install from package:editors/emacs[] or package:editors/emacs-devel[]."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:180
#, no-wrap
msgid "Automated Proofreading with Flycheck and Igor"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:184
msgid ""
"The link:https://www.flycheck.org/[Flycheck] package is available from "
"link:https://melpa.org/[Milkypostman's Emacs Lisp Package Archive] (MELPA).  "
"If MELPA is not already in Emacs's packages-archives, it can be added by "
"evaluating"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:188
#, no-wrap
msgid "(add-to-list 'package-archives '(\"melpa\" . \"http://stable.melpa.org/packages/\") t)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:191
msgid ""
"Add the line to Emacs's initialization file (one of [.filename]#~/.emacs#, "
"[.filename]#~/.emacs.el#, or [.filename]#~.emacs.d/init.el#) to make this "
"change permanent."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:193
msgid "To install Flycheck, evaluate"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:197
#, no-wrap
msgid "(package-install 'flycheck)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:200
msgid "Create a Flycheck checker for package:textproc/igor[] by evaluating"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:205
#, no-wrap
msgid ""
"(flycheck-define-checker igor\n"
"  \"FreeBSD Documentation Project sanity checker.\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:212
#, no-wrap
msgid ""
"See URLs https://www.freebsd.org/docproj/ and\n"
"http://www.freshports.org/textproc/igor/.\"\n"
"  :command (\"igor\" \"-X\" source-inplace)\n"
"  :error-parser flycheck-parse-checkstyle\n"
"  :modes (nxml-mode)\n"
"  :standard-input t)\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:214
#, no-wrap
msgid "  (add-to-list 'flycheck-checkers 'igor 'append)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:217
msgid ""
"Again, add these lines to Emacs's initialization file to make the changes "
"permanent."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:219
#, no-wrap
msgid "FreeBSD Documentation Specific Settings"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:222
msgid ""
"To apply settings specific to the FreeBSD documentation project, create "
"[.filename]#.dir-locals.el# in the root directory of the documentation "
"repository and add these lines to the file:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:227
#, no-wrap
msgid ""
";;; Directory Local Variables\n"
";;; For more information see (info \"(emacs) Directory Variables\")\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:235
#, no-wrap
msgid ""
"((nxml-mode\n"
"  (eval . (turn-on-auto-fill))\n"
"  (fill-column . 70)\n"
"  (eval . (require 'flycheck))\n"
"  (eval . (flycheck-mode 1))\n"
"  (flycheck-checker . igor)\n"
"  (eval . (add-to-list 'rng-schema-locating-files \"~/.emacs.d/schema/schemas.xml\"))))\n"
msgstr ""

#. type: Title ==
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:238
#, no-wrap
msgid "nano"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:241
msgid "Install from package:editors/nano[]."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:247
msgid ""
"Currently there is no adoc/asciidoc syntax highlight file with nano "
"distribution.  So let's create one from scratch and use an editor to create "
"new file or add lines in the [.filename]#~/.nanorc# with these contents:"
msgstr ""

#. type: Block title
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:249
#, no-wrap
msgid "`~/.nanorc`"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:299
#, no-wrap
msgid ""
"syntax \"asciidoc\" \"\\.(adoc|asc|asciidoc)$\"\n"
"# main header\n"
"color red \"^====+$\"\n"
"# h1\n"
"color red \"^==[[:space:]].*$\"\n"
"color red \"^----+$\"\n"
"# h2\n"
"color magenta \"^===[[:space:]].*$\"\n"
"color magenta \"^~~~~+$\"\n"
"# h4\n"
"color green \"^====[[:space:]].*$\"\n"
"color green \"^\\^\\^\\^\\^+$\"\n"
"# h5\n"
"color brightblue \"^=====[[:space:]].*$\"\n"
"color brightblue \"^\\+\\+\\+\\++$\"\n"
"# attributes\n"
"color brightgreen \":.*:\"\n"
"color brightred \"\\{[a-z0-9]*\\}\"\n"
"color red \"\\\\\\{[a-z0-9]*\\}\"\n"
"color red \"\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+\"\n"
"# Paragraph Title\n"
"color yellow \"^\\..*$\"\n"
"# source\n"
"color magenta \"^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]\"\n"
"# Other markup\n"
"color yellow \".*[[:space:]]\\+$\"\n"
"color yellow \"_[^_]+_\"\n"
"color yellow \"\\*[^\\*]+\\*\"\n"
"color yellow \"\\+[^\\+]+\\+\"\n"
"color yellow \"`[^`]+`\"\n"
"color yellow \"\\^[^\\^]+\\^\"\n"
"color yellow \"~[^~]+~\"\n"
"color yellow \"'[^']+'\"\n"
"color cyan \"`{1,2}[^']+'{1,2}\"\n"
"# bullets\n"
"color brightmagenta \"^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]\"\n"
"# anchors\n"
"color brightwhite \"\\[\\[.*\\]\\]\"\n"
"color brightwhite \"<<.*>>\"\n"
"# trailing whitespace\n"
"color ,blue \"[[:space:]]+$\"\n"
"# multiples of eight spaces at the start a line\n"
"# (after zero or more tabs) should be a tab\n"
"color ,blue \"^([TAB]*[ ]{8})+\"\n"
"# tabs after spaces\n"
"color ,yellow \"( )+TAB\"\n"
"# highlight indents that have an odd number of spaces\n"
"color ,red \"^(([ ]{2})+|(TAB+))*[ ]{1}[^ ]{1}\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:302
msgid "Process the file to create embedded tabs:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:306
#, no-wrap
msgid "% perl -i'' -pe 's/TAB/\\t/g' ~/.nanorc\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:312
msgid "Specify additional helpful options when running the editor:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:316
#, no-wrap
msgid "% nano -AKipwz -T8 _index.adoc\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:319
msgid ""
"Users of man:csh[1] can define an alias in [.filename]#~/.cshrc# to automate "
"these options:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:323
#, no-wrap
msgid "alias nano \"nano -AKipwz -r 70 -T8\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:326
msgid "After the alias is defined, the options will be added automatically:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/fdp-primer/editor-config/_index.adoc:330
#, no-wrap
msgid "% nano _index.adoc\n"
msgstr ""