FreeBSD Bugzilla – Attachment 234946 Details for
Bug 264899
Update nano configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update nano config for adoc files
nano.patch (text/plain), 2.66 KB, created by
Muhammad Moinur Rahman
on 2022-06-26 09:34:02 UTC
(
hide
)
Description:
Update nano config for adoc files
Filename:
MIME Type:
Creator:
Muhammad Moinur Rahman
Created:
2022-06-26 09:34:02 UTC
Size:
2.66 KB
patch
obsolete
>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 3c865efb2b..d034d87737 100644 >--- a/documentation/content/en/books/fdp-primer/editor-config/_index.adoc >+++ b/documentation/content/en/books/fdp-primer/editor-config/_index.adoc >@@ -191,17 +191,48 @@ Install from package:editors/nano[] or package:editors/nano-devel[]. > [[editor-config-nano-config]] > === Configuration > >-Copy the sample XML syntax highlight file to the user's home directory: >- >-[source,shell] >-.... >-% cp /usr/local/share/nano/xml.nanorc ~/.nanorc >-.... >- >-Use an editor to replace the lines in the [.filename]#~/.nanorc# `syntax "xml"` block with these rules: >+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: > > .... >-syntax "xml" "\.([jrs]html?|xml|xslt?)$" >+syntax "asciidoc" "\.(adoc|asc|asciidoc)$" >+# main header >+color red "^====+$" >+# h1 >+color red "^==[[:space:]].*$" >+color red "^----+$" >+# h2 >+color magenta "^===[[:space:]].*$" >+color magenta "^~~~~+$" >+# h4 >+color green "^====[[:space:]].*$" >+color green "^\^\^\^\^+$" >+# h5 >+color brightblue "^=====[[:space:]].*$" >+color brightblue "^\+\+\+\++$" >+# attributes >+color brightgreen ":.*:" >+color brightred "\{[a-z0-9]*\}" >+color red "\\\{[a-z0-9]*\}" >+color red "\+\+\+\{[a-z0-9]*\}\+\+\+" >+# Paragraph Title >+color yellow "^\..*$" >+# source >+color magenta "^\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]" >+# Other markup >+color yellow ".*[[:space:]]\+$" >+color yellow "_[^_]+_" >+color yellow "\*[^\*]+\*" >+color yellow "\+[^\+]+\+" >+color yellow "`[^`]+`" >+color yellow "\^[^\^]+\^" >+color yellow "~[^~]+~" >+color yellow "'[^']+'" >+color cyan "`{1,2}[^']+'{1,2}" >+# bullets >+color brightmagenta "^[[:space:]]*[\*\.-]{1,5}[[:space:]]" >+# anchors >+color brightwhite "\[\[.*\]\]" >+color brightwhite "<<.*>>" > # trailing whitespace > color ,blue "[[:space:]]+$" > # multiples of eight spaces at the start a line >@@ -211,8 +242,6 @@ color ,blue "^([TAB]*[ ]{8})+" > color ,yellow "( )+TAB" > # highlight indents that have an odd number of spaces > color ,red "^(([ ]{2})+|(TAB+))*[ ]{1}[^ ]{1}" >-# lines longer than 70 characters >-color ,yellow "^(.{71})|(TAB.{63})|(TAB{2}.{55})|(TAB{3}.{47}).+$" > .... > > Process the file to create embedded tabs: >@@ -229,7 +258,7 @@ Specify additional helpful options when running the editor: > > [source,shell] > .... >-% nano -AKipwz -r 70 -T8 _index.adoc >+% nano -AKipwz -T8 _index.adoc > .... > > Users of man:csh[1] can define an alias in [.filename]#~/.cshrc# to automate these options:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 264899
: 234946