From 702a75879d2d8b126d159c6ae35e49524559098f Mon Sep 17 00:00:00 2001 From: asnev Date: Mon, 16 Nov 2026 11:52:52 +0700 Subject: [PATCH] GENESIS --- emacs/.emacs.d/early-init.el | 61 ++++ emacs/.emacs.d/init.el | 382 +++++++++++++++++++++++++ git/.config/git/config | 20 ++ lazygit/.config/lazygit/config.yml | 2 + nano/.config/nano/ada.nanorc | 39 +++ nano/.config/nano/adoc.nanorc | 48 ++++ nano/.config/nano/asm.nanorc | 25 ++ nano/.config/nano/autoconf.nanorc | 35 +++ nano/.config/nano/awk.nanorc | 41 +++ nano/.config/nano/c.nanorc | 50 ++++ nano/.config/nano/changelog.nanorc | 31 ++ nano/.config/nano/cmake.nanorc | 24 ++ nano/.config/nano/css.nanorc | 22 ++ nano/.config/nano/default.nanorc | 33 +++ nano/.config/nano/elisp.nanorc | 36 +++ nano/.config/nano/email.nanorc | 17 ++ nano/.config/nano/fortran.nanorc | 42 +++ nano/.config/nano/go.nanorc | 48 ++++ nano/.config/nano/groff.nanorc | 28 ++ nano/.config/nano/guile.nanorc | 30 ++ nano/.config/nano/haskell.nanorc | 40 +++ nano/.config/nano/html.nanorc | 31 ++ nano/.config/nano/java.nanorc | 16 ++ nano/.config/nano/javascript.nanorc | 27 ++ nano/.config/nano/json.nanorc | 32 +++ nano/.config/nano/lua.nanorc | 66 +++++ nano/.config/nano/makefile.nanorc | 26 ++ nano/.config/nano/man.nanorc | 30 ++ nano/.config/nano/markdown.nanorc | 40 +++ nano/.config/nano/nanohelp.nanorc | 17 ++ nano/.config/nano/nanorc.nanorc | 50 ++++ nano/.config/nano/nftables.nanorc | 35 +++ nano/.config/nano/nix.nanorc | 60 ++++ nano/.config/nano/objc.nanorc | 41 +++ nano/.config/nano/ocaml.nanorc | 30 ++ nano/.config/nano/octave.nanorc | 32 +++ nano/.config/nano/patch.nanorc | 29 ++ nano/.config/nano/perl.nanorc | 38 +++ nano/.config/nano/php.nanorc | 38 +++ nano/.config/nano/po.nanorc | 39 +++ nano/.config/nano/povray.nanorc | 18 ++ nano/.config/nano/puppet.nanorc | 60 ++++ nano/.config/nano/python.nanorc | 47 +++ nano/.config/nano/ruby.nanorc | 40 +++ nano/.config/nano/rust.nanorc | 38 +++ nano/.config/nano/sh.nanorc | 42 +++ nano/.config/nano/spec.nanorc | 45 +++ nano/.config/nano/sql.nanorc | 53 ++++ nano/.config/nano/systemverilog.nanorc | 157 ++++++++++ nano/.config/nano/tcl.nanorc | 41 +++ nano/.config/nano/tex.nanorc | 11 + nano/.config/nano/texinfo.nanorc | 31 ++ nano/.config/nano/toml.nanorc | 29 ++ nano/.config/nano/verilog.nanorc | 111 +++++++ nano/.config/nano/xml.nanorc | 28 ++ nano/.config/nano/yaml.nanorc | 47 +++ nano/.nanorc | 80 ++++++ tmux/.config/tmux/tmux.conf | 21 ++ 58 files changed, 2630 insertions(+) create mode 100644 emacs/.emacs.d/early-init.el create mode 100644 emacs/.emacs.d/init.el create mode 100644 git/.config/git/config create mode 100644 lazygit/.config/lazygit/config.yml create mode 100644 nano/.config/nano/ada.nanorc create mode 100644 nano/.config/nano/adoc.nanorc create mode 100644 nano/.config/nano/asm.nanorc create mode 100644 nano/.config/nano/autoconf.nanorc create mode 100644 nano/.config/nano/awk.nanorc create mode 100644 nano/.config/nano/c.nanorc create mode 100644 nano/.config/nano/changelog.nanorc create mode 100644 nano/.config/nano/cmake.nanorc create mode 100644 nano/.config/nano/css.nanorc create mode 100644 nano/.config/nano/default.nanorc create mode 100644 nano/.config/nano/elisp.nanorc create mode 100644 nano/.config/nano/email.nanorc create mode 100644 nano/.config/nano/fortran.nanorc create mode 100644 nano/.config/nano/go.nanorc create mode 100644 nano/.config/nano/groff.nanorc create mode 100644 nano/.config/nano/guile.nanorc create mode 100644 nano/.config/nano/haskell.nanorc create mode 100644 nano/.config/nano/html.nanorc create mode 100644 nano/.config/nano/java.nanorc create mode 100644 nano/.config/nano/javascript.nanorc create mode 100644 nano/.config/nano/json.nanorc create mode 100644 nano/.config/nano/lua.nanorc create mode 100644 nano/.config/nano/makefile.nanorc create mode 100644 nano/.config/nano/man.nanorc create mode 100644 nano/.config/nano/markdown.nanorc create mode 100644 nano/.config/nano/nanohelp.nanorc create mode 100644 nano/.config/nano/nanorc.nanorc create mode 100644 nano/.config/nano/nftables.nanorc create mode 100644 nano/.config/nano/nix.nanorc create mode 100644 nano/.config/nano/objc.nanorc create mode 100644 nano/.config/nano/ocaml.nanorc create mode 100644 nano/.config/nano/octave.nanorc create mode 100644 nano/.config/nano/patch.nanorc create mode 100644 nano/.config/nano/perl.nanorc create mode 100644 nano/.config/nano/php.nanorc create mode 100644 nano/.config/nano/po.nanorc create mode 100644 nano/.config/nano/povray.nanorc create mode 100644 nano/.config/nano/puppet.nanorc create mode 100644 nano/.config/nano/python.nanorc create mode 100644 nano/.config/nano/ruby.nanorc create mode 100644 nano/.config/nano/rust.nanorc create mode 100644 nano/.config/nano/sh.nanorc create mode 100644 nano/.config/nano/spec.nanorc create mode 100644 nano/.config/nano/sql.nanorc create mode 100644 nano/.config/nano/systemverilog.nanorc create mode 100644 nano/.config/nano/tcl.nanorc create mode 100644 nano/.config/nano/tex.nanorc create mode 100644 nano/.config/nano/texinfo.nanorc create mode 100644 nano/.config/nano/toml.nanorc create mode 100644 nano/.config/nano/verilog.nanorc create mode 100644 nano/.config/nano/xml.nanorc create mode 100644 nano/.config/nano/yaml.nanorc create mode 100644 nano/.nanorc create mode 100644 tmux/.config/tmux/tmux.conf diff --git a/emacs/.emacs.d/early-init.el b/emacs/.emacs.d/early-init.el new file mode 100644 index 0000000..91d6b53 --- /dev/null +++ b/emacs/.emacs.d/early-init.el @@ -0,0 +1,61 @@ +;;; -*- lexical-binding: t -*- +;;; ________ _______ __ __ +;;; / | / \ / | / | +;;; $$$$$$$$/ _____ ____ ______ _______ _______ $$$$$$$ | ______ ____$$ | ______ ______ _______$$ | __ +;;; $$ |__ / \/ \ / \ / |/ | $$ |__$$ |/ \ / $$ |/ \ / \ / $$ | / | +;;; $$ | $$$$$$ $$$$ |$$$$$$ /$$$$$$$//$$$$$$$/ $$ $$ +(windmove-default-keybindings 'control) ; You can use other modifiers here + +;; Rebalance windows automatically when splitting +(setopt window-combination-resize t) + +;; On macOS, make the first click raise the window but don't +;; reposition the cursor to where the click happened. +(setopt ns-click-through nil) + +;; Prefer horizontal split on landscape monitors: `longest' is +;; default; can be `vertical' or `horizontal'. +;; See also the variable `split-width-threshold'. +(setopt split-window-preferred-direction 'longest) + +;; Fix archaic defaults; justification: https://practicaltypography.com/one-space-between-sentences.html +(setopt sentence-end-double-space nil) + +;; Make all confirmation prompts use `y' or `n'. Default is for some +;; prompts to ask for a full `yes' or `no' when the operation is +;; potentially dangerous. Commented out to keep the safer behavior. +; (setopt use-short-answers t) + +;; Make right-click do something sensible and shift-drag behave better +(when (display-graphic-p) + (mouse-shift-adjust-mode) + (context-menu-mode)) + +;; Don't litter file system with *~ backup files; put them all inside +;; ~/.emacs.d/backup or wherever +(defun bedrock--backup-file-name (fpath) + "Return a new file path of a given file path. +If the new path's directories does not exist, create them." + (let* ((backupRootDir (concat user-emacs-directory "emacs-backup/")) + (filePath (replace-regexp-in-string "[A-Za-z]:" "" fpath )) ; remove Windows driver letter in path + (backupFilePath (replace-regexp-in-string "//" "/" (concat backupRootDir filePath "~") ))) + (make-directory (file-name-directory backupFilePath) (file-name-directory backupFilePath)) + backupFilePath)) +(setopt make-backup-file-name-function 'bedrock--backup-file-name) + +;; The above creates nested directories in the backup folder. If +;; instead you would like all backup files in a flat structure, albeit +;; with their full paths concatenated into a filename, then you can +;; use the following configuration: +;; (Run `'M-x describe-variable RET backup-directory-alist RET' for more help) +;; +;; (let ((backup-dir (expand-file-name "emacs-backup/" user-emacs-directory))) +;; (setopt backup-directory-alist `(("." . ,backup-dir)))) + +;; Basic speedups +;; +;; Emacs works really hard to be incredibly compatible out-of-the-box +;; with a wide variety of languages. That comes at the cost of a +;; little performance. These tell Emacs to assume left-to-right text +;; in all buffers. +;; Remove/comment if you read right-to-left languages (Arabic, Hebrew, etc.) +(setq-default bidi-paragraph-direction 'left-to-right) +(setq bidi-inhibit-bpa t) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Discovery aids +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Show the help buffer after startup---makes it a little bit like nano. +;; You can open and dismiss this buffer with `C-h C-q'. +(add-hook 'after-init-hook 'help-quick) + +(setopt view-lossage-auto-refresh t) + +;; which-key: shows a popup of available keybindings when typing a long key +;; sequence (e.g. C-x ...) +(use-package which-key + :config + (which-key-mode)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Minibuffer/completion/searching settings +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; For help, see: https://www.masteringemacs.org/article/understanding-minibuffer-completion + +(setopt enable-recursive-minibuffers t) ; Use the minibuffer whilst in the minibuffer +(setopt completion-cycle-threshold 1) ; TAB cycles candidates +(setopt completions-detailed t) ; Show annotations +(setopt tab-always-indent 'complete) ; When I hit TAB, try to complete, otherwise, indent +(setopt completion-styles '(basic initials substring)) ; Different styles to match input to candidates + +(setopt minibuffer-visible-completions t) ; Use ↑↓ to select candidates +(setopt completion-auto-help 'always) ; Open completion always; `lazy' another option +(setopt completions-max-height 20) ; This is an arbitrary value +(setopt completions-format 'one-column) ; Makes it easier to scroll +(setopt completions-group t) + +;; Eager completion setup: show *Completions* buffer immediately +(setopt completion-auto-select 'second-tab) ; Much more eager +(setopt completion-eager-display t) ; Show the completions buffer immediately +(setopt completion-eager-update t) ; Update display as-you-type + +;; Uncomment to get automatic inline completion previews +(completion-preview-mode) + + +(keymap-set minibuffer-mode-map "TAB" 'minibuffer-complete) ; TAB acts more like how it does in the shell + +;; For a fancier built-in completion option, try ido-mode, +;; icomplete-vertical, or fido-mode. See also the file extras/base.el + +;(icomplete-vertical-mode) +;(fido-vertical-mode) +;(setopt icomplete-delay-completions-threshold 4000) + + +;; isearch is Emacs's built-in searching system +(use-package isearch + :ensure nil ; already installed + :bind + (:map isearch-mode-map + ("C-." . isearch-forward-thing-at-point)) ; Search for thing under cursor + :custom + (lazy-count-prefix-format "(%s/%s) ") + (isearch-lazy-count t) ; show match count + (isearch-allow-motion t) + (isearch-allow-scroll t) ; lets you scroll without breaking search + (isearch-repeat-on-direction-change t) ; C-r immediately goes to previous match + (isearch-wrap-pause 'no-ding) ; Automatically wrap search to top + ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Interface enhancements/defaults +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Mode line information +(setopt line-number-mode t) ; Show current line in modeline +(setopt column-number-mode t) ; Show column as well +(setopt mode-line-collapse-minor-modes nil) ; nil default; set to `t' to hide minor modes + +(setopt x-underline-at-descent-line nil) ; Prettier underlines +(setopt switch-to-buffer-obey-display-actions t) ; Make switching buffers more consistent + +(setopt show-trailing-whitespace nil) ; By default, don't underline trailing spaces +(setopt indicate-buffer-boundaries 'left) ; Show buffer top and bottom in the margin + +;; Enable horizontal scrolling +(setopt mouse-wheel-tilt-scroll t) +(setopt mouse-wheel-flip-direction t) + +;; Update the cursor shape inside a terminal; e.g. when in insert mode +;; when using Evil (Vim emulation) change the cursor to a bar. +(setopt xterm-update-cursor t) + +;; These are too personal to prescribe a default; uncomment and +;; configure according to your tastes +;(setopt indent-tabs-mode nil) ; Only use spaces to perform indentation +(setopt tab-width 4) + +;; Misc. UI tweaks +(blink-cursor-mode -1) ; Steady cursor +(pixel-scroll-precision-mode) ; Smooth scrolling +;; If you use a mouse and scrolling seems a little jittery, you might +;; want to set this to `nil': +;(setopt pixel-scroll-precision-interpolate-mice nil) + +;; Use common keystrokes by default +;(cua-mode) + +;; Makes it easier to repeat commands; `C-x o C-x o' becomes `C-x o o' +;; See https://karthinks.com/software/it-bears-repeating/ +(repeat-mode) + +;; Display line numbers in programming mode +(add-hook 'prog-mode-hook 'display-line-numbers-mode) +(setopt display-line-numbers-width 3) ; Set a minimum width + +;; Nice line wrapping when working with text +(add-hook 'text-mode-hook 'visual-line-mode) + +(setopt global-hl-line-sticky-flag 'window) ; Every window gets own hl-line instance +(global-hl-line-mode) + +;; Use this to enable the line highlight in only certain modes: +;(let ((hl-line-hooks '(text-mode-hook prog-mode-hook))) +; (mapc (lambda (hook) (add-hook hook 'hl-line-mode)) hl-line-hooks)) + +;; Show matching delimiters +(setopt show-paren-delay 0) +(setopt show-paren-mode t) +(setopt show-paren-style 'expression) ; default is 'parenthesis and just does delimiters +(setopt show-paren-context-when-offscreen 'overlay) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Tab-bar configuration +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Show the tab-bar as soon as tab-bar functions are invoked +(setopt tab-bar-show 1) + +;; Add the time to the tab-bar, if visible +;(add-to-list 'tab-bar-format 'tab-bar-format-align-right 'append) +;(add-to-list 'tab-bar-format 'tab-bar-format-global 'append) +;(setopt display-time-format "%a %F %T") +;(setopt display-time-interval 1) +;(display-time-mode) + +;; A transient menu to make working with the tab-bar easier +;; The `transient' library is built-in and makes defining little menus +;; easy to work with. Activate this menu with `C-c C-t'. +(use-package transient + :ensure nil ; built-in + :config + ;; You can define as many of these as you like + (transient-define-prefix tab-bar-transient () + "Tab-bar menu" + [["Creation" + ("t" "new tab" tab-bar-new-tab) + ("n" "next command in new tab" other-tab-prefix)] + ["Movement" + ("j" "jump to tab" tab-switch) + ("h" "move left" tab-bar-move-tab-backward :transient t) + ("l" "move right" tab-bar-move-tab :transient t)]] + [["Management" + ("r" "rename tab" tab-rename)]] + [["" + ("RET" "Done" transient-quit-one)]]) + :bind (:map global-map + ("C-c C-t" . tab-bar-transient))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Theme +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(use-package emacs + :config + (load-theme 'modus-vivendi)) ; for light theme, use modus-operandi + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Optional extras +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Uncomment the (load-file …) lines or copy code from the extras/ elisp files +;; as desired + +;; UI/UX enhancements mostly focused on minibuffer and autocompletion interfaces +;; These ones are *strongly* recommended! +;(load-file (expand-file-name "extras/base.el" user-emacs-directory)) + +;; Packages for software development +;(load-file (expand-file-name "extras/dev.el" user-emacs-directory)) + +;; Vim-bindings in Emacs (evil-mode configuration) +;(load-file (expand-file-name "extras/vim-like.el" user-emacs-directory)) + +;; Writing-focused packages (dictionary, spell-checking, etc.) +;(load-file (expand-file-name "extras/writer.el" user-emacs-directory)) + +;; Org-mode configuration +;; WARNING: need to customize things inside the elisp file before use! See +;; the file extras/org-intro.txt for help. +;(load-file (expand-file-name "extras/org.el" user-emacs-directory)) + +;; Email configuration in Emacs +;; WARNING: needs the `mu' program installed; see the elisp file for more +;; details. +;(load-file (expand-file-name "extras/email.el" user-emacs-directory)) + +;; Tools for academic researchers +;(load-file (expand-file-name "extras/researcher.el" user-emacs-directory)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Built-in customization framework +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages '())) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + + ;; This sets the default font for Emacs. Height is in 1/10 pt; configure as desired. + ;; The example font listed here, Iosevka Output, is available here: https://codeberg.org/ashton314/iosevka-output + ;; '(default ((t (:weight normal :height 130 :width expanded :family "Iosevka Output")))) + ) + +(setq gc-cons-threshold (or bedrock--initial-gc-threshold 800000)) diff --git a/git/.config/git/config b/git/.config/git/config new file mode 100644 index 0000000..95c8c6d --- /dev/null +++ b/git/.config/git/config @@ -0,0 +1,20 @@ +[core] + sshCommand = "ssh -i ~/.ssh/id_ed25519" + +[gpg] + format = ssh + +[gpg.ssh] + program = "ssh-keygen" + allowedSignersFile = "~/.ssh/allowed_signers" + +[user] + email = "notasnev@proton.me" + name = "asnev" + signingkey = "~/.ssh/id_ed25519.pub" + +[commit] + gpgsign = true + +[tag] + gpgsign = true diff --git a/lazygit/.config/lazygit/config.yml b/lazygit/.config/lazygit/config.yml new file mode 100644 index 0000000..237b4ec --- /dev/null +++ b/lazygit/.config/lazygit/config.yml @@ -0,0 +1,2 @@ +git: + overrideGpg: true diff --git a/nano/.config/nano/ada.nanorc b/nano/.config/nano/ada.nanorc new file mode 100644 index 0000000..85711bb --- /dev/null +++ b/nano/.config/nano/ada.nanorc @@ -0,0 +1,39 @@ +## Syntax highlighting for Ada. + +## Original author: Andreas K. Foerster +## License: GPL version 3 or newer + +## Language reference: http://www.ada-auth.org/standards/12rm/html/RM-TTL.html + +syntax ada "\.ad[abcs]$" +comment "--" + +# This linter command leaves an ALI file in the working directory. +linter gcc -c -gnatc + +# Reserved Words (RM 2.9) +icolor yellow "\<(abort|abs|abstract|accept|access|aliased|all|and|array|at)\>" +icolor yellow "\<(begin|body|case|constant|declare|delay|delta|do)\>" +icolor yellow "\<(else|elsif|end|entry|exception|exit|for|function|generic|goto)\>" +icolor yellow "\<(if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding)\>" +icolor yellow "\<(package|pragma|private|procedure|protected|raise|range|record|rem|renames)\>" +icolor yellow "\<(requeue|return|reverse|select|separate|some|subtype|synchronized)\>" +icolor yellow "\<(tagged|task|terminate|then|type|until|use|when|while|with|xor)\>" + +# Separators / Operators +color magenta "'|&|\*|\+|\-|\.|\,|\/|:|;|\(|\)|<|>|\||=" + +# Attributes +color cyan "'[[:alnum:]]+" + +# Numbers (RM 2.4) +color green "\<[0-9][0-9A-Fa-f_#.+-]*" + +# Characters / Strings +color red "'.'|"[^"]*"" + +# Comments +color brightblue "--.*" + +# Trailing whitespace +color ,blue "[[:space:]]+$" diff --git a/nano/.config/nano/adoc.nanorc b/nano/.config/nano/adoc.nanorc new file mode 100644 index 0000000..e663698 --- /dev/null +++ b/nano/.config/nano/adoc.nanorc @@ -0,0 +1,48 @@ +## Syntax highlighting for AsciiDoc files. + +## Original author: Benno Schulenberg +## License: GPL version 3 or newer + +syntax adoc "\.(adoc|asciidoc)$" +comment "//" + +# Keywords (and their arguments first): +color sand "^:.*" +color #8cc "^:[[:alnum:] -]+:|^[[:alpha:]]+::" + +# Headers: +color #ee0 "^=.*" + +# Italic: +color peach "_([^_]|[^_ ][^_]*[^_ ])_|__([^_]|[^ ].*[^ ])__" +# Bold: +color pink "\*([^*]|[^* ][^*]*[^* ])\*|\*\*([^*]|[^* ][^*]*[^* ])\*\*" +# Subscript: +color beet "~[^[:blank:]~]+~" +# Superscript: +color purple "\^[^[:blank:]^]+\^" + +# Character replacements: +color sage "\{(empty|(nb|zw)?sp|wj|apos|quot|[lr][sd]quo|deg|plus|vbar|amp|lt|gt|(start|end)sb|caret|asterisk|tilde|back(slash|tick)|two-(semi)?colons|cxx|pp)\}" + +# List-item markers: +color bold,lightgreen "^ *(\*|-|\.) " +# Block markers: +color bold,sky "^(----+|____+|\.\.\.\.+)$" + +# Verbatim text: +color mint "^ +.*" + +# Cross references: +color mauve "<<.*>>" + +# Continuation marker: +color bold,plum "(^| )\+$" + +# Includes: +color #8cc "^include::.*" +color #88c "^(ifdef|endif)::.*" + +# Comments: +color lagoon "^//.*" +color lagoon start="////" end="////" diff --git a/nano/.config/nano/asm.nanorc b/nano/.config/nano/asm.nanorc new file mode 100644 index 0000000..ba5070a --- /dev/null +++ b/nano/.config/nano/asm.nanorc @@ -0,0 +1,25 @@ +## Syntax highlighting for assembler. + +## Original author: Mike Frysinger +## License: GPL version 3 or newer + +syntax asm "\.(S|s|asm)$" +magic "assembler source" +comment "//" + +color red "\<[[:alpha:]_]{2,}\>" +color brightgreen "\.(data|subsection|text)\>" +color green "\.(align|file|globl|global|hidden|section|size|type|weak)\>" +color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)\>" +color brightred "^[[:blank:]]*[[:alnum:]_.]*:" +color brightcyan "^[[:blank:]]*#[[:blank:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)\>" + +# Strings and names of included files. +color brightyellow ""([^"\]|\\.)*"|<[^= ]*>" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/autoconf.nanorc b/nano/.config/nano/autoconf.nanorc new file mode 100644 index 0000000..4c39c04 --- /dev/null +++ b/nano/.config/nano/autoconf.nanorc @@ -0,0 +1,35 @@ +## Syntax highlighting for Autoconf. + +## Original author: Benno Schulenberg +## License: GPL version 3 or newer + +syntax autoconf "\.(ac|m4)$" +comment "#" + +# Keywords: +color yellow "\<(if|test|then|elif|else|fi|case|esac|ifelse|for|in|do|done)\>" +color yellow "=|!=|&&|\|\|" + +# Macros: +color cyan "\<[[:upper:][:digit:]_]+\>" + +# Version numbers: +color red "\<[-_.0-9]+\>" + +# Strings: +color red ""[^"]*"|'[^']*'" + +# Backticks: +color green "`[^`]*`" + +# Error lines: +color brightred "^[[:blank:]]*\*\*\*.*" + +# Brackets: +color magenta "\[|\]|\(|\)" + +# Comments: +color blue "^[[:blank:]]*#.*|\" +color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>" +color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>" +# Function declarations and special patterns. +color brightgreen "\<(function|extension|BEGIN|END)\>" +# Operators and brackets/braces/slashes/parentheses. +color green "[][!%&()*+/:;<=>?\^{|}~-]" +# Flow control. +color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>" +color brightyellow "\<(break|continue|return)\>" +# I/O statements. +color brightgreen "\<(close|fflush|getline|next|nextfile|print|printf|system)\>" +# Standard functions. +color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>" +color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>" +color magenta "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>" +color magenta "\<(mktime|strftime|systime)\>" +color magenta "\<(and|compl|lshift|or|rshift|xor)\>" +color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>" + +# Strings. +color brightyellow ""([^"\]|\\.)*"" +# Escape sequences. +color brick "\\([abfnrtv\/"]|[0-7]{1,3}|x[[:xdigit:]]{1,2}|u[[:xdigit:]]{1,8})" +# Comments. +color brightblue "(^|[[:blank:]])#.*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/c.nanorc b/nano/.config/nano/c.nanorc new file mode 100644 index 0000000..193e8b2 --- /dev/null +++ b/nano/.config/nano/c.nanorc @@ -0,0 +1,50 @@ +## Syntax highlighting for C and C++ files. + +syntax c "\.([ch](pp|xx)?|C|cc|c\+\+|cu|H|hh|ii?)$" +header "-\*-.*\" +# Labels. +color brightmagenta "^[[:blank:]]*[[:alpha:]_][[:alnum:]_]*:[[:blank:]]*$" +color normal ":[[:blank:]]*$" + +# Types and related keywords. +color green "\<(bool|char|double|enum|float|int|long|short|(un)?signed|struct|union|void|((u_?)?int(_fast|_least)?(8|16|32|64)|[[:lower:]][[:lower:]_]*)_t)\>" +color green "\<(align(as|of)|auto|const(eval|expr|init)?|extern|inline|register|restrict|sizeof|static(_assert)?|thread_local|typedef|typeof(_unqual)?|volatile)\>" +color green "\<(_(Align(as|of)|Atomic|BitInt|Bool|Complex|Decimal(32|64|128)|Generic|Imaginary|Noreturn|Static_assert|Thread_local))\>" +color green "\<(class|explicit|final|friend|mutable|namespace|override|private|protected|public|template|this|typename|using|virtual)\>" +color green "\<(char(8|16|32)_t|wchar_t|(const|dynamic|reinterpret|static)_cast|decltype|export|import|module|noexcept|requires|typeid)\>" + +# Flow control. +color brightyellow "\<(if|else|for|while|do|switch|case|default)\>" +color brightyellow "\<(try|throw|catch|operator|new|delete)\>" +color magenta "\<(break|continue|goto|(co_)?return)\>" + +# Single-quoted stuff (characters, backslash escapes, hex and octal byte codes). +color brightmagenta "'([^'\]|\\(["'\abfnrtv]|x[[:xdigit:]]{1,2}|[0-3]?[0-7]{1,2}))'" + +# Hexadecimal, binary, and boolean values. +color pink "\<(0[Xx][[:xdigit:]]['[:xdigit:]]*|0[Bb][01]['01]*|true|false|nullptr)\>" + +# GCC builtins. +color cyan "__attribute__[[:blank:]]*\(\([^)]*\)\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" + +# Strings and names of included files. +color brightyellow ""([^"]|\\")*"|#[[:blank:]]*include[[:blank:]]*<[^>]+>" + +# Preprocessor directives. +color brightcyan start="^[[:blank:]]*#[[:blank:]]*((el)?if(n?def)?|error|pragma|warning)\>" end="(\`|[^\])$" +color brightcyan "^[[:blank:]]*#[[:blank:]]*((define|else|embed|endif|include(_next)?|line|undef)\>|$)" + +# Comments. +color brightblue "//[^"]*$|(^|[[:blank:]])//.*" +color brightblue start="/\*" end="\*/" + +# Reminders. +color brightwhite,yellow "\<(FIXME|TODO|XXX)\>" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/changelog.nanorc b/nano/.config/nano/changelog.nanorc new file mode 100644 index 0000000..3b581cc --- /dev/null +++ b/nano/.config/nano/changelog.nanorc @@ -0,0 +1,31 @@ +## Syntax highlighting for Changelogs. + +## Original author: Benno Schulenberg +## License: GPL version 3 or newer + +syntax changelog "Change[Ll]og[^/]*$" + +# Author lines. +color green "^(19|20).*" +# Dates. +color red "^(19|20)[[:digit:]-]{8}" +# Email addresses. +color yellow "<[^>]*@[^>]*>" + +# Command-line options. +color cyan "[[:blank:]]-[[:alpha:]$]|--[[:lower:]8-]+" +# Bug and patch numbers. +color cyan "(BZ|bug|patch) #[[:digit:]]+|PR [[:alnum:]]+/[[:digit:]]+" +# Probable constants, for variety. +color brightred "\<[[:upper:]_][[:upper:][:digit:]_]+\>" +# Key sequences. +color brightblue "\^[[:upper:]\^_]|\" + +icolor brightgreen "^[[:blank:]]*((else|end)?if|else|(end)?while|(end)?foreach|break)\>" +color brightgreen "\<(NOT|COMMAND|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)[[:blank:]]" +color brightgreen "[[:blank:]](OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))[[:blank:]]" + +icolor brightred "^[[:blank:]]*((end)?(function|macro)|return)" + +icolor cyan start="\$(ENV)?\{" end="\}" +color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>" + +# Comments. +color brightblue "(^|[[:blank:]])#.*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/css.nanorc b/nano/.config/nano/css.nanorc new file mode 100644 index 0000000..ec8f185 --- /dev/null +++ b/nano/.config/nano/css.nanorc @@ -0,0 +1,22 @@ +## Syntax highlighting for CSS files. + +## Original author: Simon Rupf + +syntax css "\.css$" +comment "/*|*/" + +# First make everything red: +color brightred "." +# Then everything between braces yellow: +color brightyellow start="\{" end="\}" +# Then everything after a colon white: +color brightwhite start=":" end="([;^{]|$)" + +# Pseudo-classes: +color brightcyan ":(active|checked|focus|hover|link|visited|after|before)\>" + +# Comments: +color brightblue start="/\*" end="\*/" + +# Syntactic characters: +color green ";|:|\{|\}" diff --git a/nano/.config/nano/default.nanorc b/nano/.config/nano/default.nanorc new file mode 100644 index 0000000..f2ae870 --- /dev/null +++ b/nano/.config/nano/default.nanorc @@ -0,0 +1,33 @@ +## This is an example of a default syntax. The default syntax is used for +## files that do not match any other syntax. + +syntax default +comment "#" + +# Spaces in front of tabs. +color ,red " + +" + +# Nano's release motto, then name plus version. +color italic,lime "\<[Nn]ano [1-9]\.[0-9][-.[:alnum:]]* "[^"]+"" +color brightred "\<(GNU )?[Nn]ano [1-9]\.[0-9][-.[:alnum:]]*\>" + +# Dates +color latte "\<[12][0-9]{3}\.(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])\>" + +# Email addresses. +color magenta "<[[:alnum:].%_+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,}>" + +# URLs. +color lightblue "\[:space:],.]" + +# Bracketed captions in certain config files. +color brightgreen "^\[[^][]+\]$" + +# Comments. +color cyan "^[[:blank:]]*#.*" + +# Make hard (non-breaking) spaces noticeable. +color ,#444 " " + +# Control codes. +color orange "[[:cntrl:]]" diff --git a/nano/.config/nano/elisp.nanorc b/nano/.config/nano/elisp.nanorc new file mode 100644 index 0000000..6cf86e6 --- /dev/null +++ b/nano/.config/nano/elisp.nanorc @@ -0,0 +1,36 @@ +## Syntax highlighting for Emacs Lisp. + +## Original author: Mark Oteiza +## License: GPL version 3 or newer + +syntax elisp "\.el$" +magic "Lisp/Scheme program" +comment ";" + +# Basic functions/macros +color brightcyan "\<(if|when|unless|cond|and|or|lambda|let|progn|while|dolist|dotimes)\>" +color brightcyan "\" +color brightcyan "\" +# Defining functions +color brightcyan "\" +color brightcyan "\" +color brightcyan "\" +# Defining variables +color brightcyan "\" +# Customization functions +color brightcyan "\" +# Setting values +color brightcyan "\<(setq(-default|-local)?|setf|push|pop|declare(-function)?)\>" +# Feature functions +color brightcyan "\<(require|provide)\>" +# Quoted symbols +color brightyellow "#?'\<(\w|-)+\>" +# Booleans +color brightred "\<(t|nil)\>" +# Keywords +color blue ":(\w|[?-])+" +# Strings +color yellow start="^[[:blank:]]+"" end="[^\]"" +color yellow ""([^"\]|\\.)*"" +# Comments +color cyan "(^|[[:blank:]]);.*" diff --git a/nano/.config/nano/email.nanorc b/nano/.config/nano/email.nanorc new file mode 100644 index 0000000..d9eb4a7 --- /dev/null +++ b/nano/.config/nano/email.nanorc @@ -0,0 +1,17 @@ +## Syntax highlighting for emails. + +syntax email "\.eml$" + +# Quoted lines. +color green "^>.*" +color cyan "^> ?>.*" +color yellow "^> ?> ?>.*" + +# Email addresses. +color brightmagenta "<[^@]+@[^@]+>" + +# URLs. +color brightblue "(https?|ftp)://\S+\.\S+[^[:space:].)]" + +# Signatures, even quoted ones. +color yellow start="^>* ?-- $" end="^>* ?$" diff --git a/nano/.config/nano/fortran.nanorc b/nano/.config/nano/fortran.nanorc new file mode 100644 index 0000000..d79dc22 --- /dev/null +++ b/nano/.config/nano/fortran.nanorc @@ -0,0 +1,42 @@ +## Syntax highlighting for Fortran 90/95. + +## Original author: Pascal Gentil + +syntax fortran "\.(f|for|f90|f95)$" +comment "!" + +color red "\<[0-9]+\>" + +icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>" +icolor green "\<(append|asis|assign|assignment|associated|character|common)\>" +icolor green "\<(complex|data|default|delim|dimension|double precision)\>" +icolor green "\<(elemental|epsilon|external|file|fmt|form|format|huge)\>" +icolor green "\<(implicit|include|index|inquire|integer|intent|interface)\>" +icolor green "\<(intrinsic|iostat|kind|logical|module|none|null|only)\>" +icolor green "\<(operator|optional|pack|parameter|pointer|position|private)\>" +icolor green "\<(program|public|real|recl|recursive|selected_int_kind)\>" +icolor green "\<(selected_real_kind|subroutine|status)\>" + +icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>" +icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>" +icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>" +icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>" +icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>" +icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>" +icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>" +icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>" +icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>" +icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>" +icolor cyan "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>" + +icolor yellow "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>" +icolor yellow "\<(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\>" +icolor yellow "\<(.or.|repeat|select case|then|where|while)\>" + +icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>" + +# Strings. +color yellow ""([^"\]|\\.)*"" + +# Comments. +color blue "!.*" diff --git a/nano/.config/nano/go.nanorc b/nano/.config/nano/go.nanorc new file mode 100644 index 0000000..0fc0429 --- /dev/null +++ b/nano/.config/nano/go.nanorc @@ -0,0 +1,48 @@ +## Syntax highlighting for Go. + +## Original author: Robert Clausecker +## License: CC0 (public domain) + +syntax go "\.go$" +comment "//" + +formatter gofmt -w + +# Types. +color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>" +color green "\<(chan|const|func|interface|map|struct|type|var)\>" +color green "<-[[:blank:]]*chan\>|\" + +# Control structures. +color brightyellow "\<(case|default|defer|else|for|go|if|range|select|switch)\>" + +# Control flow. +color magenta "\<(break|continue|fallthrough|goto|return)\>" + +# Declarations. +color brightcyan "\<(package|import)\>" + +# Literals. +color red "\<(true|false|nil|iota|_)\>" +color red "\<([1-9][0-9]*|0[0-7]*|0[xX][[:xdigit:]]+)\>" +color red "\<[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?i?\>" +color red "\<[0-9]+[eE][+-]?[0-9]+i?\>" +color red "\B\.[0-9]+([eE][+-]?[0-9]+)?i?\>" +color red "\<[0-9]+i\>" + +# Strings and characters; slightly fuzzy. +color red ""([^"\]|\\.)*"|'([^'\]|\\.)+'" +color red start=""([^"\]|\\.)*\\[[:blank:]]*$" end="^([^"\]|\\.)*"" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# Special comments. +color brightcyan "//[[:blank:]]*\+build[[:blank:]]+(([[:alnum:]_]+[[:blank:]]*)+,[[:blank:]]*)*[[:alnum:]_]+" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/groff.nanorc b/nano/.config/nano/groff.nanorc new file mode 100644 index 0000000..f42217d --- /dev/null +++ b/nano/.config/nano/groff.nanorc @@ -0,0 +1,28 @@ +## Syntax highlighting for groff. + +## Original author: Robert D. Goulding + +syntax groff "\.(me|mm|mom|ms|roff|tmac)$|/tmac\.[^/]+$" +comment ".\"" + +# The setting of a string or register +color cyan "^\.(ds|nr) [^[:space:]]*" +# Single-character escapes +color brightmagenta "\\." +# The argument of \f or \s in the same color +color brightmagenta "\\f(.|\(..)|\\s(\+|\-)?[0-9]" +# References to registers +color cyan "\\(\\)?n(.|\(..)" +color cyan start="\\(\\)?n\[" end="]" +# Requests +color brightgreen "^\.[[:blank:]]*[^[:space:]]*" +# Comments +color yellow "(^\\#|(^\.)?\\").*" +# References to strings +color green "\\(\\)?\*(.|\(..)" +color green start="\\(\\)?\*\[" end="]" +# Special characters +color brightred "\\\(.." +color brightred start="\\\[" end="]" +# Macro arguments +color brightcyan "\\\\\$[0-9]" diff --git a/nano/.config/nano/guile.nanorc b/nano/.config/nano/guile.nanorc new file mode 100644 index 0000000..6fdecf5 --- /dev/null +++ b/nano/.config/nano/guile.nanorc @@ -0,0 +1,30 @@ +## Syntax highlighting for Guile Scheme. + +## Original authors: Mark Oteiza and Benno Schulenberg +## License: GPL version 3 or newer + +syntax guile "\.(scm|sld|sls|ss)$" +header "^#!.*guile" +comment ";" + +# Basic syntax +color lightgreen "\<((and|begin|case|cond|do|else|if|lambda|let(rec)?|or|quote|unless|when)\>|let\*|set!)" +# Basic procedures +color lightcyan "\<((append|apply|c[ad]{1,4}r|cons|display|for-each|list|map|newline)\>|reverse(\>|!)|set-c[ad]r!)" +color lightcyan "\<(boolean|char(-ci)?[<>]?=?|complex|eqv?|even|integer|list|nan|negative|null|number|odd|pair|positive|rational|real|string|symbol|vector|zero)\?" +color lightcyan "\<(abs|a?(cos|sin|tan)|ceiling|exp|floor|max|min|modulo|not|random|round|quotient|sqrt|square|truncate)\>" +# Defining things +color brightgreen "\" +# Quoted symbols +color lightyellow "'(\w|[!​$%&*+/:​​<=>?@^_~])(\w|[!​$%&*+/:​​<=>?@^_~.0-9-])*" +# Characters +color brightmagenta "#\\(.|\w+)" +# Booleans +color brightred "#(t|true|f|false)\>" +# Keywords +color lagoon "#?:(\w|[?-])+" +# Strings +color yellow start="^[[:blank:]]*"([^"\]|\\.)*$" end="(^|[^\]|[^\]\\\\)"" +color yellow ""([^"\]|\\.)*"" +# Comments +color italic,#aaa "(^|[[:blank:]]);.*" diff --git a/nano/.config/nano/haskell.nanorc b/nano/.config/nano/haskell.nanorc new file mode 100644 index 0000000..0abc718 --- /dev/null +++ b/nano/.config/nano/haskell.nanorc @@ -0,0 +1,40 @@ +## Syntax highlighting for Haskell files. + +## Original author: Alex Taber +## License: GPL version 3 + +syntax "haskell" "\.hs$" +comment "--" + +# Keywords +color red "\<(as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix(l|r)?|instance|let|in|mdo|module|newtype|qualified|type|where)\>" + +# Various symbols +color cyan "\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\}" + +# Operators +color magenta "==|/=|&&|\|\||<|>|<=|>=" + +# More symbols +color cyan "->|<-|=>" +color magenta "\.|\$" + +# Data constructors +color magenta "\<(True|False|Nothing|Just|Left|Right|LT|EQ|GT)\>" +# Data classes +color magenta "\<(Bounded|Data|Enum|Eq|Floating|Fractional|Functor|Integral|Monad|MonadPlus|Num|Ord|Read|Real|RealFloat|RealFrac|Show|Typeable)\>" + +# Special keyword +color brightred "undefined" + +# Strings +color yellow ""([^"\]|\\.)*"" +# Characters +color brightyellow "'([^'\]|\\.)'" + +# Comments +color green "--.*" +color green start="\{-" end="-\}" + +# Trailing whitespace +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/html.nanorc b/nano/.config/nano/html.nanorc new file mode 100644 index 0000000..395becd --- /dev/null +++ b/nano/.config/nano/html.nanorc @@ -0,0 +1,31 @@ +## Syntax highlighting for HTML. + +syntax html "\.html?$" +magic "HTML document" +comment "" + +formatter tidy -m -q + +# Tags: +color cyan "<[[:alpha:]/!?][^>]*>" +# Bold, italic, underlined, emphasis, and importance: +color brightmagenta "" + +# Named character references: +color red "&[^;[:space:]]*;" + +# Attributes: +color red "\<(abbr|accept(-charset)?|accesskey|action|alink|align|alt|archive|axis|background|bgcolor|border)=" +color red "\<(cell(padding|spacing)|char(off|set)?|checked|cite|class(id)?|compact|code(base|tag)?|cols(pan)?)=" +color red "\<(content(editable)?|contextmenu|coords|data|datetime|declare|defer|dir|disabled|enctype)=" +color red "\<(for|frame(border)?|headers|height|hidden|href(lang)?|hspace|http-equiv|id|ismap)=" +color red "\<(label|lang|link|longdesc|margin(height|width)|maxlength|media|method|multiple)=" +color red "\<(name|nohref|noresize|noshade|object|onclick|onfocus|onload|onmouseover|profile|readonly|rel|rev)=" +color red "\<(rows(pan)?|rules|scheme|scope|scrolling|selected|shape|size|span|src|standby|start|style|summary)=" +color red "\<(tabindex|target|text|title|type|usemap|valign|value(type)?|vlink|vspace|width|xmlns|xml:space)=" + +# Strings: +color green ""([^"\]|\\.)*"" + +# Comments: +color yellow start="" diff --git a/nano/.config/nano/java.nanorc b/nano/.config/nano/java.nanorc new file mode 100644 index 0000000..e431b6d --- /dev/null +++ b/nano/.config/nano/java.nanorc @@ -0,0 +1,16 @@ +## Syntax highlighting for Java. + +syntax java "\.java$" +magic "Java " +comment "//" + +color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" +color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" +color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native)\>" +color cyan "\<(package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" +color red ""[^"]*"" +color yellow "\<(true|false|null)\>" +color blue "//.*" +color blue start="/\*" end="\*/" +color brightblue start="/\*\*" end="\*/" +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/javascript.nanorc b/nano/.config/nano/javascript.nanorc new file mode 100644 index 0000000..a84e6f6 --- /dev/null +++ b/nano/.config/nano/javascript.nanorc @@ -0,0 +1,27 @@ +## Syntax highlighting for Javascript. + +syntax javascript "\.(m?js|ts)$" +magic "JavaScript source" +comment "//" + +# Declarational stuff. +color green "\<(async|class|const|extends|function|let|this|typeof|var|void)\>" +# Flow control and special keywords. +color brightyellow "\<(do|while|if|else|switch|case|default|for|each|in|of|with)\>" +color brightyellow "\<(await|export|import|throw|try|catch|finally|new|delete)\>" +# "Exit" points. +color magenta "\<(break|continue|return|yield)\>" + +# Octal/decimal and hexadecimal numbers. +color cyan "\<([0-9]+|0x[[:xdigit:]]+)\>" +# Special values. +color cyan "\<(true|false|null|undefined)\>" + +# Strings. +color brightmagenta ""([^"\]|\\.)*"|'([^'\]|\\.)*'|`([^`\]|\\.)*`" +# Comments. +color brightblue "(^|[[:blank:]])//.*" +color brightblue start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/json.nanorc b/nano/.config/nano/json.nanorc new file mode 100644 index 0000000..cc65b22 --- /dev/null +++ b/nano/.config/nano/json.nanorc @@ -0,0 +1,32 @@ +## Syntax highlighting for JSON files. + +## Original author: Aapo Rantalainen +## License: GPL version 3 or newer + +syntax json "\.json$" +# No comments are permitted in JSON. +comment "" + +# Numbers (used as value). +color green ":[[:blank:]]*\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee]?[-+]?[0-9]+)?" +# Values (well, any string). +color brightmagenta "".+"" +# Hex numbers (used as value). +color green ":[[:blank:]]*"#[[:xdigit:]]+"" +# Escapes. +color green "\\(["\/bfnrt]|u[[:xdigit:]]{4})" +# Special words. +color green "\<(true|false|null)\>" + +# Names (very unlikely to contain a quote). +color brightblue ""[^"]+"[[:blank:]]*:" + +# Brackets, braces, and separators. +color brightblue "[][]" +color brightred "[{},:]" + +# Comments. +color cyan "(^|[[:blank:]]+)(//|#).*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/lua.nanorc b/nano/.config/nano/lua.nanorc new file mode 100644 index 0000000..32ed6b1 --- /dev/null +++ b/nano/.config/nano/lua.nanorc @@ -0,0 +1,66 @@ +## Syntax highlighting for Lua. + +## Original author: Matthew Wild +## License: GPL version 3 or newer + +syntax lua "\.lua$" +magic "Lua script" +comment "--" + +linter luacheck --no-color + +# Operators +color brightyellow "#|%|&|\*|\+|-|/|:|<|<=|==|>=|>|\^|\||~|~=|\.\.|\<(and|or|not)\>" +# Don't partially color ... as an operator +color normal "\.\.\." + +# Statements +color brightblue "\<(do|end|for|in|if|then|elseif|else|repeat|until|while|break|goto|return|function|global|local)\>" + +# Basic functions +color brightyellow "\<(assert|collectgarbage|dofile|error|(get|set)metatable|load(file)?|next|i?pairs|x?pcall|print|raw(equal|get|len|set)|require|select|tonumber|tostring|type|warn)[[:blank:]]*\(" + +# Standard library +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" + +# File handle methods +color brightyellow ":(close|flush|lines|read|seek|setvbuf|write)\>" + +# External files +color brightgreen "\<(dofile|require)\>" + +# Special words +color brightmagenta "\<(false|nil|true)\>" +color lime "(_G|_ENV|_VERSION)\>" + +# Decimal and hexadecimal numbers +color orange "\<[0-9]+(\.[0-9]*)?([Ee][+-]?[0-9]+)?\>" +color orange "\<0[Xx][[:xdigit:]]+(\.[[:xdigit:]]*)?([Pp][+-]?[0-9]+)?\>" + +# Brackets +color brightmagenta "\(|\)|\[|\]|\{|\}" + +# Shebang +color brightcyan "^#!.*" + +# Labels +color pink "::[[:alnum:]_]+::" + +# Strings +color orange ""([^"\]|\\.)*"|'([^'\]|\\.)*'" +color orange start="\[\[" end="\]\]" + +# Backslash escapes +color mauve "\\([abfnrtvz\"']|[0-9]{1,3}|x[[:xdigit:]]{2}|u\{[[:xdigit:]]{1,6}\})" + +# Simple comments and multiline comments +color green "--.*" +color green start="--\[\[" end="\]\]" diff --git a/nano/.config/nano/makefile.nanorc b/nano/.config/nano/makefile.nanorc new file mode 100644 index 0000000..aac6c71 --- /dev/null +++ b/nano/.config/nano/makefile.nanorc @@ -0,0 +1,26 @@ +## Syntax highlighting for Makefiles. + +syntax makefile "(^|/)((GNU)?m|M)akefile[^/]*$|\.(make|mk)$" +magic "makefile script" + +tabgives " " +comment "#" + +# Assignments. +color red " (:?:|\+|\?)?= " + +# Keywords. +color magenta "^(if|ifn?def|ifn?eq|else|endif|(-|s)?include)\>" +color magenta "^((override +)?(un)?define|endef|(un)?export|private|vpath)\>" + +# Variable expansions. +color blue "\$+[{(][[:alnum:]_-]+[})]" + +# Targets. +color brightblue "^[^ ].*:" + +# Comments. +color green "(^|[[:blank:]]+)#.*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/man.nanorc b/nano/.config/nano/man.nanorc new file mode 100644 index 0000000..6295c39 --- /dev/null +++ b/nano/.config/nano/man.nanorc @@ -0,0 +1,30 @@ +## Syntax highlighting for man pages. + +## Original author: Mike Frysinger +## License: GPL version 3 or newer + +syntax man "\.[1-9]x?$" +magic "troff or preprocessor input" +comment ".\"" + +# Section headers, title line, and paragraphs. +color green "^\.(SH|SS|TH) .*" +color brightgreen "^\.((SH|SS|TH) |[HIT]P|TQ|LP$|P?P$)" +# Type faces, and synopses. +color brightred "^\.(B[IR]?|I[BR]?|RB|RI|SB|SM|SY|OP) .*" +color brightblue "^\.((B[IR]?|I[BR]?|RB|RI|SB|SM|SY|OP) |YS$)" +# Inline type faces. +color magenta "\\f[BIPR]" +# Some escapes: +color purple "\\([%&:e~]|\(e[mn]|\[..\])" +# Hyphenation control. +color yellow "^\.(hc|hla|hlm|hw|hy)" +# Relative margins, hyperlinks, and various other stuff. +color yellow "^\.(RS|RE|UR|UE|MT|ME|EX|EE|PD|DT)" +color yellow "^\.(ad|bp|br|ce|de|ds|el|ie|if|fi|ft|ig|in|na|ne|nf|nh|ps|so|sp|ti|tr)" + +# Comments. +color cyan "(^\\#|(^\.)?\\").*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/markdown.nanorc b/nano/.config/nano/markdown.nanorc new file mode 100644 index 0000000..36682cc --- /dev/null +++ b/nano/.config/nano/markdown.nanorc @@ -0,0 +1,40 @@ +## Syntax highlighting for Markdown files. + +## Original authors: Ryan Westlund and Benno Schulenberg +## License: GPL version 3 or newer + +syntax markdown "\.md$" +comment "" + +# Quoted: +color magenta "^[ ]*>.*" + +# List-item markers: +color brightmagenta "^( | )* ? ? ?(\*|\+|-|[0-9]+\.)( +| )" + +# Emphasis and strong: +color green "\*[^* ][^*]*\*|_[^_ ][^_]*_" +color brightgreen "\*\*[^*]+\*\*|__[^_]+__" + +# Strikethrough: +color red "~~[^~]+~~" + +# Line breaks: +color ,blue " $" + +# URLs and links: +color brightblue "\[[^]]+\]\([^)]+\)" +color brightmagenta "!?\[[^]]+\]" + +# Code snippet, indented code, and fenced code: +color brightcyan "`[^`]+`" +color brightcyan "^( | )+ *([^*+0-9> -]|[*+-]\S|[0-9][^.]).*" +color brightcyan start="```" end="```$" + +# Headings and the underlining of headings: +color brightyellow "^#.*" +color brightyellow "^(=+|-+)$" + +# HTML tags and comments: +color cyan "<[^>]+>" +color cyan start="" diff --git a/nano/.config/nano/nanohelp.nanorc b/nano/.config/nano/nanohelp.nanorc new file mode 100644 index 0000000..5cbffdc --- /dev/null +++ b/nano/.config/nano/nanohelp.nanorc @@ -0,0 +1,17 @@ +## This is meant for highlighting key combos in a nano help text. + +# It should not apply to any normal file, so no fileregex. +syntax nanohelp + +# Key combos: +color cyan "\^[]/4-8@[:upper:]\^_`◂▸▴▾-]|[◂▸▴▾]|\<(M|S[Hh]-[Mm])-[^")”»“」]|\" + +# Colorize M-) and M-" only when between parentheses... +color cyan "\(M-(\)|")\)" +color normal " \(|\) " +# ...or when at start of line. +color cyan "^M-(\)|")" + +# Quoted indicators: +color brightred "'(\^|M-)'" diff --git a/nano/.config/nano/nanorc.nanorc b/nano/.config/nano/nanorc.nanorc new file mode 100644 index 0000000..1daef03 --- /dev/null +++ b/nano/.config/nano/nanorc.nanorc @@ -0,0 +1,50 @@ +## Syntax highlighting for nanorc files. + +syntax nanorc "[/.]nanorc(\.in)?$" +comment "#" + +# Everything that does not get recolored is invalid +color brightred ".*" + +# Color names +color yellow "^[[:blank:]]*(i?color|set[[:blank:]]+(error|function|key|mini|number|prompt|scroller|selected|spotlight|status|stripe|title)color)[[:blank:]]+(bold,)?(italic,)?((bright|light)?(white|black|red|blue|green|yellow|magenta|cyan)|normal|pink|purple|mauve|lagoon|mint|lime|peach|orange|latte|rosy|beet|plum|sea|sky|slate|teal|sage|brown|ocher|sand|tawny|brick|crimson|grey|gray|#[[:xdigit:]]{3})?(,((light)?(white|black|red|blue|green|yellow|magenta|cyan)|normal|pink|purple|mauve|lagoon|mint|lime|peach|orange|latte|rosy|beet|plum|sea|sky|slate|teal|sage|brown|ocher|sand|tawny|brick|crimson|grey|gray|#[[:xdigit:]]{3}))?\>" + +# The arguments of two special commands +color bold,purple "^[[:blank:]]*include[[:blank:]]+[^[:blank:]"]+" +color lime "^[[:blank:]]*extendsyntax[[:blank:]]+[[:alpha:]]+[[:blank:]]+(i?color|header|magic|comment|formatter|linter|tabgives)[[:blank:]]+.*" + +# The arguments of commands +color brightgreen "^[[:blank:]]*(set|unset)[[:blank:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|boldtext|bookstyle|breaklonglines|casesensitive|colonparsing|constantshow|cutfromcursor|emptyline|historylog|indicator|jumpyscrolling|linenumbers|locking|magic|minibar|mouse|(new|multi)buffer|noconvert|nohelp|nonewlines|positionlog|preserve|quickblank|rawsequences|rebinddelete|regexp|saveonexit|showcursor|smarthome|softwrap|solosidescroll|stateflags|tabstospaces|trimblanks|unix|whitespacedisplay|wordbounds|zap|zero)\>" +color brightgreen "^[[:blank:]]*set[[:blank:]]+(backupdir|brackets|errorcolor|functioncolor|keycolor|matchbrackets|minicolor|numbercolor|operatingdir|promptcolor|punct|quotestr|scrollercolor|selectedcolor|speller|spotlightcolor|statuscolor|stripecolor|titlecolor|whitespace|wordchars)[[:blank:]]+" +color brightgreen "^[[:blank:]]*set[[:blank:]]+(fill[[:blank:]]+-?[[:digit:]]+|(guidestripe|tabsize)[[:blank:]]+[1-9][0-9]*)\>" +color brightgreen "^[[:blank:]]*bind[[:blank:]]+((\^([[:alpha:]]|[]/@\^_`-]|Space)|([Ss][Hh]-)?[Mm]-[[:alpha:]]|[Mm]-([][!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space|Left|Right|Up|Down|Ins|Del))|F([1-9]|1[0-9]|2[0-4])|Ins|Del)[[:blank:]]+([[:lower:]]+|".*")[[:blank:]]+(main|help|search|replace(with)?|yesno|gotoline|writeout|insert|execute|browser|whereisfile|gotodir|spell|linter|all)\>" +color brightgreen "^[[:blank:]]*unbind[[:blank:]]+((\^([[:alpha:]]|[]/@\^_`-]|Space)|([Ss][Hh]-)?[Mm]-[[:alpha:]]|[Mm]-([][!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space|Left|Right|Up|Down|Ins|Del))|F([1-9]|1[0-9]|2[0-4])|Ins|Del)[[:blank:]]+(main|help|search|replace(with)?|yesno|gotoline|writeout|insert|execute|browser|whereisfile|gotodir|spell|linter|all)\>" +color brightgreen "^[[:blank:]]*extendsyntax[[:blank:]]+[[:alpha:]]+[[:blank:]]+" +color brightgreen "^[[:blank:]]*(syntax[[:blank:]]+[^[:space:]]+|(formatter|linter)[[:blank:]]+.+)" + +# Strings +color brightmagenta "[[:blank:]](start=)?".+"" + +# Function names in string binds +color crimson "\{(help|cancel|exit|savefile|writeout|discardbuffer|insert|where(is|was)|find(previous|next|bracket)|replace)\}" +color crimson "\{(cut|copy|paste|zap|chopword(left|right)|cutrestoffile|execute|mark|speller|linter|formatter|(full)?justify)\}" +color crimson "\{(location|gotoline|(begin|end)para|comment|complete|(un)?indent|wordcount|(record|run)macro|anchor|undo|redo)\}" +color crimson "\{(left|right|up|down|home|end|scroll(left|right|up|down)|page(up|down)|(top|bottom)row|center|cycle|(prev|next)(word|block|anchor|buf))\}" +color crimson "\{(tab|enter|delete|backspace|verbatim|refresh|suspend|casesens|regexp|backwards|older|newer|(dos|mac)format)\}" +color crimson "\{(append|prepend|backup|flip(replace|execute|pipe|convert|newbuffer)|browser|gotodir|(first|last)(file|line))\}" +color crimson "\{(nohelp|constantshow|softwrap|linenumbers|whitespacedisplay|nosyntax|zero)\}" +color crimson "\{(smarthome|autoindent|cutfromcursor|breaklonglines|tabstospaces|mouse|\{|\})\}" + +# Commands +color green "^[[:blank:]]*((un)?(bind|set)|include|syntax|header|magic|comment|formatter|linter|tabgives|extendsyntax)\>" +color magenta "^[[:blank:]]*i?color\>|[[:blank:]](start=|end=)" + +# Control codes +color bold,pink "[[:cntrl:]]" + +# Comments +color brightblue "^[[:blank:]]*#.*|[[:blank:]]#.{0,2}[^[:xdigit:]].*" +color cyan "^[[:blank:]]*##.*" + +# Trailing whitespace +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/nftables.nanorc b/nano/.config/nano/nftables.nanorc new file mode 100644 index 0000000..2870ac6 --- /dev/null +++ b/nano/.config/nano/nftables.nanorc @@ -0,0 +1,35 @@ +## Syntax highlighting for the packet-filtering rules of Netfilter. + +## Original author: Arturo Borrero González +## License: GPL version 3 or newer + +syntax nftables "\.(nft|nftables)$" +header "^#!.*(nft|nftables)" +comment "#" + +# Objects and operations +color green "\<(chain|hook|policy|priority|ruleset|set|table|type|v?map)\>" +color green "\<(define|include)\>" +color red "\<(add|delete|flush|insert|remove|replace)\>" + +# Families +color yellow "\<(arp|bridge|inet|ingress|ip6?|netdev)\>" + +# Terminal statements +color red "\<(drop|reject)\>" +color brightblue "\<(accept|continue|(d|s)nat|goto|jump|masquerade|return)\>" + +# Comments +color cyan "(^|[[:blank:]])#.*" + +# Trailing whitespace +color ,green "[[:space:]]+$" + +# Strings +color yellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'" + +# Syntactic symbols +color green "[][{}():;|`$<>!=&\]" + +# Basic variable names +color brightred "(\$|@)[[:alpha:]_-][[:alnum:]_.-]*" diff --git a/nano/.config/nano/nix.nanorc b/nano/.config/nano/nix.nanorc new file mode 100644 index 0000000..da98b15 --- /dev/null +++ b/nano/.config/nano/nix.nanorc @@ -0,0 +1,60 @@ +syntax "nix" "\.nix$" + +#numbers & bools +color brightmagenta "( |=|:|\[|\(|,)[0-9]+(;| |\]|\)|$|,)" +#color magenta "[ |=|:][ ]*[0-9]+$" +color brightmagenta " [0-9]+ " +color brightmagenta "( )(true|false|null)(;| |\]|\)|$)" + +#colorize lib.functions +color magenta "(^| |\(|[|{|}|]|\))(fixMergeModules|mapAttrsRecursiveCond|removePrefix|add|fixedPoints|mapAttrsToList|removeSuffix|addContextFrom|fixedWidthNumber|mapDerivationAttrset|replaceChars|addErrorContext|fixedWidthString|mapNullable|replaceStrings|addErrorContextToAttrs|fixupOptionType|matchAttrs|reverseList|addMetaAttrs|flatten|max|runTests|all|flip|maybeAttr|scrubOptionValue|and|fold|maybeAttrNullable|seq|any|foldArgs|maybeEnv|setAttr|appendToName|foldAttrs|mergeAttrBy|setAttrByPath|applyIfFunction|foldl|mergeAttrByFunc|setAttrMerge|attrByPath|foldl'|mergeAttrs|setFunctionArgs|attrNames|foldr|mergeAttrsByFuncDefaults|setName|attrNamesToStr|fullDepEntry|mergeAttrsByFuncDefaultsClean|setType|attrVals|functionArgs|mergeAttrsConcatenateValues|showFiles|attrValues|genAttrs|mergeAttrsNoOverride|showOption|attrsets|genList|mergeAttrsWithFunc|showVal|bitAnd|generators|mergeDefaultOption|singleton|bitNot|genericClosure|mergeDefinitions|sort|bitOr|getAttr|mergeEqualOption|sortProperties|bitXor|getAttrFromPath|mergeModules|sourceByRegex|boolToString|getBin|mergeModules'|sourceFilesBySuffices|callPackageWith|getDev|mergeOneOption|sources|callPackagesWith|getFiles|mergeOptionDecls|splitByAndCompare|canCleanSource|getLib|meta|splitString|catAttrs|getOutput|min|stringAfter|checkFlag|getValue|misc|stringAsChars|checkReqs|getValues|mkAfter|stringLength|chooseDevOutputs|getVersion|mkAliasAndWrapDefinitions|stringToCharacters|cleanSource|groupBy|mkAliasDefinitions|strings|cleanSourceFilter|groupBy'|mkAliasOptionModule|stringsWithDeps|cleanSourceWith|hasAttr|mkAssert|sub|closeModules|hasAttrByPath|mkBefore|sublist|closePropagation|hasPrefix|mkChangedOptionModule|substring|collect|hasSuffix|mkDefault|subtractLists|commitIdFromGitRepo|head|mkEnableOption|systems|compare|hiPrio|mkFixStrictness|tail|compareLists|hiPrioSet|mkForce|take|composeExtensions|hydraJob|mkIf|testAllTrue|composedArgsAndFun|id|mkMerge|textClosureList|concat|ifEnable|mkMergedOptionModule|textClosureMap|concatImapStrings|imap|mkOption|toDerivation|concatImapStringsSep|imap0|mkOptionDefault|toInt|concatLists|imap1|mkOptionType|toList|concatMap|importJSON|mkOrder|toLower|concatMapStrings|inNixShell|mkOverride|toUpper|concatMapStringsSep|info|mkRemovedOptionModule|toposort|concatStrings|init|mkRenamedOptionModule|traceCall|concatStringsSep|innerClosePropagation|mkSinkUndeclaredOptions|traceCall2|condConcat|innerModifySumArgs|mkStrict|traceCall3|const|intersectLists|mkVMOverride|traceCallXml|count|intersperse|mod|traceIf|crossLists|isAttrs|modifySumArgs|traceSeq|customisation|isBool|modules|traceSeqN|debug|isDerivation|mutuallyExclusive|traceShowVal|deepSeq|isFunction|nameFromURL|traceShowValMarked|defaultFunctor|isInt|nameValuePair|traceVal|defaultMerge|isList|naturalSort|traceValFn|defaultMergeArg|isOption|nixType|traceValIfNot|defaultOverridableDelayableArgs|isOptionType|nixpkgsVersion|traceValSeq|defaultTypeMerge|isStorePath|noDepEntry|traceValSeqFn|dischargeProperties|isString|nvs|traceValSeqN|doRename|isType|optionAttrSetToDocList|traceValSeqNFn|dontDistribute|last|optionAttrSetToDocList'|traceXMLVal|drop|lazyGenericClosure|optional|traceXMLValMarked|elem|length|optionalAttrs|trivial|elemAt|lessThan|optionalString|types|enableFeature|licenses|optionals|unifyModuleSyntax|enableFeatureAs|listDfs|options|uniqList|escape|listToAttrs|or|uniqListExt|escapeShellArg|lists|overridableDelayableArgs|unique|escapeShellArgs|literalExample|overrideDerivation|unknownModule|evalModules|lowPrio|overrideExisting|unpackSubmodule|evalOptionValue|lowPrioSet|packEntry|updateName|extend|lowerChars|packSubmodule|upperChars|extendDerivation|maintainers|partition|version|extends|makeBinPath|pathExists|versionAtLeast|fetchers|makeExtensible|pathHasContext|versionOlder|fileContents|makeExtensibleWithCustomName|pathIsDirectory|versions|filesystem|makeLibraryPath|pathType|warn|filter|makeOverridable|platforms|withFeature|filterAttrs|makePerlPath|prepareDerivationArgs|withFeatureAs|filterAttrsRecursive|makeScope|pushDownProperties|zip|filterModules|makeSearchPath|range|zipAttrs|filterOverrides|makeSearchPathOutput|readFile|zipAttrsWith|findFirst|mapAttrs|readPathsFromFile|zipAttrsWithNames|findSingle|mapAttrs'|recursiveUpdate|zipLists|fix|mapAttrsFlatten|recursiveUpdateUntil|zipListsWith|fix'|mapAttrsRecursive|remove|zipWithNames)( |$)" + +#colorize builtins.functions +color magenta "(^| |\(|[|{|}|]|\))(abort|functionArgs|pathExists|add|genList|placeholder|addErrorContext|genericClosure|readDir|all|getAttr|readFile|any|getEnv|removeAttrs|attrNames|hasAttr|replaceStrings|attrValues|hasContext|scopedImport|baseNameOf|hashString|seq|head|sort|catAttrs|import|split|compareVersions|intersectAttrs|splitVersion|concatLists|isAttrs|storeDir|concatStringsSep|isBool|storePath|currentSystem|isFloat|stringLength|currentTime|isFunction|sub|deepSeq|isInt|substring|derivation|isList|tail|derivationStrict|isNull|throw|dirOf|isString|toFile|div|langVersion|toJSON|elem|length|toPath|elemAt|lessThan|toString|false|listToAttrs|toXML|fetchGit|map|trace|fetchMercurial|match|true|fetchTarball|mul|tryEval|fetchurl|nixPath|typeOf|filter|nixVersion|unsafeDiscardOutputDependency|filterSource|null|unsafeDiscardStringContext|findFile|parseDrvName|unsafeGetAttrPos|foldl'|partition|valueSize|fromJSON|path)( |$)" + +#nix stuff +color green "=|;|}|\." +color green "(abort|import|inherit|with|or|rec|assert)( |$)" +#nix strings +color yellow "\"|'" + +#Url +icolor yellow " url =.*" +icolor yellow "homepage =.*" + +#Make atributenames grey +color white ".* =( |$)" + +#bashstuff +icolor brightgreen "^[0-9A-Z_]+\(\)" +color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>" +color green "\<(declare|eval|exec|export|let|local)\>" +color green "[{}():;|`$<>!=&\\?]" "(\]|\[)" +color green "\+\+" +color green "-[Ldefgruwx]\>" +color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" +color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|echo|env|grep|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|umask|unset)\>( |$)" + +#Strings. +color yellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" + +icolor yellow start="description =[ ]*''" end="'';" +icolor yellow start="description =[ ]*$" end="'';" +icolor white "description =" + +#embedet nixstuff +color brightred "\$\{[^\}]*\}" + +# Bash basic variable names (no braces). +color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*" + +# Bash more complicated variable names; handles braces and replacements and arrays. +color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:space:]]*[[:alnum:]_]+[[:space:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})" + +# Comments. +color cyan "(^|[[:space:]])#.*$" +color cyan start="(^|[[:space:]])/\*" end="\*/" + +# Trailing whitespace. +color green "[[:space:]]+$" + diff --git a/nano/.config/nano/objc.nanorc b/nano/.config/nano/objc.nanorc new file mode 100644 index 0000000..536e942 --- /dev/null +++ b/nano/.config/nano/objc.nanorc @@ -0,0 +1,41 @@ +## Syntax highlighting for C/C++/Obj-C files. + +## Original author: Dave Geering + +syntax m "\.m$" +magic "Objective-C source" +comment "//" + +# Stuffs. +color brightwhite "\<[[:upper:]_][[:upper:][:digit:]_]+\>" +color green "\<(float|double|BOOL|bool|char|int|short|long|id|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" +color green "\<[[:alpha:]_][[:alnum:]_]*_t\>" +color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" +color brightgreen "\<(for|if|while|do|else|case|default|switch)\>" +color brightgreen "\<(try|throw|catch|operator|new|delete)\>" +color brightgreen "\<(goto|continue|break|return)\>" +color brightgreen "@(encode|end|implementation|interface)|selector)\>" + +# GCC builtins. +color cyan "__attribute__[[:blank:]]*\(\([^)]*\)\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" + +# Selector/method. +color brightmagenta "(^|[[:blank:]])\[.*[[:blank:]].*\]" +color white ":[[:alnum:]]*" +color magenta "[[:alnum:]]*:" +color white "\[[^][:blank:]]*\]" + +# Strings. +color brightblack "'([^'\]|\\(["'\abfnrtv]|x[[:xdigit:]]{1,2}|[0-3]?[0-7]{1,2}))'" +color brightblack "<[^= ]*>|"([^"\]|\\.)*"" +color brightblue "@"([^"\]|\\.)*"" + +# Preprocessor commands. +color brightblue "^[[:blank:]]*#[[:blank:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error)" + +# Comments. +color yellow "//.*" +color yellow start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/ocaml.nanorc b/nano/.config/nano/ocaml.nanorc new file mode 100644 index 0000000..b555689 --- /dev/null +++ b/nano/.config/nano/ocaml.nanorc @@ -0,0 +1,30 @@ +## Syntax highlighting for OCaml. + +syntax ocaml "\.mli?$" +magic "OCaml" +comment "(*|*)" + +# Uid: +color red "\<[[:upper:]][[:lower:][:digit:]_]{2,}\>" +# Declarations: +color green "\<(let|val|method|in|and|rec|private|virtual|constraint)\>" +# Structure items: +color red "\<(type|open|class|module|exception|external)\>" +# Patterns: +color blue "\<(fun|function|functor|match|try|with)\>" +# Pattern modifiers: +color yellow "\<(as|when|of)\>" +# Conditions: +color cyan "\<(if|then|else)\>" +# Blocks: +color magenta "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>" +# Constants: +color green "\<(true|false)\>" +# Modules/classes: +color green "\<(include|inherit|initializer)\>" +# Expression modifiers: +color yellow "\<(new|ref|mutable|lazy|assert|raise)\>" +# Comments: +color white start="\(\*" end="\*\)" +# Strings: +color brightblack ""[^"\]*"" diff --git a/nano/.config/nano/octave.nanorc b/nano/.config/nano/octave.nanorc new file mode 100644 index 0000000..fe108af --- /dev/null +++ b/nano/.config/nano/octave.nanorc @@ -0,0 +1,32 @@ +## Syntax highlighting for Octave files. + +## Copied from https://savannah.gnu.org/patch/?6798. + +## Original author: Wang Jun +## License: GPLv3 or newer + +syntax octave "\.m$" + +# Some operators +color brightred "\+|-|\*|/|[|]|\(|\)|\{|\}|=|;|\." + +# Numbers +color brightyellow "\<(([0-9]*)(\.[0-9]*)?([Ee][-+]?[0-9]+)?)\>" + +# Keywords +color brightblue "\<(function|endfunction|switch|case|endswitch|otherwise|unwind_protect|unwind_protect_cleanup|end_unwind_protect|try|catch|end_try_catch|end|if|else|elseif|endif|break|continue|for|endfor|return|do|until|while|endwhile|global|nargin|nargout|assert)\>" + +# Strings +color brightyellow ""(\\"|[^"])*"" "'([^'])*'" + +# Comments +color brightgreen "[#%].*" + +# Newline escape +color brightgreen "\.{3,}[[:space:]]*$" + +# Reminders +color brightwhite,yellow "(FIXME|TODO|XXX)" + +# Trailing whitespace +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/patch.nanorc b/nano/.config/nano/patch.nanorc new file mode 100644 index 0000000..c70d0ea --- /dev/null +++ b/nano/.config/nano/patch.nanorc @@ -0,0 +1,29 @@ +## Syntax highlighting for patch and diff files. + +## Original author: Mike Frysinger +## License: GPL version 3 or newer + +syntax patch "\.(patch|diff|debdiff|rej)$" +magic "diff output" +# There is no official support for comments in patch files. +comment "" + +# Added lines. +color brightgreen "^\+.*" +# Show trailing whitespace only on added lines. +color ,green "[[:space:]]+$" +# Context lines. +color brightblue "^ .*" +# Deleted lines. +color brightred "^-.*" + +# Header lines. +color magenta "^(Index:|diff)[[:blank:]].*" +# File names and dates. +color red "^---.*" +color green "^\+\+\+.*" +# Line numbers. +color brightyellow "^@@.*" + +# Statistics. +color cyan start="^---$" end="^$" diff --git a/nano/.config/nano/perl.nanorc b/nano/.config/nano/perl.nanorc new file mode 100644 index 0000000..6594a60 --- /dev/null +++ b/nano/.config/nano/perl.nanorc @@ -0,0 +1,38 @@ +## Syntax highlighting for Perl. + +syntax perl "\.p[lm]$" +header "^#!.*perl" +magic "Perl script" +comment "#" + +# Functions. +color red "\<(abs|accept|alarm|atan2|bin(d|mode)|bless|caller|ch(dir|mod|op|omp|own|r|root)|close(dir)?|connect|cos|crypt)\>" +color red "\<(dbm(close|open)|defined|delete|dump|each|eof|eval(bytes)?|exec|exists|exp|fc|fcntl|fileno|flock|fork|format|formline)\>" +color red "\<(get(c|login|peername|pgrp|ppid|priority|(gr|pw)nam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport))\>" +color red "\<(([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|glob|gmtime|grep|hex|import|index|int|ioctl|join)\>" +color red "\<(keys|kill|lc|lcfirst|length|link|listen|local(time)?|lock|log|lstat|map|mkdir|msg(ctl|get|snd|rcv)|oct)\>" +color red "\<(open(dir)?|ord|pack|pipe|pop|pos|printf?|prototype|push|q|qq|qr|qx|qw|quotemeta|rand|read(dir|line|link|pipe)?)\>" +color red "\<(recv|redo|ref|rename|require|reset|reverse|rewinddir|rindex|rmdir|say|scalar|seek(dir)?|select|sem(ctl|get|op))\>" +color red "\<(send|set(pgrp|priority|sockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|splice|split)\>" +color red "\<(sprintf|sqrt|srand|state?|study|substr|symlink|sys(call|open|read|seek|tem|write)|tell(dir)?|tied?|times?|try?)\>" +color red "\<(truncate|uc|ucfirst|umask|un(def|link|pack|shift|tie)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>" + +# Control flow, logical operators, declarations. +color magenta "\<(continue|die|do|else|elsif|exit|for(each)?|fork|goto|if|last|next|return|unless|until|while)\>" +color magenta "\<(and|cmp|eq|ge|gt|isa|le|lt|ne|not|or|x|xor)\>" +color magenta "\<(my|no|our|package|sub|use)\>" + +# Variable names. +color cyan "[$%&@]([[:alpha:]_][[:alnum:]_]*|\^[][[:upper:]?\^_]|[[:digit:]]+)\>" +color cyan "[$%&@]\{(\^?[[:alpha:]_][[:alnum:]_]*|\^[][?\^][[:digit:]]+)\}" +color cyan "[$%&@]([][!"#'()*+,.:;<=>?`|~-]|\{[][!-/:-@\`|~]\})|\$[$%&@]" +color cyan "(^|[[:blank:]])[$%@][/\]" + +# Strings. +color yellow "".*"|qq\|.*\|" + +color white "[smy]/.*/" +color white start="(^use| = new)" end=";" + +# Comments. +color green "(^|[[:blank:]])#.*" diff --git a/nano/.config/nano/php.nanorc b/nano/.config/nano/php.nanorc new file mode 100644 index 0000000..7a25f64 --- /dev/null +++ b/nano/.config/nano/php.nanorc @@ -0,0 +1,38 @@ +## Syntax highlighting for PHP. + +## Original author: Mike Frysinger +## License: GPL version 3 or newer + +syntax php "\.(php[23457s~]?|phtml|ctp)$" +magic "PHP script" +comment "//" + +# PHP markings. +color brightgreen "(<\?(php|=)?|\?>)" + +# Function names. +color white "\<[[:alpha:]_][[:alnum:]_]*\(" +# Variable names. +color cyan "\$[[:alpha:]_][[:alnum:]_]*" + +# Types. +color green "\<(array|bool|callable|const|float|global|int|object|string|var)\>" + +# Directives and structure. +color brightcyan "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>" +color brightcyan "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>" +# Operators. +color brightcyan "\<(and|or|xor)\>" + +# Control flow. +color magenta "\<(break|continue|goto|return)\>" + +# Strings. +color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'" + +# Comments. +color brightblue "(^|[[:blank:]]+)//.*" +color brightblue start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/po.nanorc b/nano/.config/nano/po.nanorc new file mode 100644 index 0000000..d93013f --- /dev/null +++ b/nano/.config/nano/po.nanorc @@ -0,0 +1,39 @@ +## Syntax highlighting for PO files. + +## Original author: Benno Schulenberg +## License: GPL version 3 or newer + +syntax po "\.pot?$" +comment "#" + +# Comments. +color green "^#.*" +color yellow "Copyright|\(C\)" +# Header fields. +color brightred "^"X-Bugs:.*"$" +color brightmagenta "\<(Project-Id-Version|Report-Msgid-Bugs-To|Last-Translator|Language(-Team)?|X-Bugs|X-Generator|Plural-Forms)\>" +color cyan "\<(POT-Creation-Date|PO-Revision-Date|MIME-Version|Content-Type|Content-Transfer-Encoding)\>" +# Encodings and numbers. +color yellow "\<(UTF|ISO|Windows|Mac|IBM)-[0-9]+" +color yellow "\<((pre|rc)?[0-9]+|[0-9]bit)\>" +# Main keywords. +color brightblue "^(msgid|msgid_plural|msgstr)\>" +# Flags. +color red " fuzzy(,|$)" +color yellow " (no-)?([[:lower:]-]+|c\+\+)-format(,|$)" +# Format specifiers. +color brightmagenta "%([1-9]\$)?[#0 +'I-]?(\*([1-9]\$)?|[0-9]\.?|[0-9]?\.[0-9])?(hh|ll|[hlLjzt])?([diouxXbBeEfFgGaAcspnmr]|)|%%" +color rosy "%\([[:alpha:]][[:alnum:]_]*\)([0-9]\.?|[0-9]?\.[0-9])?[#0 +-]?[diouxXbBeEfFgGcrs]" +# Quotes and escaped characters. +color yellow """ +color cyan "\\([abcefnrtv"\]|x[[:xdigit:]]{2}|[0-7]{3})" +# Context. +color slate "^msgctxt.*" +# Reminders. +color brightwhite,yellow "\<(FIXME|TODO|XXX)\>" +# Obsolete strings. +color red "^#~.*" +# Stray control codes. +color bold,pink,red "[[:cntrl:]]" +# Tabs. +color mint "[[:blank:]]" diff --git a/nano/.config/nano/povray.nanorc b/nano/.config/nano/povray.nanorc new file mode 100644 index 0000000..cee06e0 --- /dev/null +++ b/nano/.config/nano/povray.nanorc @@ -0,0 +1,18 @@ +## Syntax highlighting for POV-Ray files. + +## Original author: Donnie Berkholz + +syntax pov "\.(pov|POV|povray|POVRAY)$" +comment "//" + +color brightcyan "^[[:space:]]*#[[:space:]]*(declare)" +color brightyellow "\<(sphere|cylinder|translate|matrix|rotate|scale)\>" +color brightyellow "\<(orthographic|location|up|right|direction|clipped_by)\>" +color brightyellow "\<(fog_type|fog_offset|fog_alt|rgb|distance|transform)\>" +color brightred "\<(background|camera|fog|light_source|object|texture)\>" +color green "\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|" +color brightmagenta "\<(union|group|subgroup)\>" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" diff --git a/nano/.config/nano/puppet.nanorc b/nano/.config/nano/puppet.nanorc new file mode 100644 index 0000000..40912a4 --- /dev/null +++ b/nano/.config/nano/puppet.nanorc @@ -0,0 +1,60 @@ +## Syntax highlighting for Puppet manifests. + +## Copied from https://savannah.gnu.org/patch/?8660. + +## Original author: Leo Arnold +## License: Public domain + +syntax puppet "\.pp$" + +# Functions +color magenta "\<[a-z0-9]+\>\([^\(\)]*\)" +color white "\(|\)" +# Operators +color brightwhite "[<>|?~=+-]+" +# Numbers +color cyan "\<[0-9]+\>" + +# Ruby classes +color cyan "\<[A-Z][a-z_]*\>" +# Ruby regular expressions +color green "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*" +# Ruby symbols +color magenta "\s:[a-z_]+\>" + +# Puppet facts +color cyan "\$[a-z_]+(::[a-z_]+)*" +# Puppet resources +color yellow "^[[:space:]]*(@@)?\<[a-z_]*(::[a-z_]+)*\>[[:space:]]*\{" +color yellow "(define|include|require)[[:space:]]+\<[a-z0-9_-]*(::[a-z_]+)*\>" +# Puppet keywords +color brightwhite "\<(and|case|class|define|else|elsif|if|import|in|include|node|or|require|unless|when)\>" +color cyan "[^:]\<(true|false)\>" +# Puppet type attributes +color white "\<[a-z]+\>[[:space:]]*=>" +# Metaparameters +color cyan "\<(alias|audit|before|loglevel|noop|notify|require|schedule|stage|subscribe|tag)\>[[:space:]]*=>" +# Hash rockets +color brightwhite "=>" + +# Color resets +color normal "\[" "\]" "\{" "\}" "::" "," + +# Shell command expansion is in `backticks` or like %x{this} +color brightblue "`[^`]*`" "%x\{[^}]*\}" + +# Strings, double-quoted +color red ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" +# Expression substitution -- these go inside double-quoted strings "like ${this}" +color brightred "\$\{[^}]*\}" +# Strings, single-quoted +color red "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" + +# Comments +color green start="(^|[^A-Za-z])/\*" end="\*/" +color green "(^|[[:space:]]+)#.*$" +color brightgreen "(^|[[:space:]]+)##.*$" +# Some common markers +color brightred "(TODO|FIXME|\?\?\?)" +# Trailing spaces +color ,red "[[:space:]]+$" diff --git a/nano/.config/nano/python.nanorc b/nano/.config/nano/python.nanorc new file mode 100644 index 0000000..c2011ee --- /dev/null +++ b/nano/.config/nano/python.nanorc @@ -0,0 +1,47 @@ +## Syntax highlighting for Python. + +syntax python "\.py$" +header "^#!.*python" +magic "Python script" +comment "#" + +# Alternative linter: pylint --exit-zero +linter pyflakes + +# Function definitions. +color brightblue "def [[:alnum:]_]+" +# Keywords. +color brightcyan "\<(and|as|assert|async|await|break|case|class|continue|def|del)\>" +color brightcyan "\<(elif|else|except|finally|for|from|global|if|import|in|is)\>" +color brightcyan "\<(lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\>" +# In Python 2 `print` and `exec` are keywords, but they are functions in Python 3, +# so only color these words when they are followed by whitespace, assuming that +# `print (x)` is a statement and `print(x)` a function call. +color brightcyan "\<(exec|print)([[:blank:]]|$)" +# Avoid coloring "match" in a call of re.match(). +color brightcyan "\" + +# Decorators. +color cyan "@[[:alpha:]_][[:alnum:]_.]*" + +# Mono-quoted strings. +color brightgreen "'([^'\]|\\.)*'|"([^"\]|\\.)*"|'''|"""" +color normal "'''|"""" +# Comments. +color brightred "(^|[[:blank:]])#.*" +# Triple-quoted strings. +color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''" +color brightgreen start=""""([^"),]|$)" end="(^|[^(\])"""" + +# Backslash escapes. +color lime "\\($|[\'"abfnrtv]|[0-3]?[0-7]?[0-7]|x[[:xdigit:]]{2})" +color lime "\\(N\{[[:alpha:]]+\}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})" + +# Reminders. +color brightwhite,yellow "\<(FIXME|TODO|XXX)\>" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/ruby.nanorc b/nano/.config/nano/ruby.nanorc new file mode 100644 index 0000000..87310a3 --- /dev/null +++ b/nano/.config/nano/ruby.nanorc @@ -0,0 +1,40 @@ +## Syntax highlighting for Ruby. + +## Original author: John M. Gabriele + +syntax ruby "\.rb$" +header "^#!.*ruby" +magic "Ruby script" +comment "#" + +linter ruby -w -c + +# Constants. +color brightblue "\<[[:upper:]]+[[:alnum:]_]*|(\$|@|@@)[[:alnum:]_]+" +# Reserved words. +color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module)\>" +color yellow "\<(next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>" +# Ruby "symbols". +color magenta "([ ]|^):[[:alnum:]_]+\>" +# Some unique things we want to stand out. +color brightyellow "\<(__FILE__|__LINE__)\>" + +# Regular expressions. +color brightmagenta "(/([^/]|\\/)*/|%r\{([^}]|\\\})*\})[iomx]*" +# Shell command expansion is in `backticks` or like %x{this}. +color brightblue "`[^`]*`|%x\{[^}]*\}" + +# Strings, double-quoted. +color green ""([^"]|\\")*"|%[QW]?(\{[^}]*\}|\([^)]*\)|<[^>]*>|\[[^]]*\]|\$[^$]*\$|\^[^^]*\^|![^!]*!)" +# Expression substitution for inside double-quoted strings, "like #{this}". +color brightgreen "#\{[^}]*\}" +# Strings, single-quoted. +color green "'([^']|\\')*'|%[qw](\{[^}]*\}|\([^)]*\)|<[^>]*>|\[[^]]*\]|\$[^$]*\$|\^[^^]*\^|![^!]*!)" + +# Comments. +color cyan "#([^{#].*|$)" +color brightcyan "##([^{].*|$)" +color cyan start="^=begin\>" end="^=end\>" + +# Some common markers. +color brightcyan "XXX|TODO|FIXME|\?\?\?" diff --git a/nano/.config/nano/rust.nanorc b/nano/.config/nano/rust.nanorc new file mode 100644 index 0000000..5b319db --- /dev/null +++ b/nano/.config/nano/rust.nanorc @@ -0,0 +1,38 @@ +## Syntax highlighting for Rust. + +## Copyright 2015 Luke Francl. +## Licensed under GPL version 3 or newer. + +syntax rust "\.(rlib|rs)$" +comment "//" + +# Function definitions +color magenta "fn [[:lower:][:digit:]_]+" + +# Reserved words +color yellow "\<(abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|true|try|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\>" + +# Macros +color red "[[:lower:]_]+!" + +# Constants +color magenta "[[:upper:]][[:upper:][:digit:]_]+" + +# Traits/Enums/Structs/Types/... +color magenta "[[:upper:]][[:alnum:]]+" + +# Strings +color green ""([^"]|\\")*"" +color green start=""([^"]|\\")*\\$" end="(^|.*[^\])"" +## Inaccurate, but it's not possible to balance the number of hashes. +color green start="r#+"" end=""#+" + +# Comments +color blue "//.*" +color blue start="/\*" end="\*/" + +# Attributes +color magenta start="#!\[" end="\]" + +# Some common markers +color brightcyan "XXX|TODO|FIXME|\?\?\?" diff --git a/nano/.config/nano/sh.nanorc b/nano/.config/nano/sh.nanorc new file mode 100644 index 0000000..e566746 --- /dev/null +++ b/nano/.config/nano/sh.nanorc @@ -0,0 +1,42 @@ +## Syntax highlighting for Bourne shell scripts. + +## Original author: Mike Frysinger +## License: GPL version 3 or newer + +syntax sh "(\.sh|(^|/|\.)(a|ba|c|da|k|mk|pdk|tc|z)sh(rc|_profile)?|(/etc/|(^|/)\.)profile)$" +header "^#!.*/(((env|busybox)[[:blank:]]+)?(a|ba|c|da|k|mk|pdk|tc|z)?sh|openrc-run|runscript)\>" +header "-\*-.*shell-script.*-\*-" +magic "(POSIX|Bourne-Again) shell script.*text" +comment "#" + +linter dash -n + +# Function declarations. +color brightgreen "^[[:alnum:]_-]+\(\)" + +# Keywords, symbols, and comparisons. +color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>" +color green "\<(declare|eval|exec|export|let|local)\>" +color green "[][{}():;|`$<>!=&\]" +color green "-(eq|ne|gt|lt|ge|le|ef|ot|nt)\>" + +# Short and long options. +color brightmagenta "[[:blank:]](-[[:alpha:]]|--\<[[:alpha:]-]+)\>" + +# Common commands. +color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|cut|echo|env|grep|head|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|sort|tail|tar|touch|umask|unset)\>" +color normal "[.-]tar\>" + +# Basic variable names (no braces). +color brightred "\$([-@*#?$![:digit:]]|[[:alpha:]_][[:alnum:]_]*)" +# More complicated variable names; handles braces and replacements and arrays. +color brightred "\$\{[#!]?([-@*#?$!]|[[:digit:]]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:blank:]]*[[:alnum:]_]+[[:blank:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})" + +# Comments. +color cyan "(^|[[:blank:]])#.*" + +# Strings. +color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/spec.nanorc b/nano/.config/nano/spec.nanorc new file mode 100644 index 0000000..b7da194 --- /dev/null +++ b/nano/.config/nano/spec.nanorc @@ -0,0 +1,45 @@ +## Syntax highlighting for RPM spec files. + +## Original author: Asterios Dramis + +syntax spec "\.spec(\.[^/]+)?$" +comment "#" + +# Main tags. +color brightblue "\<(Name|Version|Release|Summary|Group|URL|Url|Epoch|Icon|Serial)[[:space:]]*:" +color brightblue "\<(BuildArch(itectures)?|Exclusive(Arch|OS)|Exclude(Arch|OS))[[:space:]]*:" +color brightblue "\<(Provides|Requires(\(.*\))?|Obsoletes|Conflicts|Recommends|Suggests|Supplements|Enhances|PreReq)[[:space:]]*:" +color brightblue "\<(BuildRoot|BuildRequires|BuildConflicts|Prefix|RemovePathPostfixes)[[:space:]]*:" +color brightblue "\<(AutoReq|AutoProv|AutoReqProv)[[:space:]]*:" +color brightblue "\<(License|Copyright|Distribution|Vendor|Packager)[[:space:]]*:" +color brightblue "\<((Source|Patch)[0-9]*|Nosource|Nopatch)[[:space:]]*:" +# Architectures. +color brightred "\<((a|loong)arch64|alpha(ev(56?|67?)|pca56)?|amd64|armv(3l|4b|4l|5t(ej?)?l|6h?l|7(hn?)?l|8h?l)|athlon|em64t|geode|i370|i(3|4|5|6)86|ia32e|ia64|m68k(mint)?|mips(64)?(el|r6|r6el)?)\>" +color brightred "\<(pentium(3|4)|ppc(32dy4|8260|8560)?|ppc64(le|p7)?|ppc(64)?(i|p)series|riscv64|rs6000|s390x?|sgi|sh(3|4|4a)?|sparc(64v?|v8|v9v?)?|x86_64(_v2|_v3|_v4)?|xtensa)\>" + +# Architecture and OS conditionals. +color brightred "%(ifarch|elifarch|ifnarch|ifos|elifos|ifnos)\>" +# %* strings. +color green "%([A-Z_a-z_0-9_]*)" +color magenta "%_([A-Z_a-z_0-9_]*)" +color yellow start="%__" end="\ " +color magenta start="%\{" end="\}" +color yellow start="%\{__" end="\}" +# Sections. +color red "^%((prep|build|install|check|clean)$|(description|files|package|changelog)\>)" +color red "^%((pre|post)(trans|un)?|trigger(prein|in|un|postun)?)\>" +color red "^%(trans)?filetrigger(in|un|postun)\>" +color red "^%(sourcelist|patchlist|generate_buildrequires|verifyscript)\>" +# Conditionals and defines. +color brightred "%(if|elif|else|endif|define|global|undefine)\>" + +# Comments. +color cyan "(#|%dnl[[:space:]]).*" +# Special case: "# norootforbuild" is handled as main tag. +color brightblue "^# norootforbuild" +# For %changelog entries: first the author, then just the date. +color yellow "^\* .+>" +color brightyellow "^\* [[:alnum:] ]+ [0-9]{4} " + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/sql.nanorc b/nano/.config/nano/sql.nanorc new file mode 100644 index 0000000..2cadf67 --- /dev/null +++ b/nano/.config/nano/sql.nanorc @@ -0,0 +1,53 @@ +## Syntax highlighting for (Postgres) SQL scripts. + +## Original author: Devrim Gündüz + +syntax sql "\.sql$" +comment "-- " + +# Types. +icolor #0a4 "\<(integer|int[248]|(big|small)?(int|serial)|decimal|numeric|real|double precision)\>" +icolor #0a4 "\<(bit( varying)?|boolean|bytea|enum|money|tsquery|tsvector|uuid|xml)\>" +icolor #0a4 "\<(char|varchar|character( varying)?|text|cidr|inet|macaddr8?)\>" +icolor #0a4 "\<(date|interval|time(stamp)?( with(out)? time zone)?)\>" +icolor #0a4 "\<(box|circle|line|lseg|path|point|polygon)\>" +icolor #0a4 "\<(date|int[48]|num|ts|tstz)range\>" + +# SQL keywords. +icolor #48c "\<(ABORT|AGGREGATE|ALL|ALTER|ANALYZE|AND|ANY|AS|BEGIN|BETWEEN|CAST|CHECKPOINT)\>" +icolor #48c "\<(CLOSE|CLUSTER|COLLATION|COMMENT|COMMIT|CONSTRAINTS?|CONVERSION|COPY|CREATE)\>" +icolor #48c "\<(DATABASE|DEALLOCATE|DECLARE|DEFAULT|DELETE|DISCARD|DISTINCT|DO|DOMAIN|DROP)\>" +icolor #48c "\<(END|EXCEPT|EXECUTE|EXISTS|EXPLAIN|EXTENSION|FALSE|FETCH|FOREIGN (DATA WRAPPER|SCHEMA|TABLE))\>" +icolor #48c "\<(FROM|FUNCTION|GRANT|GROUP( BY)?|HAVING|IN|INDEX|INSERT|INTERSECT|INTO|IS)\>" +icolor #48c "\<(NATURAL )?(INNER |OUTER |CROSS |(LEFT|RIGHT|FULL)( OUTER)? )?JOIN\>" +icolor #48c "\<((PRIMARY|FOREIGN) KEY|LANGUAGE|LOAD|LIKE|LOCK|MOVE|NOT|NOTIFY|NULL)\>" +icolor #48c "\<(ON|ONLY|OPERATOR( CLASS| FAMILY)?|OR|ORDER BY|PREPARED?|PRIVILEGES|PROCEDURE)\>" +icolor #48c "\<(REFERENCES|RELEASE|REPLACE|RESET|RETURN(S|ING)|REVOKE|ROLE|ROLLBACK|RULE|SAVEPOINT|SCHEMA)\>" +icolor #48c "\<(SELECT|SEQUENCE|SERVER|SESSION AUTHORIZATION|SET|SHOW|SIMILAR|START|SYSTEM)\>" +icolor #48c "\<(TABLE(SPACE)?|TEXT SEARCH (CONFIGURATION|DICTIONARY|PARSER|TEMPLATE))\>" +icolor #48c "\<(TO|TRANSACTION|(EVENT )?TRIGGER|TRUE|TRUNCATE|TYPE|UNION|UNIQUE|UPDATE|USER( MAPPING)?|USING)\>" +icolor #48c "\<(VACUUM|VALUES|((REFRESH )?MATERIALIZED )?VIEW|WHERE|WITH)\>" + +# Flow control. +icolor #cc0 "\<(CASE|WHEN|IF|THEN|ELSE|ELSE?IF|LOOP|CONTINUE|EXIT)\>" +icolor #cc0 "\<(FOR|FOREACH|IN|WHILE|END (CASE|IF|LOOP))\>" +icolor #a4a "\<(RAISE|EXCEPTION|NOTICE|RETURN)\>" + +# Quoted identifiers. +color normal ""[[:alpha:]_][[:alnum:]_$]*"" + +# Strings. +color #4c0 "'([^']|\\')*'" + +# Trailing whitespace. +color ,green "[[:space:]]+$" + +# Comments. +color italic,#c44 "(--|//).*" +color italic,#c44 start="/\*" end="\*/" + +# PostgreSQL default schemas. +color grey "\<(pg_catalog|public)\>" + +# PostgreSQL PLs. +color #c08 "\<(SQL|pl(java|perlu?|pgsql|py|pythonu?|r|ruby|scheme|sh|tcl))\>" diff --git a/nano/.config/nano/systemverilog.nanorc b/nano/.config/nano/systemverilog.nanorc new file mode 100644 index 0000000..c3207ee --- /dev/null +++ b/nano/.config/nano/systemverilog.nanorc @@ -0,0 +1,157 @@ +## Syntax highlighting for SystemVerilog files. + +## Copied from https://savannah.gnu.org/patch/?10015. + +## Original author: Jorge Juan-Chico +## License: Public domain + +## Based on IEEE Std 1800-2017 + +# Note: if used with plain Verilog it will also highlight SystemVerilog-only +# keywords, system tasks and compiler directives that are not part of the plain +# Verilog Standard (IEEE Std 1364-2005). In any case, it is good advise not to +# use SystemVerilog keywords in new Verilog code since Verilog is not a separate +# standard anymore. + +syntax systemverilog "\.[sS][vV][hH]?$" +comment "//" + +# Regular keywords. +# (keywords in (System)Verilog may be escaped with "\") +color green "([^\\]\<|^)(accept_on|alias|always|always_comb)\>" +color green "([^\\]\<|^)(always_ff|always_latch|and|assert|assign)\>" +color green "([^\\]\<|^)(assume|automatic|before|begin|bind|bins)\>" +color green "([^\\]\<|^)(binsof|break|buf|bufif0|bufif1|case|casex)\>" +color green "([^\\]\<|^)(casez|cell|checker|class|clocking|cmos)\>" +color green "([^\\]\<|^)(config|constraint|context|continue|cover)\>" +color green "([^\\]\<|^)(covergroup|coverpoint|cross|deassign|default)\>" +color green "([^\\]\<|^)(defparam|design|disable|dist|do|edge|else)\>" +color green "([^\\]\<|^)(end|endcase|endchecker|endclass|endclocking)\>" +color green "([^\\]\<|^)(endconfig|endfunction|endgenerate|endgroup)\>" +color green "([^\\]\<|^)(endinterface|endmodule|endpackage)\>" +color green "([^\\]\<|^)(endprimitive|endprogram|endproperty)\>" +color green "([^\\]\<|^)(endspecify|endsequence|endtable|endtask)\>" +color green "([^\\]\<|^)(eventually|expect|export|extends|extern|final)\>" +color green "([^\\]\<|^)(first_match|for|force|foreach|forever|fork)\>" +color green "([^\\]\<|^)(forkjoin|function|generate|genvar|global)\>" +color green "([^\\]\<|^)(highz0|highz1|if|iff|ifnone|ignore_bins)\>" +color green "([^\\]\<|^)(illegal_bins|implements|implies|import|incdir)\>" +color green "([^\\]\<|^)(include|initial|inout|input|inside|instance)\>" +color green "([^\\]\<|^)(interconnect|interface|intersect|join)\>" +color green "([^\\]\<|^)(join_any|join_none|large|let|liblist|library)\>" +color green "([^\\]\<|^)(local|localparam|macromodule|matches|medium)\>" +color green "([^\\]\<|^)(modport|module|nand|negedge|nettype|new)\>" +color green "([^\\]\<|^)(nexttime|nmos|nor|noshowcancelled|not|notif0)\>" +color green "([^\\]\<|^)(notif1|null|or|output|package|packed)\>" +color green "([^\\]\<|^)(parameter|pmos|posedge|primitive|priority)\>" +color green "([^\\]\<|^)(program|property|protected|pull0|pull1)\>" +color green "([^\\]\<|^)(pulldown|pullup|pulsestyle_ondetect)\>" +color green "([^\\]\<|^)(pulsestyle_onevent|pure|rand|randc|randcase)\>" +color green "([^\\]\<|^)(randsequence|rcmos|ref|reject_on|release|repeat)\>" +color green "([^\\]\<|^)(restrict|return|rnmos|rpmos|rtran|rtranif0)\>" +color green "([^\\]\<|^)(rtranif1|s_always|s_eventually|s_nexttime)\>" +color green "([^\\]\<|^)(s_until|s_until_with|scalared|sequence)\>" +color green "([^\\]\<|^)(showcancelled|small|soft|solve|specify)\>" +color green "([^\\]\<|^)(specparam|static|strong|strong0|strong1)\>" +color green "([^\\]\<|^)(struct|super|sync_accept_on|sync_reject_on)\>" +color green "([^\\]\<|^)(table|tagged|task|this|throughout)\>" +color green "([^\\]\<|^)(timeprecision|timeunit|tran|tranif0|tranif1)\>" +color green "([^\\]\<|^)(type|typedef|union|unique|unique0|until)\>" +color green "([^\\]\<|^)(until_with|untyped|use|vectored|virtual|wait)\>" +color green "([^\\]\<|^)(wait_order|weak|weak0|weak1|while|wildcard)\>" +color green "([^\\]\<|^)(with|within|xnor|xor)\>" + +# Built-in net type keywords. +color brightgreen "([^\\]\<|^)(supply0|supply1|tri|tri0|tri1|triand)\>" +color brightgreen "([^\\]\<|^)(trior|trireg|uwire|wand|wire|wor)\>" + +# Built-in var type keywords. +color brightgreen "([^\\]\<|^)(bit|byte|chandle|const|enum|event|int)\>" +color brightgreen "([^\\]\<|^)(integer|logic|longint|real|realtime|reg)\>" +color brightgreen "([^\\]\<|^)(shortint|shortreal|signed|string|time)\>" +color brightgreen "([^\\]\<|^)(unsigned|var|void)\>" + +# Numbers. +color brightmagenta "(\<[0-9]*|\B)\s*'[sS]?[dD]\s*[0-9_]+\>" +color brightmagenta "(\<[0-9]*|\B)\s*'[sS]?[bB]\s*[0-1_xXzZ?]+\>" +color brightmagenta "(\<[0-9]*|\B)\s*'[sS]?[oO]\s*[0-7_xXzZ?]+\>" +color brightmagenta "(\<[0-9]*|\B)\s*'[sS]?[hH]\s*[0-9a-fA-F_xXzZ?]+\>" +color brightmagenta "\<[0-9][0-9_]*(\.[0-9][0-9_]*)?([eE]-?[0-9][0-9_]*)?\>" +color brightmagenta "\B'[01xXzZ]\>" + +# Operator characters. +color cyan "[][~&|^>" + +# Standard system tasks and functions. +color cyan "\B\$(acos|acosh|asin|asinh|assertcontrol|assertfailoff)\>" +color cyan "\B\$(assertfailon|assertkill|assertnonvacuouson|assertoff)\>" +color cyan "\B\$(asserton|assertpassoff|assertpasson|assertvacuousoff)\>" +color cyan "\B\$(async\$and\$array|async\$and\$plane)\>" +color cyan "\B\$(async\$nand\$array|async\$nand\$plane)\>" +color cyan "\B\$(async\$nor\$array|async\$nor\$plane|async\$or\$array)\>" +color cyan "\B\$(async\$or\$plane|atan|atan2|atanh|bits|bitstoreal)\>" +color cyan "\B\$(bitstoshortreal|cast|ceil|changed_gclk|changed)\>" +color cyan "\B\$(changing_gclk|clog2|cos|cosh|countbits|countones)\>" +color cyan "\B\$(coverage_control|coverage_get_max|coverage_get)\>" +color cyan "\B\$(coverage_merge|coverage_save|dimensions|display)\>" +color cyan "\B\$(displayb|displayh|displayo|dist_chi_square)\>" +color cyan "\B\$(dist_erlang|dist_exponential|dist_normal)\>" +color cyan "\B\$(dist_poisson|dist_t|dist_uniform|dumpall|dumpfile)\>" +color cyan "\B\$(dumpflush|dumplimit|dumpoff|dumpon|dumpports)\>" +color cyan "\B\$(dumpportsall|dumpportsflush|dumpportslimitdumpportsoff)\>" +color cyan "\B\$(dumpportson|dumpvars|error|error|exit|exp|falling_gclk)\>" +color cyan "\B\$(fatal|fatal|fclose|fdisplay|fdisplayb|fdisplayh)\>" +color cyan "\B\$(fdisplayo|fell_gclk|fell|feof|ferror|fflush|fgetc|fgets)\>" +color cyan "\B\$(finish|floor|fmonitor|fmonitorb|fmonitorh|fmonitoro)\>" +color cyan "\B\$(fopen|fread|fscanf|fseek|fstrobe|fstrobeb|fstrobeh)\>" +color cyan "\B\$(fstrobeo|ftell|future_gclk|fwrite|fwriteb|fwriteh)\>" +color cyan "\B\$(fwriteo|get_coverage|high|hypot|increment|info|info)\>" +color cyan "\B\$(isunbounded|isunknown|itor|left|ln|load_coverage_db)\>" +color cyan "\B\$(log10|low|monitor|monitorb|monitorh|monitoro|monitoroff)\>" +color cyan "\B\$(monitoron|onehot|onehot0|past_gclk|past|pow)\>" +color cyan "\B\$(printtimescale|q_add|q_exam|q_full|q_initialize)\>" +color cyan "\B\$(q_remove|random|readmemb|readmemh|realtime|realtobits)\>" +color cyan "\B\$(rewind|right|rising_gclk|rose_gclk|rose|rtoi|sampled)\>" +color cyan "\B\$(set_coverage_db_name|sformat|sformatf|shortrealtobits)\>" +color cyan "\B\$(signed|sin|sinh|size|sqrt|sscanf|stable_gclk|stable)\>" +color cyan "\B\$(steady_gclk|stime|stop|strobe|strobeb|strobeh|strobeo)\>" +color cyan "\B\$(swrite|swriteb|swriteh|swriteo|sync\$and\$array)\>" +color cyan "\B\$(sync\$and\$plane|sync\$nand\$array|sync\$nand\$plane)\>" +color cyan "\B\$(sync\$nor\$array|sync\$nor\$plane|sync\$or\$array)\>" +color cyan "\B\$(sync\$or\$plane|systemtan|tanh|test\$plusargs|time)\>" +color cyan "\B\$(timeformat|typename|ungetc|unpacked_dimensions)\>" +color cyan "\B\$(unsigned|value\$plusargs|warning|write|writeb|writeh)\>" +color cyan "\B\$(writememb|writememh|writeo)\>" + +# Macros. +color brightmagenta "\B`[A-Za-z_][0-9A-Za-z_]*\>" + +# Strings. +# SystemVerilog strings can span multiple lines by using a "\" at the end of the +# line. Here we allow strings to span multiple lines regardless of an "\" at EOL. +color brightyellow start=""" end="([^"]|\\")*"" + +# Generic compiler directives. +# (we want these after macros) +color brightcyan "^[[:space:]]*`[A-Za-z_][0-9A-Za-z_]*\>" + +# Standard compiler directives. +color cyan "^[[:space:]]*`(__FILE__|__LINE__|begin_keywords|celldefine)\>" +color cyan "^[[:space:]]*`(default_nettype|define|else|elsif)\>" +color cyan "^[[:space:]]*`(end_keywords|endcelldefine|endif|ifdef)\>" +color cyan "^[[:space:]]*`(ifndef|include|line|nounconnected_drive)\>" +color cyan "^[[:space:]]*`(pragma|resetall|timescale|unconnected_drive)\>" +color cyan "^[[:space:]]*`(undef|undefineall)\>" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# Reminders. +color brightwhite,yellow "\<(FIXME|TODO|XXX)\>" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/tcl.nanorc b/nano/.config/nano/tcl.nanorc new file mode 100644 index 0000000..e91f53b --- /dev/null +++ b/nano/.config/nano/tcl.nanorc @@ -0,0 +1,41 @@ +## Syntax highlighting for Tcl and Expect scripts. + +## Original author: Mike Frysinger +## License: GPL version 3 or newer + +syntax tcl "\.(tcl|exp)$" +magic "Tcl(/Tk)? script" +comment "#" + +# Standard Tcl [info commands]: +color green "\<(after|append|array|auto_(execok|import|load(_index)?|qualify)|binary|break)\>" +color green "\<(case|catch|cd|clock|close|concat|continue|encoding|eof|error|eval|exec|exit|expr)\>" +color green "\<(fblocked|fconfigure|fcopy|file(event)?|flush|for|foreach|format|gets|glob|global|history)\>" +color green "\<(if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort)\>" +color green "\<(namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return)\>" +color green "\<(scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace)\>" +color green "\<(unknown|unset|update|uplevel|upvar|variable|vwait|while)\>" + +# Basic Tcl subcommands: +color green "\" +color green "\" + +# Extended TclX [info commands]: +color green "\<(alarm|auto_load_pkg|bsearch|cat(close|gets|open)|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot)\>" +color green "\<(cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl)\>" +color green "\<(fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyl(del|get|keys|set)|kill)\>" +color green "\<(lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvar(cat|pop|push)|max|min|nice)\>" +color green "\<(pipe|profile|random|readdir|replicate|scan(context|file|match)|select|server_(accept|create)|signal)\>" +color green "\<(sleep|sync|system|tclx_(findinit|fork|load_tndxs|sleep|system|wait)|times|translit|try_eval|umask|wait)\>" + +# Syntax: +color green "[!$&();<=>\`|]" +color brightblue "\" +color sage "\<(0x[[:xdigit:]][[:xdigit:]_]*|0o[0-7][0-7_]*|0b[01][01_]*|[+-]?\<(inf|nan))\>" +color lime "\<(true|false)\>" + +# Keys +color sky "^[[:blank:]]*[^="[:blank:]][^=]*" + +# Strings +color latte ""([^"]|\\.)*"|'([^']|\\.)*'" +color latte start="\"\"\"" end="\"\"\"" +color latte start="'''" end="'''" + +# Table headers +color orange "^[[:blank:]]*(\[[^][]+\]|\[\[[^][]+\]\])" + +# Comments +color italic,cyan "(^|[[:blank:]])#.*" + +# Trailing whitespace +color ,red "[[:space:]]+$" diff --git a/nano/.config/nano/verilog.nanorc b/nano/.config/nano/verilog.nanorc new file mode 100644 index 0000000..3f2979e --- /dev/null +++ b/nano/.config/nano/verilog.nanorc @@ -0,0 +1,111 @@ +## Syntax highlighting for Verilog files. + +## Copied from https://savannah.gnu.org/patch/?10015. + +## Original author: Jorge Juan-Chico +## License: Public domain + +## Based on IEEE Std 1364-2005 + +syntax verilog "\.[vV][hH]?$" +comment "//" + +# Regular keywords. +# (keywords in (System)Verilog may be escaped with "\") +color green "([^\\]\<|^)(always|and|assign|automatic|begin|buf)\>" +color green "([^\\]\<|^)(bufif0|bufif1|case|casex|casez|cell|cmos)\>" +color green "([^\\]\<|^)(config|deassign|default|defparam|design)\>" +color green "([^\\]\<|^)(disable|edge|else|end|endcase|endconfig)\>" +color green "([^\\]\<|^)(endfunction|endgenerate|endmodule)\>" +color green "([^\\]\<|^)(endprimitive|endspecify|endtable|endtask)\>" +color green "([^\\]\<|^)(event|for|force|forever|fork|function)\>" +color green "([^\\]\<|^)(generate|genvar|highz0|highz1|if|ifnone)\>" +color green "([^\\]\<|^)(incdir|include|initial|inout|input|instance)\>" +color green "([^\\]\<|^)(join|large|liblist|library|localparam)\>" +color green "([^\\]\<|^)(macromodule|medium|module|nand|negedge|nmos)\>" +color green "([^\\]\<|^)(nor|noshowcancelled|not|notif0|notif1|or)\>" +color green "([^\\]\<|^)(output|parameter|pmos|posedge|primitive)\>" +color green "([^\\]\<|^)(pull0|pull1|pulldown|pullup)\>" +color green "([^\\]\<|^)(pulsestyle_ondetect|pulsestyle_onevent)\>" +color green "([^\\]\<|^)(rcmos|release|repeat|rnmos|rpmos|rtran)\>" +color green "([^\\]\<|^)(rtranif0|rtranif1|scalared|showcancelled)\>" +color green "([^\\]\<|^)(small|specify|specparam|strong0|strong1)\>" +color green "([^\\]\<|^)(table|task|tran|tranif0|tranif1|use)\>" +color green "([^\\]\<|^)(vectored|wait|weak0|weak1|while|xnor|xor)\>" + +# Built-in net type keywords. +color brightgreen "([^\\]\<|^)(supply0|supply1|tri|tri0|tri1|triand)\>" +color brightgreen "([^\\]\<|^)(trior|trireg|uwire|wand|wire|wor)\>" + +# Built-in var type keywords. +color brightgreen "([^\\]\<|^)(event|integer|real|realtime|reg|signed)\>" +color brightgreen "([^\\]\<|^)(time|unsigned)\>" + +# Numbers. +color brightmagenta "(\<[0-9]*|\B)\s*'[sS]?[dD]\s*[0-9_]+\>" +color brightmagenta "(\<[0-9]*|\B)\s*'[sS]?[bB]\s*[0-1_xXzZ?]+\>" +color brightmagenta "(\<[0-9]*|\B)\s*'[sS]?[oO]\s*[0-7_xXzZ?]+\>" +color brightmagenta "(\<[0-9]*|\B)\s*'[sS]?[hH]\s*[0-9a-fA-F_xXzZ?]+\>" +color brightmagenta "\<[0-9][0-9_]*(\.[0-9][0-9_]*)?([eE]-?[0-9][0-9_]*)?\>" +color brightmagenta "\B'[01xXzZ]\>" + +# Operator characters. +color cyan "[][~&|^>" + +# Standard system tasks and functions. +color cyan "\B\$(acos|acosh|asin|asinh|async\$and\$array)\>" +color cyan "\B\$(async\$and\$plane|async\$nand\$array)\>" +color cyan "\B\$(async\$nand\$plane|async\$nor\$array)\>" +color cyan "\B\$(async\$nor\$plane|async\$or\$array|async\$or\$plane)\>" +color cyan "\B\$(atan|atan2|atanh|bitstoreal|ceil|clog2|cos|cosh)\>" +color cyan "\B\$(display|displayb|displayh|displayo|dist_chi_square)\>" +color cyan "\B\$(dist_erlang|dist_exponential|dist_normal)\>" +color cyan "\B\$(dist_poisson|dist_t|dist_uniform|exp|fclose)\>" +color cyan "\B\$(fdisplay|fdisplayb|fdisplayh|fdisplayo|feof|ferror)\>" +color cyan "\B\$(fflush|fgetc|fgets|finish|floor|fmonitor|fmonitorb)\>" +color cyan "\B\$(fmonitorh|fmonitoro|fopen|fread|fscanf|fseek)\>" +color cyan "\B\$(fstrobe|fstrobeb|fstrobeh|fstrobeo|ftell|fwrite)\>" +color cyan "\B\$(fwriteb|fwriteh|fwriteo|hypot|itor|ln|log10)\>" +color cyan "\B\$(monitor|monitorb|monitorh|monitoro|monitoroff)\>" +color cyan "\B\$(monitoron|pow|printtimescale|q_add|q_exam|q_full)\>" +color cyan "\B\$(q_initialize|q_remove|random|readmemb|readmemh)\>" +color cyan "\B\$(realtime|realtobits|rewind|rtoi|sdf_annotate)\>" +color cyan "\B\$(sformat|signed|sin|sinh|sqrt|sscanf|stime|stop)\>" +color cyan "\B\$(strobe|strobeb|strobeh|strobeo|swrite|swriteb)\>" +color cyan "\B\$(swriteh|swriteo|sync\$and\$array|sync\$and\$plane)\>" +color cyan "\B\$(sync\$nand\$array|sync\$nand\$plane|sync\$nor\$array)\>" +color cyan "\B\$(sync\$nor\$plane|sync\$or\$array|sync\$or\$plane)\>" +color cyan "\B\$(tan|tanh|test\$plusargs|time|timeformat|ungetc)\>" +color cyan "\B\$(unsigned|value\$plusargs|write|writeb|writeh|writeo)\>" + +# Macros. +color brightmagenta "\B`[A-Za-z_][0-9A-Za-z_]*\>" + +# Strings. +# SystemVerilog strings can span multiple lines by using a "\" at the end of the +# line. Here we allow strings to span multiple lines regardless of an "\" at EOL. +color brightyellow start=""" end="([^"]|\\")*"" + +# Generic compiler directives. +# (we want these after macros) +color brightcyan "^[[:space:]]*`[A-Za-z_][0-9A-Za-z_]*\>" + +# Standard compiler directives. +color cyan "^[[:space:]]*`(begin_keywords|celldefine|default_nettype)\>" +color cyan "^[[:space:]]*`(define|else|elsif|end_keywords)\>" +color cyan "^[[:space:]]*`(endcelldefine|endif|ifdef|ifndef|include)\>" +color cyan "^[[:space:]]*`(line|nounconnected_drive|pragma|resetall)\>" +color cyan "^[[:space:]]*`(timescale|unconnected_drive|undef)\>" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# Reminders. +color brightwhite,yellow "\<(FIXME|TODO|XXX)\>" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/nano/.config/nano/xml.nanorc b/nano/.config/nano/xml.nanorc new file mode 100644 index 0000000..f8ad350 --- /dev/null +++ b/nano/.config/nano/xml.nanorc @@ -0,0 +1,28 @@ +## Syntax highlighting for XML files. + +## Original author: Josef Schugt + +syntax xml "\.([jrsx]html?|jnlp|mml|pom|rng|sgml?|svg|w[as]dl|wsdd|xjb|xml|xs(d|lt?)|xul)$" +header "<\?xml.*version=.*\?>" +magic "(XML|SGML) (sub)?document" +comment "" + +# First the entire content of the tag (for the attributes): +color green start="<" end=">" + +# The angled brackets and the name of the tag: +color cyan "<[^> ]+|/?>" + +# The strings inside the tag: +color magenta ""[^"]*"" + +# Prolog stuff: +color #888 "<\?.+\?>|]+>|\]>" +color #888 start="]*$" end="^[^<]*>" + +# Comments: +color yellow start="" + +# Entities (custom and predefined): +color pink "&[^; ]+;" +color red "&(amp|apos|gt|lt|quot);" diff --git a/nano/.config/nano/yaml.nanorc b/nano/.config/nano/yaml.nanorc new file mode 100644 index 0000000..d696508 --- /dev/null +++ b/nano/.config/nano/yaml.nanorc @@ -0,0 +1,47 @@ +## Syntax highlighting for YAML files. + +## Original author: Benno Schulenberg +## License: GPL version 3 or newer + +syntax yaml "\.ya?ml$" +header "^%YAML |^---( |$)" + +tabgives " " +comment "#" + +# Keys: +color lightgreen "(\w|::|[/.-])+:( |$)" +color lightgreen "\[(\w|::|[/., -])+\]:( |$)" + +# Values (booleans, numbers, octal/hex): +color lightmagenta "[:,] +(Y(es)?|No?|y(es)?|no?|[Tt]rue|[Ff]alse|[Oo](n|ff))( *[]}]|, | +#|$)" +color lightmagenta "[:,] +[+-]?[0-9]+(\.([0-9]+)?)?( *[]}]|, | +#|$)" +color lightmagenta " 0(o[0-7]+|x[[:xdigit:]]+)( *[]}]|, | +#|$)" +color normal "[:,]( |$)" +# Values (dates, strings): +color lightmagenta " [12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])" +color lightmagenta "("([^"]|\\")+"|'[^']+')" + +# Anchors and aliases: +color pink " [&*](\w|-)+( |$)" + +# Symbols: +color bold,lagoon "^(%YAML +[1-9]\.[0-9]$|%TAG |(---|\.\.\.)( |$))" +color bold,lagoon " [|>]([1-9]?[+-]|[+-][1-9]?)?$" +color bold,yellow "^ *(\?|([?:] +)?-) " +color yellow "[]{}[]" +color normal "^ *: " + +# Tags: +color mint " !!(binary|bool|float|int|map|null|omap|seq|set|str)( |,|$)" +color mint " ![^! ][^ ]*( |$)" + +# Escaped characters: +color orange "\\([0abefnrtv"/ \_NLP]|$)" +color orange "\\(x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})" + +# Mistakes (control codes, trailing space): +color ,red "[[:cntrl:]]| +$" + +# Comments: +color italic,cyan "(^| )#.*" diff --git a/nano/.nanorc b/nano/.nanorc new file mode 100644 index 0000000..9051180 --- /dev/null +++ b/nano/.nanorc @@ -0,0 +1,80 @@ +# load syntax highlighting files +include "~/.config/nano/*.nanorc" + +# nano preferences (alphabetical) +set atblanks +set autoindent +set casesensitive +set constantshow +set cutfromcursor +set jumpyscrolling +set keycolor normal,normal +set minibar +set mouse +set newbuffer +set nohelp +set numbercolor italic,lightblack,normal +set promptcolor black,lightyellow +set stateflags +set smarthome +set softwrap +set tabsize 4 +set tabstospaces +set trimblanks + +# search keybinds: editor +unbind ^S main +bind ^S whereis main +bind Sh-M-F findnext main +bind Sh-M-B findprevious main + +# search keybinds: file browser +unbind ^S browser +bind ^S whereis browser +bind Sh-M-F findnext browser +bind Sh-M-B findprevious browser + +# text copying (killing) from editor +unbind M-K main +bind M-K copy main +bind Sh-M-K cutfromcursor main + +# copy from editor into system (Wayland) clipboard +bind Sh-M-C "{execute}| wl-copy > /dev/null 2>&1 {enter}{exit}n" main + +# insert lambda into editor +unbind ^\ main +bind ^\ "λ" main + +# redo keybind +bind Sh-M-U redo main + +# editor cursor navigation by block +unbind M-A main +unbind M-E main +bind M-A beginpara main +bind M-E endpara main +bind M-( beginpara main +bind M-) endpara main + +# text marking keybind +bind ^Space mark main + +# center/raise/lower cursor position in editor +unbind ^L main +bind ^L cycle main + +# editor cursor navigation by word boundaries (a la Emacs) +bind M-F nextword main +bind M-B prevword main + +# editor cursor navigation horizontally +bind ^F forward main +bind ^B back main +bind ^F forward browser +bind ^B back browser + +# editor buffer navigation +bind M-< prevbuf main +bind M-> nextbuf main + diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf new file mode 100644 index 0000000..42adbd3 --- /dev/null +++ b/tmux/.config/tmux/tmux.conf @@ -0,0 +1,21 @@ +set -g default-terminal "tmux-256color" +set -g base-index 1 +setw -g pane-base-index 1 + +set -g status-keys vi +set -g mode-keys vi + +set -g mouse off +set -g focus-events off +setw -g aggressive-resize off +setw -g clock-mode-style 24 +set -s escape-time 10 +set -g history-limit 2000 + +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on +set-option -g status-right "\"#W\"" +set -ga terminal-overrides ",*:RGB" +set -g mouse on +set -g set-clipboard on