emergency update

This commit is contained in:
Muha Aliss 2023-11-15 12:57:11 +03:00
parent eea5cd4488
commit e3b198c932
176 changed files with 6089 additions and 0 deletions

0
LICENSE Normal file → Executable file
View file

62
bash_aliases Executable file
View file

@ -0,0 +1,62 @@
# DNF alias
alias upd="sudo dnf update"
alias ins="sudo dnf install"
alias rmv="sudo dnf remove"
alias ser="dnf search"
# History alias
cl () {
FILE=$HOME/.bash_history
if [ -f "$FILE" ]; then
rm $FILE
clear
history -cw
else
clear
history -cw
fi
}
# Emacs no gui
alias emacs="emacs -nw $argv"
alias e="emacs -nw $argv"
# Quick way to get out of current directory
alias cd..='cd ..'
alias ..="cd .."
alias ...="cd ../../../"
alias ....="cd ../../../../"
alias .....="cd ../../../../"
alias .4="cd ../../../../"
alias .5="cd ../../../../.."
# Colorize the grep command output for ease of use (good for log files)
alias grep="grep --color=auto"
# Make mount command output pretty and human readable format
alias mount="mount |column -t"
# Stop after sending count ECHO_REQUEST packets
alias ping="ping -c 5"
# Displays the size of each item, and then sorts it by size, in a single column, with a notation to indicate the kind of file
alias lt='ls --human-readable --size -1 -S --classify'
# Copy progress bar
alias cpv='rsync -ah --info=progress2'

100
emacs.d/bookmarks Executable file
View file

@ -0,0 +1,100 @@
;;;; Emacs Bookmark Format Version 1;;;; -*- coding: utf-8-emacs; mode: lisp-data -*-
;;; This format is meant to be slightly human-readable;
;;; nevertheless, you probably don't want to edit it.
;;; -*- End Of Bookmark File Format Version Stamp -*-
(("Projeler -> Projeler dizini"
(filename . "~/Projeler/")
(front-context-string . "my-dot-files\n d")
(rear-context-string . "60 Kas 7 15:39 ")
(position . 169))
("Emacs Shortcut -> 8 Doom"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Doom emacs kı")
(rear-context-string . "--------------|\n")
(position . 6623))
("Emacs Shortcut -> 7 Help"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Yardım kısayo")
(rear-context-string . "--------------|\n")
(position . 6048))
("Emacs Shortcut -> 6 Bracket"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Parantez üzer")
(rear-context-string . "--------------|\n")
(position . 5410))
("Emacs Shortcut -> 5 Window"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Pencere kısay")
(rear-context-string . "--------------|\n")
(position . 3463))
("Emacs Shortcut -> 4 Searching"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Arama kısayol")
(rear-context-string . "--------------|\n")
(position . 3204))
("Emacs Shortcut -> 3 Moving"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Hareket kısay")
(rear-context-string . "--------------|\n")
(position . 2269))
("Emacs Shortcut -> 2 Editing"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Düzenleme kıs")
(rear-context-string . "--------------|\n")
(position . 868))
("Emacs Shortcut -> 1 File"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Dosya kısayol")
(rear-context-string . "-+------------|\n")
(position . 432))
("Emacs Shortcut -> 0 Descriptions"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "** Emacs kısayol")
(rear-context-string . "büyük yazıldı.\n\n")
(position . 173))
("Emacs -> 6 Shortcut"
(filename . "~/.emacs.d/init.el")
(front-context-string . "(global-set-key ")
(rear-context-string . "==============\n\n")
(position . 16851))
("Emacs Shortcut"
(filename . "~/Belgeler/ORG/Emacs Shortcut.org")
(front-context-string . "#+title: Emacs K")
(rear-context-string)
(position . 1))
("Emacs -> 7 Load .el files"
(filename . "~/.emacs.d/init.el")
(front-context-string)
(rear-context-string . "================")
(position . 18567))
("Emacs -> 5 Hooks"
(filename . "~/.emacs.d/init.el")
(front-context-string . "(add-hook 'cloju")
(rear-context-string . "==============\n\n")
(position . 16320))
("Emacs -> 4 Buffer"
(filename . "~/.emacs.d/init.el")
(front-context-string . ";; Complete file")
(rear-context-string . "==============\n\n")
(position . 14630))
("Emacs -> 3 Editing"
(filename . "~/.emacs.d/init.el")
(front-context-string . ";; Make typing d")
(rear-context-string . "==============\n\n")
(position . 5285))
("Emacs -> 2 Interface"
(filename . "~/.emacs.d/init.el")
(front-context-string . ";; Hide welcome ")
(rear-context-string . "==============\n\n")
(position . 1821))
("Emacs -> 1 Package"
(filename . "~/.emacs.d/init.el")
(front-context-string . ";; Package signa")
(rear-context-string . "==============\n\n")
(position . 230))
("Emacs -> 0 init.el"
(filename . "~/.emacs.d/init.el")
(front-context-string . "22/10/2023\n;;;;;")
(rear-context-string . "e\n;; Edit: ")
(position . 101))
)

415
emacs.d/init.el Executable file
View file

@ -0,0 +1,415 @@
;;; ===================== ;;;
;;; Author: Muha Aliss ;;;
;;; Mail: muhaaliss@pm.me ;;;
;;; Edit: 10/10/2023 ;;;
;;; ===================== ;;;
;;; ===================== ;;;
;;; Package ;;;
;;; ===================== ;;;
;; Package signature check disable
(setq package-check-signature nil)
;; Edit package sources
(require 'package)
(add-to-list 'package-archives '("MELPA" . "https://melpa.org/packages/") t)
;; Initializes the package infrastructure
(package-initialize)
;; Define the package-selected-packages variable and assign the packages i want to it.
(setq package-selected-packages
'(gnu-elpa
gnu-elpa-keyring-update
use-package
doom-themes
bookmark
lsp-mode
yasnippet
lsp-treemacs
helm-lsp
projectile
hydra
flycheck
company
avy
which-key
helm-xref
all-the-icons
all-the-icons-dired
helm-icons
dap-mode))
;; Search packages in installed packages,
(when (cl-find-if-not #'package-installed-p package-selected-packages)
; refresh packages list,
(package-refresh-contents)
; install the packages.
(mapc #'package-install package-selected-packages))
;;; ===================== ;;;
;;; Interface ;;;
;;; ===================== ;;;
;; Hide welcome screen
(setq inhibit-splash-screen t)
;; Open bookmark window by default
(list-bookmarks)
(switch-to-buffer "*Bookmark List*")
;; Display line numbers
(global-display-line-numbers-mode)
;; Set cursor to i-beam
(setq-default cursor-type 'bar)
;; Highlight Current Line
(global-hl-line-mode 1)
;; Up/Down arrow move based on logical lines (newline char) or visual line
(setq line-move-visual nil)
;; Show cursor position within line
(column-number-mode 1)
;; org mode syntax color embeded source code
(setq org-src-fontify-natively t)
;; Enable file icons
(use-package all-the-icons
:if (display-graphic-p))
;; Set a theme
(use-package doom-themes
:ensure t
:config
; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(load-theme 'doom-one t)
; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
; Enable custom neotree theme (all-the-icons must be installed!)
(doom-themes-neotree-config)
; or for treemacs users
(setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
(doom-themes-treemacs-config)
; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))
;; Set default window size
(if (display-graphic-p)
(progn
(setq initial-frame-alist
'(
(tool-bar-lines . 0)
(width . 110) ; chars
(height . 40) ; lines
(left . 787)
(top . 0)))
(setq default-frame-alist
'(
(tool-bar-lines . 0)
(width . 110)
(height . 40)
(left . 787)
(top . 0))))
(progn
(setq initial-frame-alist '( (tool-bar-lines . 0)))
(setq default-frame-alist '( (tool-bar-lines . 0)))))
;; Set default font
(cond
((string-equal system-type "windows-nt") ; Microsoft Windows
(when (member "Consolas" (font-family-list))
(set-frame-font "Consolas-12" t t)))
((string-equal system-type "darwin") ; macOS
(when (member "Menlo" (font-family-list))
(set-frame-font "Menlo-12" t t)))
((string-equal system-type "gnu/linux") ; linux
(when (member "Source Code Pro" (font-family-list))
(set-frame-font "Source Code Pro-12" t t))))
;;; ===================== ;;;
;;; Editing ;;;
;;; ===================== ;;;
;; Turn on/off line wrap for current buffer.
(global-visual-line-mode 1)
;; Make typing delete/overwrites selected text
(delete-selection-mode 1)
;; Set default tab char's display width to 4 spaces
(setq-default tab-width 4)
;; Make indent commands use space only (never tab character)
(setq-default indent-tabs-mode nil)
;; Make tab key do indent first then completion.
(setq-default tab-always-indent nil)
;; Set highlighting brackets
(show-paren-mode 1)
(setq show-paren-style 'mixed)
;; Add support for pretty symbols mode
(global-prettify-symbols-mode 1)
(defun my-add-pretty-symbol ()
"make some word display as Unicode symbols"
(setq prettify-symbols-alist
'(
("->" . 8594) ; → 8594
("lambda" . 955) ; λ 955
("--->" . 10230) ; ⟶ 10230
("=>" . 8658) ; ⇒ 8658
("map" . 8614) ; ↦ 8614
)))
;; Hippie expand to words only
(setq hippie-expand-try-functions-list
'(
try-expand-dabbrev
try-expand-dabbrev-all-buffers
;; try-expand-dabbrev-from-kill
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-complete-file-name-partially
try-complete-file-name
;; try-expand-all-abbrevs
;; try-expand-list
;; try-expand-line
))
(use-package rustic
:ensure
:bind (:map rustic-mode-map
("M-j" . lsp-ui-imenu)
("M-?" . lsp-find-references)
("C-c C-c l" . flycheck-list-errors)
("C-c C-c a" . lsp-execute-code-action)
("C-c C-c r" . lsp-rename)
("C-c C-c q" . lsp-workspace-restart)
("C-c C-c Q" . lsp-workspace-shutdown)
("C-c C-c s" . lsp-rust-analyzer-status)
("C-c C-c e" . lsp-rust-analyzer-expand-macro)
("C-c C-c d" . dap-hydra)
("C-c C-c h" . lsp-ui-doc-glance)))
(defun rk/rustic-mode-hook ()
;; so that run C-c C-c C-r works without having to confirm, but don't try to
;; save rust buffers that are not file visiting. Once
;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should
;; no longer be necessary.
(when buffer-file-name
(setq-local buffer-save-without-query t))
(add-hook 'before-save-hook 'lsp-format-buffer nil t))
;; for rust-analyzer integration
(use-package lsp-mode
:ensure
:commands lsp
:custom
;; what to use when checking on-save. "check" is default, I prefer clippy
(lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t)
(lsp-idle-delay 0.6)
;; This controls the overlays that display type and other hints inline. Enable
;; / disable as you prefer. Well require a `lsp-workspace-restart' to have an
;; effect on open projects.
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial")
(lsp-rust-analyzer-display-chaining-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil)
(lsp-rust-analyzer-display-closure-return-type-hints t)
(lsp-rust-analyzer-display-parameter-hints nil)
(lsp-rust-analyzer-display-reborrow-hints nil))
(use-package lsp-ui
:ensure
:commands lsp-ui-mode
:custom
(lsp-ui-peek-always-show t)
(lsp-ui-sideline-show-hover t)
(lsp-ui-doc-enable nil))
;; inline errors
(use-package flycheck :ensure)
;; auto-completion and code snippets
(use-package yasnippet
:ensure
:config
(yas-reload-all)
(add-hook 'prog-mode-hook 'yas-minor-mode)
(add-hook 'text-mode-hook 'yas-minor-mode))
(use-package company
:ensure
:bind
(:map company-active-map
("C-n". company-select-next)
("C-p". company-select-previous)
("M-<". company-select-first)
("M->". company-select-last))
(:map company-mode-map
("<tab>". tab-indent-or-complete)
("TAB". tab-indent-or-complete)))
(defun company-yasnippet-or-completion ()
(interactive)
(or (do-yas-expand)
(company-complete-common)))
(defun check-expansion ()
(save-excursion
(if (looking-at "\\_>") t
(backward-char 1)
(if (looking-at "\\.") t
(backward-char 1)
(if (looking-at "::") t nil)))))
(defun do-yas-expand ()
(let ((yas/fallback-behavior 'return-nil))
(yas/expand)))
(defun tab-indent-or-complete ()
(interactive)
(if (minibufferp)
(minibuffer-complete)
(if (or (not yas/minor-mode)
(null (do-yas-expand)))
(if (check-expansion)
(company-complete-common)
(indent-for-tab-command)))))
;; Create / cleanup rust scratch projects quickly
(use-package rust-playground :ensure)
;; for Cargo.toml and other config files
(use-package toml-mode :ensure)
;; setting up debugging support with dap-mode
(use-package exec-path-from-shell
:ensure
:init (exec-path-from-shell-initialize))
(when (executable-find "lldb-mi")
(use-package dap-mode
:ensure
:config
(dap-ui-mode)
(dap-ui-controls-mode 1)
(require 'dap-lldb)
(require 'dap-gdb-lldb)
;; installs .extension/vscode
(dap-gdb-lldb-setup)
(dap-register-debug-template
"Rust::LLDB Run Configuration"
(list :type "lldb"
:request "launch"
:name "LLDB::Run"
:gdbpath "rust-lldb"
;; uncomment if lldb-mi is not in PATH
;; :lldbmipath "path/to/lldb-mi"
))))
;;; ===================== ;;;
;;; Buffer ;;;
;;; ===================== ;;;
;; Complete file names, buffer names, or any other Emacs interactions
(helm-mode)
(helm-icons-enable)
;; Change the functionality of some default functions.
(define-key global-map [remap find-file] #'helm-find-files)
(define-key global-map [remap execute-extended-command] #'helm-M-x)
(define-key global-map [remap switch-to-buffer] #'helm-mini)
;; Shows key assignments in a mini window.
(which-key-mode)
;; Garbage collector
(setq gc-cons-threshold (* 100 1024 1024)
read-process-output-max (* 1024 1024)
;; more compact
treemacs-space-between-root-nodes nil
;; less noise
lsp-completion-show-detail nil
;; resonsibility
company-idle-delay 0.0
company-minimum-prefix-length 1
;; clangd is fast
lsp-idle-delay 0.1)
;; Use short answer
(if (version< emacs-version "28.1")
(defalias 'yes-or-no-p 'y-or-n-p)
(setq use-short-answers t))
;;; ===================== ;;;
;;; Hooks ;;;
;;; ===================== ;;;
(add-hook 'tex-mode-hook 'my-add-pretty-symbol)
(add-hook 'emacs-lisp-mode-hook 'my-add-pretty-symbol)
(add-hook 'rust-mode-hook 'my-add-pretty-symbol)
(add-hook 'c-mode-hook 'my-add-pretty-symbol)
(add-hook 'python-mode-hook 'my-add-pretty-symbol)
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
(add-hook 'c-mode-hook 'lsp)
(add-hook 'rust-mode-hook 'lsp)
(add-hook 'lsp-mode-hook 'lsp-ui-mode)
(add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration)
(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook)
;;; ===================== ;;;
;;; Key bindings ;;;
;;; ===================== ;;;
;; Hippie expand keybindings
(global-set-key (kbd "C-t") 'hippie-expand)
;; Move line keybindings.
(global-set-key (kbd "M-<up>") 'move-line-up)
(global-set-key (kbd "M-<down>") 'move-line-down)
;; Copy or cut current line if no selection keybindings
(global-set-key (kbd "<f2>") 'xah-cut-line-or-region) ; cut
(global-set-key (kbd "<f3>") 'xah-copy-line-or-region) ; copy
(global-set-key (kbd "<f4>") 'yank) ; paste
;; Select current line keybinding
(global-set-key (kbd "M-7") 'xah-select-line)
;; Delete batching bracket keybindings
(global-set-key (kbd "M-<delete>") 'xah-delete-forward-bracket-pairs)
(global-set-key (kbd "M-S-<delete>") 'xah-delete-backward-bracket-text)
;; Goto matching bracket keybindings
(global-set-key (kbd "M-<left>") 'xah-goto-matching-bracket)
(global-set-key (kbd "M-<right>") 'xah-goto-matching-bracket)
;;; ===================== ;;;
;;; Load other .el files ;;;
;;; ===================== ;;;
(load "~/.emacs.d/xah")

258
emacs.d/xah.el Executable file
View file

@ -0,0 +1,258 @@
(defun xah-select-line ()
"Select current line. If region is active, extend selection downward by line.
If `visual-line-mode' is on, consider line as visual line.
URL `http://xahlee.info/emacs/emacs/modernization_mark-word.html'
Version: 2017-11-01 2021-03-19 2023-07-16"
(interactive)
(if (region-active-p)
(if visual-line-mode
(let ((xp1 (point)))
(end-of-visual-line 1)
(when (eq xp1 (point))
(end-of-visual-line 2)))
(progn
(forward-line 1)
(end-of-line)))
(if visual-line-mode
(progn (beginning-of-visual-line)
(push-mark (point) t t)
(end-of-visual-line))
(progn
(push-mark (line-beginning-position) t t)
(end-of-line)))))
;; Copy current line if no selection
(defun xah-copy-line-or-region ()
"Copy current line or selection.
When called repeatedly, append copy subsequent lines.
When `universal-argument' is called first, copy whole buffer (respects `narrow-to-region').
URL `http://xahlee.info/emacs/emacs/emacs_copy_cut_current_line.html'
Version: 2010-05-21 2022-10-03"
(interactive)
(let ((inhibit-field-text-motion nil))
(if current-prefix-arg
(progn
(copy-region-as-kill (point-min) (point-max)))
(if (region-active-p)
(progn
(copy-region-as-kill (region-beginning) (region-end)))
(if (eq last-command this-command)
(if (eobp)
(progn )
(progn
(kill-append "\n" nil)
(kill-append
(buffer-substring-no-properties (line-beginning-position) (line-end-position))
nil)
(progn
(end-of-line)
(forward-char))))
(if (eobp)
(if (eq (char-before) 10 )
(progn )
(progn
(copy-region-as-kill (line-beginning-position) (line-end-position))
(end-of-line)))
(progn
(copy-region-as-kill (line-beginning-position) (line-end-position))
(end-of-line)
(forward-char))))))))
;; Cut current line if no selection
(defun xah-cut-line-or-region ()
"Cut current line or selection.
When `universal-argument' is called first, cut whole buffer (respects `narrow-to-region').
URL `http://xahlee.info/emacs/emacs/emacs_copy_cut_current_line.html'
Version: 2010-05-21 2015-06-10"
(interactive)
(if current-prefix-arg
(progn ; not using kill-region because we don't want to include previous kill
(kill-new (buffer-string))
(delete-region (point-min) (point-max)))
(progn (if (region-active-p)
(kill-region (region-beginning) (region-end) t)
(kill-region (line-beginning-position) (line-beginning-position 2))))))
;; Move the current line up or down by N lines.
(defun move-line (n)
(interactive "p")
(setq col (current-column))
(beginning-of-line) (setq start (point))
(end-of-line) (forward-char) (setq end (point))
(let ((line-text (delete-and-extract-region start end)))
(forward-line n)
(insert line-text)
;; restore point to original column in moved line
(forward-line -1)
(forward-char col)))
(defmacro save-column (&rest body)
`(let ((column (current-column)))
(unwind-protect
(progn ,@body)
(move-to-column column))))
(put 'save-column 'lisp-indent-function 0)
(defun move-line-up ()
(interactive)
(save-column
(transpose-lines 1)
(forward-line -2)))
(defun move-line-down ()
(interactive)
(save-column
(forward-line 1)
(transpose-lines 1)
(forward-line -1)))
;; Delete the matching brackets
(defun xah-delete-forward-bracket-pairs (&optional DeleteInnerTextQ)
"Delete the matching brackets to the right of cursor including the inner text.
e.g. (a b c)
In lisp code, if DeleteInnerTextQ is true, also delete the inner text.
After the command, mark is set at the left matching bracket position, so you can `exchange-point-and-mark' to select it.
This command assumes the char to the right of point is a left bracket or quote, and have a matching one after.
What char is considered bracket or quote is determined by current syntax table.
URL `http://xahlee.info/emacs/emacs/emacs_delete_backward_char_or_bracket_text.html'
Version: 2017-07-02 2023-07-30"
(interactive (list t))
(if DeleteInnerTextQ
(progn
(mark-sexp)
(kill-region (region-beginning) (region-end)))
(let ((xpt (point)))
(forward-sexp)
(delete-char -1)
(push-mark (point) t)
(goto-char xpt)
(delete-char 1))))
(defun xah-delete-backward-bracket-text ()
"Delete the matching brackets to the left of cursor, including the inner text.
e.g. (a b c)
This command assumes the left of cursor is a right bracket, and there is a matching one before it.
What char is considered bracket or quote is determined by current syntax table.
URL `http://xahlee.info/emacs/emacs/emacs_delete_backward_char_or_bracket_text.html'
Version: 2017-09-21 2023-07-30"
(interactive)
(progn
(forward-sexp -1)
(mark-sexp)
(kill-region (region-beginning) (region-end))))
(defun xah-delete-backward-bracket-pair ()
"Delete the matching brackets/quotes to the left of cursor.
After call, mark is set at the matching bracket position, so you can `exchange-point-and-mark' to select it.
This command assumes the left of point is a right bracket, and there is a matching one before it.
What char is considered bracket or quote is determined by current syntax table.
URL `http://xahlee.info/emacs/emacs/emacs_delete_backward_char_or_bracket_text.html'
Version: 2017-07-02"
(interactive)
(let ((xp0 (point)) xp1)
(forward-sexp -1)
(setq xp1 (point))
(goto-char xp0)
(delete-char -1)
(goto-char xp1)
(delete-char 1)
(push-mark (point) t)
(goto-char (- xp0 2))))
(defun xah-delete-backward-char-or-bracket-text ()
"Delete 1 character or delete quote/bracket pair and inner text.
If the char to the left of cursor is a matching pair, delete it along with inner text, push the deleted text to `kill-ring'.
What char is considered bracket or quote is determined by current syntax table.
If `universal-argument' is called first, do not delete inner text.
URL `http://xahlee.info/emacs/emacs/emacs_delete_backward_char_or_bracket_text.html'
Version: 2017-07-02 2023-07-22 2023-07-30"
(interactive)
(if (and delete-selection-mode (region-active-p))
(delete-region (region-beginning) (region-end))
(cond
((prog2 (backward-char) (looking-at "\\s)") (forward-char))
(if current-prefix-arg
(xah-delete-backward-bracket-pair)
(xah-delete-backward-bracket-text))
)
((prog2 (backward-char) (looking-at "\\s(") (forward-char))
(message "left of cursor is opening bracket")
(let (xpOpenBracketLeft
(xpOpenBracketRight (point)) xisComment)
(backward-char)
(setq xpOpenBracketLeft (point))
(goto-char xpOpenBracketRight)
(forward-char)
(setq xisComment (nth 4 (syntax-ppss)))
(if xisComment
(progn
(message "cursor is in comment")
(goto-char xpOpenBracketLeft)
(if (forward-comment 1)
(kill-region (point) xpOpenBracketLeft)
(message "error hSnRp: parsing comment failed.")))
(progn
(message "right 1 char of cursor is not in comment")
(goto-char xpOpenBracketLeft)
(forward-sexp)
(if current-prefix-arg
(xah-delete-backward-bracket-pair)
(xah-delete-backward-bracket-text))))))
((prog2 (backward-char) (looking-at "\\s\"") (forward-char))
(if (nth 3 (syntax-ppss))
(progn
(backward-char)
(xah-delete-forward-bracket-pairs (not current-prefix-arg)))
(if current-prefix-arg
(xah-delete-backward-bracket-pair)
(xah-delete-backward-bracket-text))))
(t
(delete-char -1)))))
(defvar xah-brackets '("“”" "()" "[]" "{}" "<>" "" "" "" "" "⦅⦆" "〚〛" "⦃⦄" "" "«»" "「」" "〈〉" "《》" "【】" "" "⦗⦘" "『』" "〖〗" "〘〙" "「」" "⟦⟧" "⟨⟩" "⟪⟫" "⟮⟯" "⟬⟭" "⌈⌉" "⌊⌋" "⦇⦈" "⦉⦊" "❛❜" "❝❞" "" "❪❫" "" "❬❭" "" "❰❱" "" "〈〉" "⦑⦒" "⧼⧽" "﹙﹚" "﹛﹜" "﹝﹞" "⁽⁾" "₍₎" "⦋⦌" "⦍⦎" "⦏⦐" "⁅⁆" "⸢⸣" "⸤⸥" "⟅⟆" "⦓⦔" "⦕⦖" "⸦⸧" "⸨⸩" "⦅⦆")
"A list of strings, each element is a string of 2 chars, the left bracket and a matching right bracket.
Used by `xah-select-text-in-quote' and others.")
(defconst xah-left-brackets
(mapcar (lambda (x) (substring x 0 1)) xah-brackets)
"List of left bracket chars. Each element is a string.")
(defconst xah-right-brackets
(mapcar (lambda (x) (substring x 1 2)) xah-brackets)
"List of right bracket chars. Each element is a string.")
(defun xah-goto-matching-bracket ()
"Move cursor to the matching bracket.
If cursor is not on a bracket, call `backward-up-list'.
The list of brackets to jump to is defined by `xah-left-brackets' and `xah-right-brackets'.
URL `http://xahlee.info/emacs/emacs/emacs_navigating_keys_for_brackets.html'
Version: 2016-11-22 2023-07-22"
(interactive)
(if (nth 3 (syntax-ppss))
(backward-up-list 1 'ESCAPE-STRINGS 'NO-SYNTAX-CROSSING)
(cond
((eq (char-after) ?\") (forward-sexp))
((eq (char-before) ?\") (backward-sexp))
((looking-at (regexp-opt xah-left-brackets))
(forward-sexp))
((prog2 (backward-char) (looking-at (regexp-opt xah-right-brackets)) (forward-char))
(backward-sexp))
(t (backward-up-list 1 'ESCAPE-STRINGS 'NO-SYNTAX-CROSSING)))))

26
nano/Dockerfile.nanorc Executable file
View file

@ -0,0 +1,26 @@
## Syntax highlighting for Dockerfiles
syntax "Dockerfile" "Dockerfile[^/]*$" "\.dockerfile$"
## Keywords
icolor red "^(FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)[[:space:]]"
## Brackets & parenthesis
color brightgreen "(\(|\)|\[|\])"
## Double ampersand
color brightmagenta "&&"
## Comments
icolor cyan "^[[:space:]]*#.*$"
## Blank space at EOL
color ,green "[[:space:]]+$"
## Strings, single-quoted
color brightwhite "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Strings, double-quoted
color brightwhite ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
## Single and double quotes
color brightyellow "('|\")"

39
nano/Rnw.nanorc Executable file
View file

@ -0,0 +1,39 @@
## Here is a short example for TeX files.
##
syntax "Tex" "\.Rnw$" "bib" "\.bib$" "cls" "\.cls$"
color yellow "\$(\\\$|[^$])*[^\\]\$"
color yellow "\$\$(\\\$|[^$])*[^\\]\$\$"
icolor green "\\.|\\[A-Z]*"
color magenta "[{}]"
color red start="<<" end=">>="
color white start=">>=" end="@"
color brightblue "%.*"
color brightblue "^[[:space:]]*#.*"
color brightblue start="\\begin\{comment\}" end="\\end\{comment\}"
color green "(class|extends|goto) ([a-zA-Z0-9_]*)"
color green "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|return|true|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|namespace|use)[^a-z0-9_-]{1}"
# Functions
color blue "([a-zA-Z0-9_\-$\.]*)\("
# Variables
color magenta "[a-zA-Z_0-9]* <\-"
# Special Characters
color yellow "[.,{}();]"
color yellow "\["
color yellow "\]"
color yellow "[=][^>]"
# Numbers
color magenta "[+-]*([0-9]\.)*[0-9]+([eE][+-]?([0-9]\.)*[0-9])*"
color magenta "0x[0-9a-zA-Z]*"
# Special Variables
color blue "(\$this|parent::|self::|\$this->)"
# Bitwise Operations
color magenta "(\;|\||\^){1}"
# And/Or/SRO/etc
color green "(\;\;|\|\||::|=>|->)"
# STRINGS!
color red "('[^']*')|(\"[^\"]*\")"

43
nano/apache2.nanorc Executable file
View file

@ -0,0 +1,43 @@
## Apache httpd.conf highlighting
##
#how to add sites-enabled files? "default" is too generic to keep in here I think
syntax "Apache2" "httpd.conf$"
color brightwhite "(ServerRoot|LoadModule|(Lock|Pid)File|Timeout|(Max)?KeepAlive(Requests|Timeout)?)"
color brightwhite "(User|Group|LogFormat|ErrorLog|Include|(Script)?Alias)"
color brightwhite "(ErrorDocument|AccessFileName|UseCanonicalName|TypesConfig|DefaultType)"
color brightwhite "(HostnameLookups|IndexOptions|(Readme|Header)Name|LanguagePriority)"
color brightwhite "(AddIcon(ByEncoding|ByType)?|DefaultIcon|IndexIgnore|BrowserMatch)"
color brightwhite "(Add(Encoding|Language|(Default)?Charset|Type|Handler)|DirectoryIndex)"
color brightwhite "(DocumentRoot|Server(Admin|Signature)|LogLevel|CustomLog)"
color brightwhite "((Force)?LanguagePriority|NameVirtualHost)"
color brightyellow "(SetHandler|Order|Deny|Allow|SetOutputFilter)"
color yellow "(AllowOverride|FileInfo|AuthConfig|Limit)"
color yellow "([^A-Z0-9a-z]Options|Indexes|(\+|\-)?SymLinksIfOwnerMatch)"
color yellow "(Includes(NoExec)?|(\+|\-)?MultiViews)"
color yellow "(None|allow,deny|deny,allow|(allow)? from (all)?|Prefer|Fallback)"
color yellow "(Add(Handler|OutputFilter)|NumServers|AcceptMutex)"
color yellow "((Min|Max)Spare(Threads|Servers|Processors)|Start(Threads|Servers))"
color yellow "(MaxClients|(Min|Max)?ThreadsPerChild|MaxRequestsPerChild)"
color yellow "(FancyIndexing|VersionSort|ExecCGI|FollowSymLinks|(Min|Max)Processors)"
color yellow "hostmaster@[A-Za-z0-9\.]*"
color brightred "(On|Off)[[:space:]]*$"
color brightred "[[:space:]]+(debug|info|notice|warn|error|crit|alert|emerg)[[:space:]]*$"
color brightred "[[:space:]]+(combined|common|referer|agent)[[:space:]]*$"
color brightred "[[:space:]]+(redirect\-carefully|nokeepalive)[[:space:]]*"
color brightred "[[:space:]]+(force\-response\-1\.0)[[:space:]]*"
color brightred "[[:space:]]+(downgrade\-1\.0)[[:space:]]*"
color brightred "[[:space:]]+application/[a-zA-Z\-]+[[:space:]]*"
color brightred "[[:space:]]+type-map[[:space:]]*"
color magenta "[[:space:]]+[0-9]+[[:space:]]*"
color magenta "(/)?(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[1-9])(\.(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])){3}([[:space:]]+::(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])/(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9]))?"
color brightcyan start="<" end=">"
color white ""(\\.|[^\"])*""
# Unix-based paths
# can't use \] in the regex for some reason?!? Maybe a bug?
# this is preventing a 100% "to the end of the line" match for a few
# lines (the trailing characters from ] to the EOL are not highlighted.
# if anyone knows how to make it work, let me know.. ;)
color white "[[:space:]]+(/[/\[\^#A-Za-z0-9\.\*\_\-]+)+"
color green "^[[:space:]]*#.*"
color cyan "\<(ServerName|Serveralias|DocumentRoot|DirectoryIndex|ErrorLog|CustomLog)\>"

44
nano/apacheconf.nanorc Executable file
View file

@ -0,0 +1,44 @@
# Apache files
syntax "apacheconf" "httpd\.conf|mime\.types|vhosts\.d\\*"
color yellow ".+"
color brightcyan "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)"
color brightcyan "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)"
color brightcyan "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)"
color brightcyan "(Anonymous_VerifyEmail|AssignUserID|AuthAuthoritative|AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm)"
color brightcyan "(AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)"
color brightcyan "(AuthGroupFile|AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases)"
color brightcyan "(AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl|AuthName|AuthType|AuthUserFile)"
color brightcyan "(BrowserMatch|BrowserMatchNoCase|BS2000Account|BufferedLogs|CacheDefaultExpire|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheExpiryCheck)"
color brightcyan "(CacheFile|CacheForceCompletion|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheIgnoreCacheControl|CacheIgnoreHeaders)"
color brightcyan "(CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire|CacheMaxFileSize|CacheMinFileSize|CacheNegotiatedDocs|CacheRoot|CacheSize|CacheTimeMargin)"
color brightcyan "(CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckSpelling|ChildPerUserID|ContentDigest|CookieDomain|CookieExpires|CookieLog|CookieName)"
color brightcyan "(CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultType)"
color brightcyan "(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize|Deny|Directory|DirectoryIndex|DirectoryMatch|DirectorySlash)"
color brightcyan "(DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|Example|ExpiresActive|ExpiresByType)"
color brightcyan "(ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FileETag|Files|FilesMatch|ForceLanguagePriority|ForceType|ForensicLog|Group|Header)"
color brightcyan "(HeaderName|HostnameLookups|IdentityCheck|IfDefine|IfModule|IfVersion|ImapBase|ImapDefault|ImapMenu|Include|IndexIgnore|IndexOptions|IndexOrderDefault)"
color brightcyan "(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout)"
color brightcyan "(LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize)"
color brightcyan "(LDAPTrustedCA|LDAPTrustedCAType|Limit|LimitExcept|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine)"
color brightcyan "(LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|Location|LocationMatch|LockFile|LogFormat|LogLevel|MaxClients|MaxKeepAliveRequests)"
color brightcyan "(MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MCacheMaxObjectCount|MCacheMaxObjectSize)"
color brightcyan "(MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads)"
color brightcyan "(MMapFile|ModMimeUsePathInfo|MultiviewsMatch|NameVirtualHost|NoProxy|NumServers|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|PassEnv|PidFile)"
color brightcyan "(ProtocolEcho|Proxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyIOBufferSize|ProxyMatch|ProxyMaxForwards|ProxyPass|ProxyPassReverse)"
color brightcyan "(ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia|ReadmeName|Redirect|RedirectMatch)"
color brightcyan "(RedirectPermanent|RedirectTemp|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader)"
color brightcyan "(Require|RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC)"
color brightcyan "(Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen)"
color brightcyan "(SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetEnv|SetEnvIf|SetEnvIfNoCase|SetHandler)"
color brightcyan "(SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath)"
color brightcyan "(SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions)"
color brightcyan "(SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite)"
color brightcyan "(SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire)"
color brightcyan "(SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|SuexecUserGroup|ThreadLimit)"
color brightcyan "(ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnsetEnv|UseCanonicalName|User|UserDir|VirtualDocumentRoot)"
color brightcyan "(VirtualDocumentRootIP|VirtualHost|VirtualScriptAlias|VirtualScriptAliasIP|Win32DisableAcceptEx|XBitHack)"
color yellow "<[^>]+>"
color brightcyan "</?[A-Za-z]+"
color brightcyan "(<|</|>)"
color green "\"(\\.|[^\"])*\""
color white "#.*"

116
nano/arduino.nanorc Executable file
View file

@ -0,0 +1,116 @@
## FILENAME: arduino.nanorc
##
## DESCRIPTION: The arduino.nanorc syntax files allows syntax highlighting
## for Arduino sketch files in the GNU nano text editor.
##
## Maintainer: Nicholas Wilde
## Version: 0.1
## DATE: 06/23/2011
##
## HOMEPAGE: http://code.google.com/p/arduino-nano-editor-syntax/
##
## COMMENTS: -Most of the code was taken from the c.nanorc code found with
## GNU nano 2.2.6.
## -Direction was taken from the arduino vim syntax code by johannes
## <https://bitbucket.org/johannes/arduino-vim-syntax/>
## -Tested on Ubuntu Server 11.04 Natty Narwhal and GNU nano 2.2.6
##
## DIRECTIONS: For Ubuntu Server 11.04 Natty Narwhal:
## -Move this file <arduino.nanorc> to the nano directory
## /usr/share/nano/
## -Add arduino.nanorc reference to the nanorc settings file
## /etc/nanorc
## ...
## ## Arduino
## /usr/share/nano/arduino.nanorc
## ...
syntax "INO" "\.?ino$"
##
color brightred "\<[A-Z_][0-9A-Z_]+\>"
##
color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
## Constants
icolor green "\<(HIGH|LOW|INPUT|OUTPUT)\>"
## Serial Print
icolor red "\<(DEC|BIN|HEX|OCT|BYTE)\>"
## PI Constants
icolor green "\<(PI|HALF_PI|TWO_PI)\>"
## ShiftOut
icolor green "\<(LSBFIRST|MSBFIRST)\>"
## Attach Interrupt
icolor green "\<(CHANGE|FALLING|RISING)\>"
## Analog Reference
icolor green "\<(DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56)\>"
## === FUNCTIONS === ##
## Data Types
color green "\<(boolean|byte|char|float|int|long|word)\>"
## Control Structions
color brightyellow "\<(case|class|default|do|double|else|false|for|if|new|null|private|protected|public|short|signed|static|String|switch|this|throw|try|true|unsigned|void|while)\>"
color magenta "\<(goto|continue|break|return)\>"
## Math
color brightyellow "\<(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan)\>"
## Bits & Bytes
color brightyellow "\<(bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte)\>"
## Analog I/O
color brightyellow "\<(analogReference|analogRead|analogWrite)\>"
## External Interrupts
color brightyellow "\<(attachInterrupt|detachInterrupt)\>"
## Time
color brightyellow "\<(delay|delayMicroseconds|millis|micros)\>"
## Digital I/O
color brightyellow "\<(pinMode|digitalWrite|digitalRead)\>"
## Interrupts
color brightyellow "\<(interrupts|noInterrupts)\>"
## Advanced I/O
color brightyellow "\<(noTone|pulseIn|shiftIn|shiftOut|tone)\>"
## Serial
color magenta "\<(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\>"
## Structure
color brightyellow "\<(setup|loop)\>"
##
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
##
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
## GCC builtins
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
## This string is VERY resource intensive!
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comments
color brightblue "^\s*//.*"
color brightblue start="/\*" end="\*/"
## Trailing whitespace
color ,green "[[:space:]]+$"

47
nano/asciidoc.nanorc Executable file
View file

@ -0,0 +1,47 @@
syntax "AsciiDoc" "\.(asc|asciidoc|adoc)$"
# main header
color brightred "^=[[:space:]].+$"
# h1
color red "^==[[:space:]].*$"
color red "^----+$"
# h2
color magenta "^===[[:space:]].*$"
color magenta "^~~~~+$"
# h4
color green "^====[[:space:]].*$"
color green "^\^\^\^\^+$"
# h5
color brightblue "^=====[[:space:]].*$"
color brightblue "^\+\+\+\++$"
# attributes
color brightgreen ":.*:"
color brightred "\{[a-z0-9]*\}"
color red "\\\{[a-z0-9]*\}"
color red "\+\+\+\{[a-z0-9]*\}\+\+\+"
# Paragraph Title
color yellow "^\..*$"
# source
color magenta "^\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]"
# Other markup
color yellow ".*[[:space:]]\+$"
color yellow "_[^_]+_"
color yellow "\*[^\*]+\*"
color yellow "\+[^\+]+\+"
color yellow "`[^`]+`"
color yellow "\^[^\^]+\^"
color yellow "~[^~]+~"
color yellow "'[^']+'"
color cyan "`{1,2}[^']+'{1,2}"
# bullets
color brightmagenta "^[[:space:]]*[\*\.-]{1,5}[[:space:]]"
# anchors
color brightwhite "\[\[.*\]\]"
color brightwhite "<<.*>>"

17
nano/asm.nanorc Executable file
View file

@ -0,0 +1,17 @@
## Here is an example for assembler.
##
syntax "asm" "\.(S|s|asm)$"
color red "\<[A-Z_]{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)"
icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
## Highlight strings (note: VERY resource intensive)
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Highlight comments
color brightblue "//.*"
color brightblue start="/\*" end="\*/"
## Highlight trailing whitespace
color ,green "[[:space:]]+$"

38
nano/awk.nanorc Executable file
View file

@ -0,0 +1,38 @@
## Here is an example for awk.
##
syntax "awk" "\.awk$"
## records
icolor brightred "\$[0-9A-Z_!@#$*?-]+"
## awk-set variables
color red "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
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
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|getline|next|nextfile|print|printf)\>"
color brightgreen "\<(system|fflush)\>"
## 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)\>"
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
## Comment highlighting
color brightblue "(^|[[:space:]])#.*$"
## Trailing whitespace
color ,green "[[:space:]]+$"

34
nano/batch.nanorc Executable file
View file

@ -0,0 +1,34 @@
## Here is an example for Batch file shell script.
## Author: davidhcefx (https://github.com/davidhcefx), based on Mitch Bumgarner's version.
## License: MIT License
syntax "batch" "\.(bat|cmd)$"
header "^@[eE](cho|CHO) (on|off|ON|OFF)"
comment "::"
# Native commands, symbols, and comparisons.
icolor green "\<(ASSOC|CALL|CD|CLS|CMDEXTVERSION|COLOR|COPY|DATE|DEL|DIR|ECHO|ENDLOCAL|ERASE|ERRORLEVEL|EXIT|FOR|FTYPE|GOTO|IF|MD|MKLINK|MOVE|PATH|PAUSE|POPD|PROMPT|PUSHD|RD|REM|REN|SET|SETLOCAL|SHIFT|START|TIME|TITLE|TYPE|VER|VERIFY|VOL)\>"
icolor green "\<(EQU|NEQ|LSS|LEQ|GTR|GEQ|DEFINED|EXIST|NOT)\>"
color green "[:|<>=&@\\^]"
# Options.
color brightmagenta "[[:blank:]]/[A-Za-z]+\>"
# Common commands. (with Sublime and Github highlighting as a reference)
icolor brightblue "\<(APPEND|ARP|AT|ATTRIB|AUTOFAIL|BACKUP|BCDBOOT|BCDEDIT|BITSADMIN|BREAK|CACLS|CERTREQ|CERTUTIL|CHANGE|CHCP|CHDIR|CHKDSK|CHKNTFS|CHOICE|CIPHER|CleanMgr|CLIP|CMD|CMDKEY|COMP|COMPACT|CONVERT|CSVDE|DEFRAG|DELTREE|DevCon|DIRQUOTA|DISKCOMP|DISKCOPY|DISKPART|DISKSHADOW|DNSCMD|DOSKEY|DriverQuery|DSACLs|DSAdd|DSGet|DSQuery|DSMod|DSMove|DSRM|Dsmgmt|EVENTCREATE|EXPAND|EXPLORER|EXTRACT|FC|FIND|FINDSTR|FORFILES|FORMAT|FREEDISK|FSUTIL|FTP|GETMAC|GPRESULT|GPUPDATE|GRAFTABL|HELP|HOSTNAME|iCACLS|IEXPRESS|IPCONFIG|INUSE|KEYB|LABEL|LODCTR|LOGMAN|LOGOFF|MAKECAB|MKDIR|MODE|MORE|MOUNTVOL|MSG|MSIEXEC|MSINFO32|MSTSC|NET|NETDOM|NETSH|NBTSTAT|NETSTAT|NLTEST|NSLOOKUP|NTBACKUP|NTDSUtil|OPENFILES|PATHPING|PING|POWERCFG|PRINT|PRNCNFG|PRNMNGR|Query|RASDIAL|RASPHONE|RECOVER|REG|REGEDIT|REGSVR32|REGINI|RENAME|REPLACE|Reset|RESTORE|RMDIR|ROBOCOPY|ROUTE|RUNAS|RUNDLL32|SC|SCHTASKS|SetSPN|SETX|SFC|SHUTDOWN|SORT|SSH|SUBINACL|SUBST|SYSTEMINFO|TAKEOWN|TASKLIST|TASKKILL|TELNET|TIMEOUT|TRACERT|TREE|TSDISCON|TSKILL|TypePerf|TZUTIL|VSSADMIN|W32TM|WAITFOR|WBADMIN|WECUTIL|WEVTUTIL|WHERE|WHOAMI|WINRM|WINRS|WMIC|XCACLS|XCOPY)\>"
# Variable names. (spaces not allowed)
color brightred "%([[:alpha:]`~@#$*(){}:',.?+=_-]|\[|\])([[:alnum:]`~@#$*(){}:',.?+=_-]|\[|\])*%"
color brightred "!([[:alnum:]`~@#$%*(){}:',.?+=_-]|\[|\])([[:alnum:]`~@#$%*(){}:',.?+=_-]|\[|\])*!"
# Parameter names for arguments and loop.
color brightred "%(~[[:alpha:]$]*)?[0-9*]\>" "%%(~[[:alpha:]$]*)?[[:alpha:]]\>"
# Comments.
icolor cyan "^[[:space:]]*(\<rem\>|::).*"
# Strings.
icolor brightyellow ""(\^.|[^"])*""
# Trailling whitespace
color ,green "[[:space:]]+$"

10
nano/c-file.nanorc Executable file
View file

@ -0,0 +1,10 @@
syntax "c-file" "\.(c|h)$"
color red "\<[A-Z_]{2,}\>"
color green "\<(float|double|char|int|short|long|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
color brightyellow "\<(for|if|while|do|else|case|switch|goto|continue|break|return)\>"
color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if)"
color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'"
color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
color brightyellow start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

36
nano/c.nanorc Executable file
View file

@ -0,0 +1,36 @@
## Here is an example for C/C++.
##
syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$"
color brightred "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
color green "\<(for|if|while|do|else|case|default|switch)\>"
color green "\<(try|throw|catch|operator|new|delete)\>"
color brightmagenta "\<(goto|continue|break|return)\>"
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## GCC builtins
color green "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color cyan "<[^= ]*>" ""(\\.|[^"])*""
##
## This string is VERY resource intensive!
#color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comment highlighting
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

51
nano/caml.nanorc Executable file
View file

@ -0,0 +1,51 @@
## Caml, ML, F, and OCaml syntax coloration, for Nano
## (C) 05/2012 Lilian Besson (lilian DOT besson AT normale DOT fr)
## Last version : http://besson.qc.to/NanoSyntax/caml.nanorc
syntax "ocaml" "\.mli?$" "rlwrap"
##possible errors : open "[( that are not closed yet
# color brightwhite "(\(|\"|\[)(\\.|[^(\)|\"|\])*$"
# color white "\([^*](.*|[^)])*\)"
# color green "\[(.*|[^]])*\]"
#uid
color red "\<[A-Z][0-9a-z_]{2,}\>"
#command
color brightred,black start="^#" end=";;"
##keywords
color brightblue "\<(let|val|method|in|and|rec|private|virtual|constraint)\>"
color green,black "\<(if|then|else)\>"
color blue "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>"
color yellow "\<(as|when|of)\>"
color red "\<(int|float|bool|char|string)\>"
color brightblue "\<(new|ref|mutable|lazy|assert|raise|)\>"
color brightgreen "\|"
color brightblue "\<(include|inherit|initializer)\>"
color blue "\<(fun|function|functor|match|try|with)\>"
color brightblue "\;(\;)?"
color brightred "\<(type|open|class|module|exception|external)\>"
##numbers and strings
color yellow "[[:space:]][0-9][0-9]*(\.)?"
color green "\[\]"
color brightgreen "\<(true|false)\>"
color magenta "<[^= ]*>" ""(\\.|[^\"])*""
color magenta start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
##relations and operators
color brightyellow "(\=|[ ]*>[ ]*|[ ]*<[ ]*|\:\=)"
color brightgreen "\:\:"
color brightyellow "(\+|\*|\/|-)(\.)?"
color brightgreen "\->"
##Comments
# color brightcyan "\(\*(\\.|\*|\(|[^\*]\)|[^(\*\))])*$"
# color cyan "\(\*.*\*\)"
color black,white start="\(\*" end="\*\)"
color white,green start="\(\*\*" end="\*\)"

27
nano/changelog.nanorc Executable file
View file

@ -0,0 +1,27 @@
syntax "changelog" "ChangeLog$"
color brightgreen "^\+.*"
color green "^\+\+\+.*"
color brightblue "^ .*"
color brightred "^-.*"
color red "^---.*"
color red "(\d\d\s\w\+\s\d\{4\})"
color brightyellow "^@@.*"
color magenta "^diff.*"
#syn region GentooChangeLogRelease start=/^\*/ end=/$/ contains=GentooChangeLogReleaseDate
#syn match GentooChangeLogReleaseDate contained /(\d\d\s\w\+\s\d\{4\})/
#syn region GentooChangeLogEntry start=/^\s\+/ end=/\n\n/
# \ contains=GentooChangeLogEntryDate,GentooBug
#syn region GentooChangeLogEntryDate contained start=/\d\?\d\s\w\+\s\d\{4\}/ end=/;/
# \ nextgroup=GentooChangeLogEntryAuthor,GentooChangeLogEntryEmail skipwhite skipnl
#syn region GentooChangeLogEntryAuthor contained start=/\S/ end=/\( <\)\@=/
# \ nextgroup=GentooChangeLogEntryEmail skipwhite skipnl
#syn match GentooChangeLogEntryEmail contained /<\?[a-zA-Z0-9\.\-\_]\+@[a-zA-Z0-9\.\-\_]\+>\?/
# \ nextgroup=GentooChangeLogFiles skipwhite skipnl
#syn region GentooChangeLogFiles contained start=/\(\S\)\@=/ end=/:/
# \ contains=GentooChangeLogAddFile,GentooChangeLogDelFile,GentooChangeLogModFile
#" Add / delete / changed files
#syn region GentooChangeLogAddFile contained start=/+/ end=/\([,:]\)\@=/
#syn region GentooChangeLogDelFile contained start=/-/ end=/\([,:]\)\@=/
#syn region GentooChangeLogModFile contained start=/[a-zA-Z0-9]/ end=/\([,:]\)\@=/

19
nano/changelogs.nanorc Executable file
View file

@ -0,0 +1,19 @@
## Changelog file syntax
##
syntax "changelogs" "ChangeLog*$" "HISTORY$" "NEWS$"
color green "\+"
color red "\-"
color brightwhite "[0-9]"
color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
color blue "[0-9][0-9][0-9][0-9]\-[0-9][0-9]\-[0-9][0-9]"
color blue "[0-9][0-9][0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]"
color blue "\<(CEST|CET|CST||CDT|EDT)\>"
color yellow "[0-9]\..*$"
color cyan "\*.*$"
color brightblue "\<(pre.*$|beta.*$|rc.*$|release.*$)\>"
color green "#.*$"
icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
color magenta "[.0-9A-Za-z_]*[[:space:]]*[.0-9A-Za-z_]*[[:space:]]<"
color brightyellow "<(\\.|[^\"])*>"
color brightwhite "commit[[:space:]]*[.0-9A-Z_]*$"

27
nano/clike.nanorc Executable file
View file

@ -0,0 +1,27 @@
## Here is an example for C/C++.
##
syntax "clike" "\.(m|pch)$"
color brightred "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
color magenta "\<(goto|continue|break|return)\>"
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## GCC builtins
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
##
## This string is VERY resource intensive!
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comment highlighting
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

33
nano/clojure.nanorc Executable file
View file

@ -0,0 +1,33 @@
## Clojure Syntax Highlighting
##
syntax "clojure" "\.((clj[s|c]?)|edn)"
icolor green "defn? [0-9A-Z_]+"
color brightgreen "[#']"
color brightgreen "\<fn\>"
color green "\<(map|reduce|filter|println)\>"
color brightyellow "\<(if(-(let|not))?|condp?|when(-(let|not))?)\>"
color brightyellow "\<(do(all|run|seq|sync)?|recur|loop)\>"
color brightyellow "\<(try|catch|finally|throw)\>"
color yellow "(\:else) "
color brightcyan "\<(require|use|import|ns)\>"
color cyan "(\:(require|use|import)) "
color brightred "\<(let(fn)?|defn?)\>"
color brightwhite "\((\/|((not|[<>\=])?\=?))"
color brightwhite "\((\+|-|\*)'?"
color brightwhite "\<(and|or|not|mod|quot|rem|inc|dec)\>"
color magenta "[\(\)]"
color magenta "(\[|\])"
color yellow "\<(true|false|nil)\>"
color brightyellow "(["][^"]*[^\\]["])|("")"
color brightblue ";.*$"
color ,green "[[:space:]]+$"

22
nano/cmake.nanorc Executable file
View file

@ -0,0 +1,22 @@
## CMake syntax highlighter for GNU Nano
##
syntax "cmake" "(CMakeLists\.txt|\.cmake)$"
icolor green "^[[:space:]]*[A-Z0-9_]+"
icolor brightyellow "^[[:space:]]*(include|include_directories|include_external_msproject)\>"
icolor brightgreen "^[[:space:]]*\<((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
color brightgreen "\<(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]"
color brightgreen "[[:space:]]\<(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\>[[:space:]]"
icolor brightred "^[[:space:]]*\<((end)?(function|macro)|return)"
#String Color
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
icolor brightred start="\$(\{|ENV\{)" end="\}"
color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
icolor brightblue "^([[:space:]]*)?#.*"
icolor brightblue "[[:space:]]#.*"

16
nano/coffeescript.nanorc Executable file
View file

@ -0,0 +1,16 @@
syntax "CoffeeScript" "\.coffee$"
header "^#!.*/(env +)?coffee"
color red "[!&|=\/*+\-\<\>]|\<(and|or|is|isnt|not)\>"
color brightblue "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\()" "->"
color brightblue "[()]"
color cyan "\<(for|of|continue|break|isnt|null|unless|this|else|if|return)\>"
color cyan "\<(try|catch|finally|throw|new|delete|typeof|in|instanceof)\>"
color cyan "\<(debugger|switch|while|do|class|extends|super)\>"
color cyan "\<(undefined|then|unless|until|loop|of|by|when)\>"
color brightcyan "\<(true|false|yes|no|on|off)\>"
color brightyellow "@[A-Za-z0-9_]*"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

17
nano/colortest.nanorc Executable file
View file

@ -0,0 +1,17 @@
syntax "colorTest" "ColorTest$"
color black "\<PLAIN\>"
color red "\<red\>"
color green "\<green\>"
color yellow "\<yellow\>"
color blue "\<blue\>"
color magenta "\<magenta\>"
color cyan "\<cyan\>"
color brightred "\<brightred\>"
color brightgreen "\<brightgreen\>"
color brightyellow "\<brightyellow\>"
color brightblue "\<brightblue\>"
color brightmagenta "\<brightmagenta\>"
color brightcyan "\<brightcyan\>"

10
nano/conf.nanorc Executable file
View file

@ -0,0 +1,10 @@
## Here is an example for nanorc files.
##
syntax "conf" "\.c[o]?nf$"
## Possible errors and parameters
## Strings
icolor white ""(\\.|[^"])*""
## Comments
icolor brightblue "^[[:space:]]*#.*$"
icolor cyan "^[[:space:]]*##.*$"

7
nano/config.nanorc Executable file
View file

@ -0,0 +1,7 @@
### several config files
syntax "config" "(\.|/|)config$" "(\.|/|)logout$" "(\.|/|)COLORS$" "(\.|/|)colors$"
color red "/.*$" "TERM" "\..*$" "=.*$" "\*.*$"
color white ":unscaled" "[0-9]"
color blue "setenv|export" "\;"
color green "#.*$"

9
nano/config2.nanorc Executable file
View file

@ -0,0 +1,9 @@
### more config files
syntax "config2" "(\.|/|)env$" "(\.|/|)server.$" "hosts" "gpm" "local.*$" "bootsplash" "crypto-loop"
color red "/.*$" "http\:\/\/.*$"
color white ":unscaled"
color blue "setenv|export"
color brightwhite "[0-9]"
color green "#.*$"
color white "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"

8
nano/config3.nanorc Executable file
View file

@ -0,0 +1,8 @@
### even more config files ;-)
syntax "config3" "iptables" "ntp.*$" "rsyncd" "xfs" "saslauthd" "timidity" "net.*$" "hdparm" "esound" "login.*$"
color red "/.*$" "http\:\/\/.*$" ""(\\.|[^\"])*"" "\<(server)\>" "\<(logfile)\>""\<(driftfile)\>"
color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
color blue "setenv|export"
color brightwhite "[0-9]"
color green "#.*$"

18
nano/configfiles.nanorc Executable file
View file

@ -0,0 +1,18 @@
### all *conf files (e.g. make.conf, xorg.conf, grub.conf, make.globals, Xfce files...)
syntax "configfiles" "(\.|/|)conf$" "(\.|/|)ample$" "(\.|/|)globals$" "xfce.*$" "syslog-ng" "sudoers"
color brightwhite "\<(alias)\>"
color blue "<(\\.|[^'])*>"
color magenta "[a-zA-Z0-9\_]+="
color white ">(\\.|[^'><])*</"
color green "//.*$"
color red ""(\\.|[^\"])*""
color red "title.*$" "\<(server)\>" "\<(logfile)\>" "\<(driftfile)\>" "\<(restrict)\>"
color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
color magenta "'(\\.|[^'])*'"
color brightwhite "[0-9]"
color brightwhite "[<>]"
color magenta "Section" "EndSection" "SubSection" "EndSubSection"
color red "\<(root)\>"
color brightred,blue "^.*-->" start="<!--.*" end="$"
color green "#.*$" start="<!--" end="-->"

35
nano/conky.nanorc Executable file
View file

@ -0,0 +1,35 @@
## Conky config highlighting
##
syntax "Conky" ".conkyrc$"
# keywords
color brightblue "(use_spacer|background|use_xft|xftfont|xftalpha)"
color brightblue "(mail_spool|update_interval|own_window)"
color brightblue "(double_buffer|minimum_size)"
color brightblue "(draw_(outline|borders|shades)|stippled_borders)"
color brightblue "border_(margin|width)"
color brightblue "default_((shade_|outline_)?color)"
color brightblue "(alignment|gap_x|gap_y|no_buffers|uppercase)"
color brightblue "^TEXT[[:space:]]*$"
# Highlight boolean toggles
color brightred "[[:space:]]+(yes|no)[[:space:]]*"
# Conky position descriptors
color brightred "(top_left|top_right|bottom_left|bottom_right)[[:space:]]*$"
# Numbers
color magenta "[[:space:]]+([[:space:]]*([0-9]\.?))+[[:space:]]*"
# variables
color brightred "\$\{?[a-zA-Z_0-9\# ]+\}?"
# Comments - match 0 or more spaces/tabs preceding the comment
# back assertions don't seem to work, so we have to assume that all
# comments will start on a new line (otherwise the RGB colour codes
# will cause their lines to get treated as comments
color green "^[[:space:]]*#.*"
# apply after comments (it's just easier)
# colour codes
color white "[[:space:]]+\#[0-9A-Fa-f]{6}"

22
nano/creole.nanorc Executable file
View file

@ -0,0 +1,22 @@
syntax "Creole" "\.creole$"
# Headers
color magenta "^=.*=$"
# Lists
color green "^[#*]+\s.*"
# Links and images
color cyan start="\[\[" end="\]\]"
color cyan start="\{\{" end="\}\}"
# Emphasis
color yellow "//.*//"
color brightyellow "\*\*.*\*\*"
# Pre and tables
color red start="\{\{\{" end="\}\}\}"
color red "\|"
color brightred "\|="
color ,red "\s+$"

15
nano/csh.nanorc Executable file
View file

@ -0,0 +1,15 @@
## Here is an example for c-shell scripts.
##
syntax "CSH" "\.csh$" "\.tcshrc" "\.cshrc" "\.login" "\.logout" "\.history"
header "^#!.*/(env +)?(t)?csh( |$)"
color green "\<(break|breaksw|case|continue|default|else|end|endif|endsw|exec|exit|foreach|goto|if|repeat|shift|switch|then|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "-[rfuMZwdgAUxlkebtAGoczpPsS]\>"
color green "-(A\:|M\:|U\:|G\:)\>"
color brightblue "\<(alias|bindkey|cat|cd|chmod|chown|complete|cp|echo|env|grep|install|ln|make|mkdir|mv|printenv|rm|sed|set|setenv|tar|touch|umask|unalias|uncomplete|unset|unsetenv)\>"
icolor brightgreen "^\s+[0-9A-Z_]+\s+\(\)"
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color cyan "(^|[[:space:]])#.*$"
color ,green "[[:space:]]+$"

26
nano/csharp.nanorc Executable file
View file

@ -0,0 +1,26 @@
syntax "C#" "\.cs$"
# Class
color brightmagenta "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
# Annotation
color magenta "@[A-Za-z]+"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color green "\<(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\>"
color cyan "\<(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\>"
color cyan "\<(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\>"
# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can)
color cyan "\<(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\>"
color brightred "\<(break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>?:!~%&|]"
color blue "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\([btnfr]|'|\"|\\)"
color magenta "\\u[A-Fa-f0-9]{4}"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="^\s*/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

10
nano/css.nanorc Executable file
View file

@ -0,0 +1,10 @@
## Here is an example for css files.
##
syntax "css" "\.css$"
color brightred "."
color brightyellow start="\{" end="\}"
color brightwhite start=":" end="[;^\{]"
color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$"
color brightblue start="\/\*" end="\\*/"
color green ";|:|\{|\}"

16
nano/csv.nanorc Executable file
View file

@ -0,0 +1,16 @@
# Rainbow CSV highlighting rules (12 column coverage)
# Inspired by https://github.com/mechatroner/rainbow_csv
syntax "CSV" "\.csv$"
color brightmagenta "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightcyan "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightblue "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightyellow "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightgreen "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightred "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color cyan "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
color magenta "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
color blue "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
color yellow "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?"
color green "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?"
color red "^("([^"]*"")*[^"]*",?)|^([^,]*,?))?"

47
nano/cu.nanorc Executable file
View file

@ -0,0 +1,47 @@
## Syntax highlights in GNU Nano for nVidia CUDA
## (C) 05/2012 Lilian Besson (lilian DOT besson AT normale DOT fr)
## Last version : http://besson.qc.to/NanoSyntax/cu.nanorc.
##
syntax "cu" "\.(cu)$" "rlwrap"
color brightred "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
color magenta "\<(goto|continue|break|return)\>"
## Specific CUDA stuffs
color red "\<(__host__|__global__|__device__|threadIdx|blockIdx|blockDim|cudaMalloc|cudaMemcpy|cudaMemcpyHostToDevice|cudaMemcpyDeviceToHost|dim3|grids|threads|cudaFree)\>"
## threads and blocks kernel call
## color cyan "<<<.*>>>"
color cyan start="<<<" end=">>>"
## Others
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## GCC builtins
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
##
## This string is VERY resource intensive!
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comment highlighting
color brightblue "//.*"
color brightwhite start="/\*" end="\*/"
## Trailing whitespace
color ,green "[[:space:]]+$"
## Parenthesis and brackets
color brightcyan "\<((|)|\+|\*|\\|;|:|,|\?|\.|$)\>"
## FIXME TODO README
color Red "\<(FIXME|README|TODO)\>"

30
nano/cython.nanorc Executable file
View file

@ -0,0 +1,30 @@
## Cython nanorc, based off of Python nanorc.
##
syntax "cython" "\.pyx$" "\.pxd$" "\.pyi$"
icolor brightred "def [ 0-9A-Z_]+"
icolor brightred "cpdef [ 0-9A-Z_]+\(.*?\):"
icolor brightred "cdef cppclass [ 0-9A-Z_]+\(.*?\):"
# Python Keyword Color
color green "\<(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>"
color brightmagenta "\<(continue|break|return)\>"
# Cython Keyword Color
color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>"
color red "\<(bint|char|double|int|public|void|unsigned)\>"
#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
#String Color
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
# Comment Color
color brightblue "#.*$"

20
nano/debian.nanorc Executable file
View file

@ -0,0 +1,20 @@
## Here is an exmaple for apt's sources.list
## Adapted from http://milianw.de/blog/Syntax-Highlighting-in-Nano
## (mail@milianw.de).
##
syntax "apt/sources.list" "sources\.list(\.old|~)?$"
# component
color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/) [^ ]+ .+$"
# distribution
color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/) [^ ]+"
# URI
color brightgreen "(http|file|ftp):/[^ ]+"
# cdroms
# [^\]] does not work...
color brightgreen "cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/"
# deb / deb-src
color yellow "^deb"
color yellow "^deb-src"
# comments
color brightblue "#.*"

5
nano/default.nanorc Executable file
View file

@ -0,0 +1,5 @@
syntax "default"
color green "^#.*"
color brightgreen "^##.*"
color yellow "^###.*"
#color green "^[ \t]*#.*

8
nano/delphi.nanorc Executable file
View file

@ -0,0 +1,8 @@
syntax "Delphi" "\.pas$"
color brightcyan "\<(boolean|byte|char|double|float|integer|long|new|short|this|transient|void)\>"
color brightred "\<(break|case|catch|continue|default|do|else|finally|for|if|then|return|switch|throw|try|while|function)\>"
#color cyan "\<(abstract|unit|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|$color brightyellow "\<(until|repeat|var|uses|type|begin|end|const)\>"
color magenta "\<(true|false|null|procedure)\>"
color brightblue "//.*"
color brightblue start="\{" end="\}"

11
nano/desc.nanorc Executable file
View file

@ -0,0 +1,11 @@
### all *desc files ( e.g. use.desc, use.local.desc )
syntax "use" "(\.|/|)desc$"
color green ".*\-"
color white "\:.*$"
color white "\-.*$"
color magenta "\:(\\.|[^'])*\-"
color blue "\-(\\.|[^'])*\:"
color yellow "\/(\\.|[^'])*\:"
color red "x86" "http\:\/\/.*$"
color brightred "\!\!(\\.|[^'])*\!\!" "DO NOT SET THIS FLAG YOURSELF!"
color green "#.*$"

8
nano/dot.nanorc Executable file
View file

@ -0,0 +1,8 @@
syntax "DOT" "\.(dot|gv)$"
color cyan "\<(digraph|edge|graph|node|subgraph)\>"
color magenta "\<(arrowhead|arrowsize|arrowtail|bgcolor|center|color|constraint|decorateP|dir|distortion|fillcolor|fontcolor|fontname|fontsize|headclip|headlabel|height|labelangle|labeldistance|labelfontcolor|labelfontname|labelfontsize|label|layers|layer|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|pagedir|page|peripheries|port_label_distance|rankdir|ranksep|rank|ratio|regular|rotate|samehead|sametail|shapefile|shape|sides|size|skew|style|tailclip|taillabel|URL|weight|width)\>"
color red "=|->|--"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="^\s*/\*" end="\*/"

2
nano/dotemacs.nanorc Executable file
View file

@ -0,0 +1,2 @@
syntax "dotemacs" "^.emacs$"
color green "^;.*"

10
nano/dotenv.nanorc Executable file
View file

@ -0,0 +1,10 @@
## Syntax highlight for .env files, eg. https://symfony.com/doc/current/components/dotenv.html
##
## Derived from sh.nanorc
##
syntax "dotenv" "\.env" "\.env\..+"
color green "(\(|\)|\$|=)"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color cyan "(^|[[:space:]])#.*$"
color ,green "[[:space:]]+$"

40
nano/dummy.nanorc Executable file
View file

@ -0,0 +1,40 @@
##########################################################################
##########################################################################
#
#
# D U M M Y Ruleset
#
#
# If you want to create your own rules you can use this simple example:
#
# syntax "Dummy" "(\.|/|)foo$" -> this creates the ruleset "Dummy" and it
# matches all filenames ending with foo
# "foo" -> this matches foo exactly
# "foo.*$" -> this matches files beginning with foo
#
#
#
# After you selected the files you can define rulesets for this file:
#
#
# color blue "#.*$" -> colors all after "#" blue on this line
# color red "\@" -> colors all "@" red, \ means to handle it _not_
# as a special sign
# color yellow "\<(profi)\>" -> colors only the word profi yellow
# color yellow "profi" -> colors all strings "profi" yellow, also in
# profile
# color black "[0-9]" -> colors all numbers black
# color magenta "'(\\.|[^'])*'" -> colors all between ' and ' magenta,
# but only on the same line
# color red "[A-Z0-9\_]+=" -> matches everything folowed by =
# color green "setenv|export" -> matches the string setenv OR export
# color cyan "^.*(foobar).*$" -> colors the whole line cyan, by matching foobar
# on that line
#
# color brightred,blue start="<!--" end="-->"
#
# -> colors all between <!-- and --> brightred on blue
# even if there are more lines between
#
#
###########################################################################

7
nano/ekghistory.nanorc Executable file
View file

@ -0,0 +1,7 @@
syntax "ekghistory" "(\.|/|).gg/history"
icolor cyan start="<" end=">"
icolor green ",(\\.|[^\"])*,"
color yellow "chatrecv"
color cyan "chatsend"
color brightwhite "[0-9]"

50
nano/elixir.nanorc Executable file
View file

@ -0,0 +1,50 @@
## Here is an example for Elixir.
##
syntax "Elixir" "\.ex$" "\.exs$"
header "^#!.*/(env +)?elixir( |$)"
## reserved words
color yellow "\<(case|cond|true|if|false|nil|when|and|or|not|in|fn|do|end|catch|rescue|after|else|with)\>"
color yellow "def[a-z]*"
## Constants
color brightblue "@[a-z]+"
## Elixir atoms
color magenta ":[0-9a-z_]+"
## Elixir Modules
color magenta "[A-Z][a-zA-Z0-9]*"
## Elixir types
color red "[A-Z][A-Za-z]+\.t\(\)"
## Some unique things we want to stand out
color brightyellow "\<(__CALLER__|__DIR__|__ENV__|__MODULE__|__STACKTRACE__)\>"
color brightyellow "\<(__add__|__aliases__|__build__|__block__|__deriving__|__info__|__protocol__|__struct__|__using__)\>"
## sigils
color brightmagenta "~[a-z]\/([^\/])*\/[a-z]*" "~[a-z]\|([^\|])*\|[a-z]*" "~[a-z]\"([^\"])*\"[a-z]*" "~[a-z]\'([^\'])*\'[a-z]*" "~[a-z]\(([^\(\)])*\)[a-z]*" "~[a-z]\[([^\[\]])*\][a-z]*" "~[a-z]\{([^\{\}])*\}[a-z]*" "~[a-z]\<([^\<\>])*\>[a-z]*"
## Strings, double-quoted
color green ""([^"]|(\\"))*""
## Expression substitution. These go inside double-quoted strings,
## "like #{this}".
color brightgreen "#\{[^}]*\}"
## Strings, single-quoted
color green "'([^']|(\\'))*'"
## Comments
color cyan "#.*$" "#$"
color brightcyan "##.*$" "##$"
## "Here" docs
color green start="\"\"\"" end="\"\"\""
## Some common markers
color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
## Trailing spaces
color ,green "[[:space:]]+$"

5
nano/email.nanorc Executable file
View file

@ -0,0 +1,5 @@
syntax "Email" "\.em(ai)?l$"
color magenta "^>([^>].*|$)"
color blue "^> ?>([^>].*|$)"
color green "^> ?> ?>.*"

26
nano/erb.nanorc Executable file
View file

@ -0,0 +1,26 @@
## A HTML+Ruby set for Syntax Highlighting .erb files (Embedded RubyRails Views etc) ERB
## (c) 2009, Georgios V. Michalakidis - g.michalakidis@computer.org
## Licensed under the CC (Creative Commons) License.
##
## https://github.com/geomic/ERB-And-More-Code-Highlighting-for-nano
syntax "ERB" "\.erb$" "\.rhtml$"
color blue start="<" end=">"
color white start="<%" end="%>"
color red "&[^;[[:space:]]]*;"
color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
icolor magenta "([ ]|^):[0-9A-Z_]+\>"
color brightyellow "\<(__FILE__|__LINE__)\>"
color brightmagenta "!/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
color brightblue "`[^`]*`" "%x\{[^}]*\}"
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
color brightgreen "#\{[^}]*\}"
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
color cyan "#[^{].*$" "#$"
color brightcyan "##[^{].*$" "##$"
color green start="<<-?'?EOT'?" end="^EOT"
color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
## Trailing spaces
color ,green "[[:space:]]+$"

15
nano/etc-hosts.nanorc Executable file
View file

@ -0,0 +1,15 @@
## Make /etc/hosts nicer to read, see `man hosts 5` to see the format
syntax "/etc/hosts" "hosts"
# IPv4
color yellow "^[0-9\.]+\s"
# IPv6
icolor green "^[0-9a-f:]+\s"
# interpunction
color normal "[.:]"
# comments
color brightblack "^#.*"

372
nano/etc-stuff.nanorc Executable file
View file

@ -0,0 +1,372 @@
## /etc/ stuff syntax
##
#syntax "etcconf.d" "conf.d/(\.|/|)"
#color magenta "\".*$"
#color blue "#.*$"
syntax "group" "group$"
color green "[0-9]\:.*$"
color brightwhite "[0-9]"
icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
syntax "modules" "modules.conf$" "modules.d/(\.|/|)"
color brightwhite "[0-9]"
color red "alias"
color brightred "(probeall|options)"
color green "#.*$"
syntax "modprobe" "modprobe.conf$"
color brightwhite "[0-9]"
color red "alias"
color brightred "options"
color magenta "[a-zA-Z0-9\_]+="
color green "#.*$"
syntax "hosts" "hosts$"
#color brightwhite "[0-9]"
color yellow "^[[:space:]]*[.0-9A-Z_]*.*$"
color brightblue "^[[:space:]]*[.0-9A-Z_]*"
color red "127.0.0.1"
color cyan "\:\:"
color green "#.*$"
syntax "mplayer" "mplayer.conf$"
color brightgreen "\=.*$"
color brightred "no"
color cyan "\="
color green "#.*$"
syntax "mplayerplugin" "mplayerplug\-in.conf$"
color brightgreen "\=.*$"
color brightred "0"
color cyan "\="
color green "#.*$"
syntax "sensors" "sensors.conf$"
color brightyellow "\".*$"
color yellow "\<(label|compute|set|chip)\>"
color green "#.*$"
syntax "sysctl" "sysctl.conf$"
color brightwhite "[0-9]"
color cyan "\="
color green "#.*$"
syntax "dircolors" "DIR_COLORS$"
color yellow "\<(TERM|NORMAL|FILE|DIR|LINK|FIFO|SOCK|DOOR|BLK|CHR|ORPHAN|MISSING|SETUID|SETGID)\>"
color yellow "\<(STICKY|EXEC|STICKY_OTHER_WRITABLE|OTHER_WRITABLE)\>"
color brightblack "[0-9][0-9]\;.*$"
color cyan "\.[.0-9A-Z_]*[[:space:]]"
color green "#.*$"
syntax "modes" "fb.modes$"
color yellow "\<(mode|endmode)\>"
color cyan "\<(geometry|timings|hsync|vsync|double)\>"
color green "#.*$"
syntax "serial" "serial.conf$"
color brightwhite "[0-9]"
color cyan "\<(uart|port|irq|fourport)\>"
color green "#.*$"
syntax "services" "services$"
color cyan "/tcp"
color magenta "udp"
color brightblack "/"
color brightwhite "[0-9]"
color green "#.*$"
syntax "crontab" "crontab$"
color brightwhite "[0-9]"
color cyan "\*"
color yellow "[[:space:]]/.*$"
color brightblack "(&|>)"
color green "#.*$"
syntax "nscd" "nscd.conf$"
color cyan "(passwd|group|hosts)"
color yellow "([0-9]|yes)"
color green "#.*$"
syntax "rsync" "rsyncd.conf$"
color cyan "(hosts|(u|g)id|pid\ file|use\ chroot|read\ only|address|max\ connections|motd\ file)"
color cyan "(log\ format|syslog\ facility|timeout)"
color yellow "(path|comment|exclude)"
color brightyellow start="\[" end="\]"
color green "#.*$"
syntax "lilo" "lilo.conf$"
color cyan "(boot|map|install|menu\-scheme|timeout|delay|prompt|vga|default)"
color brightwhite "[0-9]"
color magenta "(lba32|linear|compact|image)"
color brightyellow "(root|label|read\-only)"
color yellow "\/.*$"
color green "#.*$"
syntax "hdparm" "hdparm$"
color cyan "(pata|sata)_all_args"
color cyan "[A-Za-z0-9]*_args"
color magenta "\".*$"
color green "#.*$"
syntax "ini" "\.ini$"
color yellow "\[.*]"
color green "\;.*$"
syntax "smbconf" "smb.conf$"
color brightcyan "\=.*$"
color cyan "\/.*$"
color brightred "(no|No)"
color brightgreen "(yes|Yes)"
color brightyellow "(workgroup.*$|hosts\ allow.*$|interfaces.*$|netbios\ name.*$)"
color yellow "\[.*]|\="
icolor magenta "^[[:space:]]*[.A-Z]*"
icolor magenta "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*"
icolor magenta "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*"
color green "\;.*$"
color green "#.*$"
syntax "mke2fs" "mke2fs.conf$"
color cyan "(base_features|blocksize|inode_ratio)"
color yellow "(small|floppy|news|largefile|largefile4)"
color brightwhite "[0-9]"
color brightyellow start="\[" end="\]"
color blue "\{|\}"
color brightblack "\="
color green "#.*$"
#this on may need fewer colors ;)
syntax "squidconf" "squid.conf$"
color brightyellow "(http_port|hierarchy_stoplist|maximum_object_size|cache_dir|dns_testnames)"
color brightyellow "(coredump_dir|pipeline_prefetch|cache_mgr|visible_hostname|ftp_user|client_netmask)"
color cyan "(acl|refresh_pattern|quick_abort_(min|max)|(cache|memory)_replacement_policy|(access|cache|cache_store)_log|cache_host)"
color yellow "((http|icp|snmp)_access|snmp_port|parent|sibling|anonymize_headers|fake_user_agent)"
color brightgreen "(allow|transparent|[[:space:]]on)"
color brightred "(deny|reload\-into\-ims|override\-expire|override\-lastmod|[[:space:]]off)"
color magenta "(src|dst|method)"
color brightcyan "(seconds|minutes|hours|(G|M|K)B)"
color brightblack "[0-9]"
color green "#.*$"
syntax "distcchosts" "/etc/distcc/hosts$"
color brightblue "[0-9]"
color yellow "localhost"
color magenta "(/|@|:)"
color green "#.*$"
syntax "logrotate" "logrotate.conf$"
color brightwhite "[0-9]"
color magenta start="/" end="[[:space:]]"
color cyan "(create|compress|include|notifempty|nomail|noolddir|\{|\})"
color yellow "(weekly|daily|rotate|postrotate|sharedscripts)"
color magenta "logrotate"
color green "#.*$"
syntax "ppppears" "/etc/ppp/peers/(\.|/|)"
color brightwhite "user.*$"
color brightyellow "user"
color brightyellow start="\"" end="\""
color yellow "lcp\-(echo\-(interval|failure)|max\-configure|restart)"
color yellow "(debug|sync|no(ccp|pcomp|accomp)|deflate|bsdcomp|usepeerdns|pty)"
color cyan "(lock|defaultroute|noipdefault|noauth|holdoff|maxfail|persist|asyncmap|detach|updetach|cdtrcts)"
color brightwhite "[0-9]"
color magenta "(\@|\,|\.)"
color green "#.*$"
syntax "dhcpconf" "dhcpd.conf$"
icolor brightgreen "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*|ad\-hoc|interim"
color cyan "(authoritative|ddns\-update\-style|subnet|host|log\-facility)"
color brightblue "(netmask|routers|option|(netbios|domain)-nam(e|e-servers)|(default|max)-lease-time)|range|broadcast\-address|subnet-mask"
color brightyellow start="\"" end="\""
color yellow "(hardware|ethernet|fixed\-address)"
color brightblack "\:|\;|\{|\})""
color green "#.*$"
syntax "hibernateconf" "/etc/hibernate/common.conf$"
color magenta "^[[:space:]]*[.A-Z]*"
color brightwhite start="'" end="'"
color brightgreen "yes"
color brightred "no"
color brightcyan "auto"
color green "#.*$"
color brightcyan "##.*$"
color yellow "###.*$"
color cyan "####.*$"
syntax "nsswitch" "nsswitch.conf$"
icolor cyan "^[[:space:]]*[.0-9A-Z_]*:"
color magenta "\:"
color green "#.*$"
syntax "sane" "sane.d/(\.|/|)"
color brightgreen "(scsi|usb|parport|auto)"
color brightred "option"
color yellow "(override|vendor|model)"
color cyan "/.*$"
color green "#.*$"
syntax "syslogconf" "syslog.conf$"
icolor cyan "(\*|\;|\.|\,|\\)"
color magenta "/.*$"
color brightblue "-.*$"
color brightwhite "\="
color green "#.*$"
## these colors need to change...
syntax "udevrules" "\.rules$"
color brightwhite "[0-9]"
color brightblack "(ACTION|SUBSYSTEM|DEVPATH|OPTIONS|WAIT_FOR_SYSFS|ENV|KERNEL|NAME|MODE|GROUP|SYMLINK|DRIVERS|PROGRAM|RUN)"
color brightblack "(GOTO|IMPORT|ATTRS|SUBSYSTEMS|DVB|IR|BUS|SYSFS|ATTR|LABEL)"
color yellow "(add|net|scsi|drivers|module|address|bus|devices|ioerr_cnt|ignore_device|svga|video|tt(y(S|USB)|y|s)|last_rule)"
color yellow "(pnp|(au|ra)dio|tape|disk|snd|microcode|f(b|d|loppy|irmware)|usb|lp|kbd|parport|block|ide|misc|netlink|input)"
color yellow "(mouse|event|joystick|psmouse|atkbd|spkr|pcspkr|ir|dvb|persistent|storage|end|scanner|sound|dialout|console)"
color yellow "(cdrom|cdrw|dvd|dvdrw|isdn|pty|vcs|vcsa|ippp|dcbri|ircomm|capi|card|nvidia|rtc|agpgart|psaux|ptmx|sd|dasd|)"
color yellow "(ataraid|cciss|ida|rd|3dfx|control|hw|pcm|midi|timer|seq|cpu|msr|dm|i2c|mice|js|ts|loop|md|uinput|inotify|aoe)"
color brightyellow "(ID_(SERIAL|PATH|CLASS|EDD|CDROM|CDROM_(DVD|DVD_R|CD_RW))|program|parent|removable|GENERATED|COMMENT)"
color brightyellow "(id(Vendor|Product)|PHYSDEVBUS|(UDEV|UDEVD)_EVENT|INTERFACE_NEW|MODALIAS|modalias|alias|name)"
color brightred "(\%(k|r|c|n))"
color blue "(\;|\.|\"|\,)"
color brightblue "(\=|\*|\?)"
color green "#.*$"
syntax "mailalias" "/etc/mail/aliases$"
icolor brightblue "^[[:space:]]*[.0-9A-Z_]*:"
icolor brightblue "^[[:space:]]*[.0-9A-Z_]*\-[.0-9A-Z_]*:"
color yellow "(\/.*$|root)"
color green "#.*$"
syntax "wifiradar" "wifi-radar.conf$"
color brightwhite "[0-9]"
color yellow "((f|F)alse|eth[.0-9])|yes|no|[[:space:]]auto|ssid"
color brightgreen start="\[" end="\]"
color green "#.*$"
syntax "irssi" "irssi.conf$"
icolor brightwhite "(^[[:space:]]*[.0-9A-Z_]*[[:space:]]=|address|name|chatnet|port|autojoin)"
color brightblue ""(\\.|[^\"])*""
color yellow "(\{|\}|\;)"
color brightblack "\="
color brightgreen "(Y|y)es|[0-9]"
color brightred "No"
color blue "\""
color cyan "(servers|chatnets|channels|aliases|statusbar)"
color green "#.*$"
syntax "proftpd" "proftpd.conf$"
icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
color brightyellow "ServerType|DefaultServer|ServerIdent|Port[[:space:]]|Umask|MaxInstances|User|Group"
color yellow "(UserAlias|UseFtpUsers)"
color brightgreen "([[:space:]]on|[0-9]|AllowAll)"
color brightred "(off|DenyAll)"
icolor cyan start="<" end=">"
icolor cyan start=""" end="""
color cyan "xinetd|inetd|standalone"
color green "#.*$"
syntax "xinetd" "xinetd.conf$"
icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
color brightgreen "([0-9]|yes)"
color brightred "(off|no)"
color magenta "defaults"
color brightblack "="
color brightyellow "(\{|\})"
color cyan "/.*$"
color green "#.*$"
syntax "xinetd.d" "xinetd.d/(\.|/|)"
icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
color brightgreen "([0-9]|yes)"
color brightred "(off|[[:space:]]no)"
color brightblack "="
color brightyellow "(\{|\})"
color cyan "/.*$"
color green "#.*$"
syntax "localegen" "locale(.gen|s.build)"
color cyan "ISO.*$"
color yellow "UTF.*$"
color green "#.*$"
syntax "clamd" "clamd.conf$"
color brightblack "[0-9]M"
color brightwhite "[0-9]"
color yellow "^[[:space:]]*[.0-9A-Z_]*"
color cyan "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
color green "#.*$"
syntax "grcconf" "grc.conf$"
color cyan "conf\..*$"
color yellow "\(.*$|\\.*$"
color green "#.*$"
syntax "freshclamconf" "freshclam.conf$"
icolor brightcyan "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z_]*"
color cyan "\/.*$|[0-9]"
icolor yellow "^[[:space:]]*[.A-Z]*"
color green "#.*$"
syntax "colorlightbg" "colordiffrc-lightbg$"
color brightblue "=.*$"
icolor yellow "^[[:space:]]*[.A-Z_]*"
color brightblack "="
color green "#.*$"
syntax "etc-limits" "limits$"
icolor yellow "^[[:space:]]*[.A-Z_]*"
color green "#.*$"
syntax "screenrc" "screenrc$"
icolor yellow "^[[:space:]]*[.A-Z_]*"
color blue ""(\\.|[^\"])*""
color brightwhite "[0-9]"
color red "[[:space:]]off"
color brightgreen "[[:space:]]on"
color magenta "'.*$"
color magenta "[A-Z0-9\_]+="
color green "#.*$"
syntax "fdparm" "fdprm$"
icolor brightgreen "^[[:space:]]*[0-9\/a-z]*"
color green "#.*$"
syntax "securetty" "securetty$"
color cyan "console"
color brightwhite "[0-9]"
color red "vc"
color brightgreen "tt(y|yS|s)"
color green "#.*$"
syntax "logindefs" "login.defs"
icolor yellow "^[[:space:]]*[0-9\/a-z_]*"
color brightwhite "[0-9]"
color brightred "no"
color brightgreen "yes"
color green "#.*$"
syntax "mysql" "my.cnf"
icolor yellow "^[[:space:]]*[0-9\/a-z_-]*"
color cyan start="\[" end="\]"
color green "#.*$"
syntax "manconf" "man.conf$"
icolor yellow "^[[:space:]]*[.A-Z_0-9]*"
color brightgreen "/.*$"
color green "#.*$"
syntax "sshdconf" "sshd_config$"
icolor yellow "^[[:space:]]*[.A-Z_0-9]*"
color brightwhite "[0-9]"
color brightblue "/.*$"
color brightred "no"
color brightgreen "yes"
color green "#.*$"
#these look stupid if you ask me, but hey do better :P
syntax "protocols" "protocols$"
icolor brightgreen "[0-9][[:space:]][[:space:]]*[.A-Z0-9-]*"
icolor brightblue "[.a-z0-9][[:space:]][[:space:]]*[.0-9]"
icolor brightblue "[.a-z0-9][[:space:]][[:space:]]*[.0-9][.0-9]"
icolor brightblue "[.a-z0-9][[:space:]][[:space:]]*[.0-9][.0-9][.0-9]"
icolor yellow "^[[:space:]]*[.A-Z0-9-]*"
color green "#.*$"

29
nano/etcxml.nanorc Executable file
View file

@ -0,0 +1,29 @@
##############################################################################
#
# Syntax highlighting for XML files (/etc/fonts/*)
#
# Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org
# License: GPL 2 or later
#
# Version: 2004-02-25
#
##############################################################################
syntax "etcxml" "/etc/fonts/(\.|/|)" "/etc/xdg/(\.|/|)"
color white "^.+$"
color green start="<" end=">"
color cyan "<[^> ]+"
color cyan ">"
color yellow start="<!DOCTYPE" end="[/]?>"
color yellow start="<!--" end="-->"
color red "&[^;]*;"
syntax "etcxml2" "gentoorc$"
color white "^.+$"
color green start="<" end=">"
color cyan "<[^> ]+"
color cyan ">"
color yellow start="<!DOCTYPE" end="[/]?>"
color yellow start="<!--" end="-->"
color red "&[^;]*;"

15
nano/fish.nanorc Executable file
View file

@ -0,0 +1,15 @@
## Here is an example for Fish shell scripts.
##
syntax "Fish" "\.fish$"
header "^#!.*/(env +)?fish( |$)"
icolor brightgreen "^[0-9A-Z_]+\(\)"
color green "\<(alias|begin|break|case|continue|contains|else|end|for|function|if|math|return|set|switch|test|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "\<(and|isatty|not|or|in)\>"
color yellow "--[a-z-]+"
color brightmagenta "\ -[a-z]+"
color brightblue "\<(bg|bind|block|breakpoint|builtin|cd|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set_color|status|trap|type|ulimit|umask|vared)\>"
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color cyan "(^|[[:space:]])#.*$"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color ,green "[[:space:]]+$"

50
nano/fortran.nanorc Executable file
View file

@ -0,0 +1,50 @@
## Here is an example for Fortran 90/95
syntax "fortran" "\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
#color red "\<[A-Z_]a[0-9A-Z_]+\>"
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)\>"
#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
# Add preprocessor commands.
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
## String highlighting.
icolor cyan "<[^= ]*>" ""(\\.|[^"])*""
icolor cyan "<[^= ]*>" "'(\\.|[^"])*'"
## Comment highlighting
icolor brightred "!.*$" "(^[Cc]| [Cc]) .*$"

39
nano/fsharp.nanorc Executable file
View file

@ -0,0 +1,39 @@
syntax "F#" "\.fs$" "\.fsx$"
# Type and Module Definitions
color brightgreen "type +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
color brightgreen "module +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
color brightmagenta "\<(List|Seq|Array|Option|Choice|Map|list|seq|array|option|choice|ref|in|out)\>"
color brightgreen "<+[A-Za-z0-9'^]+ *((:) +[A-Za-z0-9'^.]+)?>"
# Attributes
color brightmagenta "[<+[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?>]"
# Annotation
color magenta "@[A-Za-z]+"
# Basic Types
color brightgreen "\<(bool|byte|sbyte|int16|uint16|int|uint32|int64|uint64|char|decimal|double|float|float32|single|nativeint|IntPtr|unativeint|UIntPtr|object|string)\>"
# Keywords
color cyan "\<(abstract|and|let|as|assert|base|begin|class|default|delegate|do|for|to|in|while|done|downcast|downto|elif|if|then|else|end|exception|extern|false|finally|try|fixed|fun|function|match|global|inherit|inline|interface|internal|lazy|let!|match!|member|module|mutable|namespace|new|not|not struct|null|of|open|or|override|private|public|rec|return|return!|select|static|struct|true|with|type|upcast|use|use!|val|void|when|yield|yield!)\>"
color red "[-+/*=<>?:!~%&|]"
color blue "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>"
color magenta "\\([btnfr]|'|\"|\\)"
color magenta "\\u[A-Fa-f0-9]{4}"
# String
color yellow ""(\\.|[^"])*""
# Comments
color brightblack "(^|[[:space:]])//.*"
color brightblack start="^\s*/\*" end="\*/"
color brightblack start="\(\*" end="\*\)"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"
color red "#if .+"
color red "#endif"
color white start="``" end="``"

21
nano/gemini.nanorc Executable file
View file

@ -0,0 +1,21 @@
## syntax highlighting for gemini:// markup language
syntax gemini "\.(gemini|gmi)$"
# Heading levels
color brightgreen "^#.*"
color brightcyan "^##.*"
color brightmagenta "^###.*"
# Link Text
color brightred "^=>\s*\S+\s+.*"
# Link URL
color green "^=>\s*\S+"
# Link Prefix
color yellow "^=>"
# Bullet Lists
color brightblue "^\*.*"
# Monospaced Blocks
color white,black start="^```" end="^```"

53
nano/genie.nanorc Executable file
View file

@ -0,0 +1,53 @@
## Here is an example for Genie.
syntax "genie" "\.gs$"
# Namespace.
color magenta "\<(uses|namespace)\>"
# Data types.
color green "\<(bool|byte|char|date|datetime|decimal|double|float|int|long|object|sbyte|short|single|string|ulong|ushort)\>"
# Definitions.
color brightred "\<(const|class|construct|def|delegate|enum|exception|extern|event|final|get|init|inline|interface|override|prop|return|set|static|struct|var|virtual|weak)\>"
# Keywords.
color red "\<(abstract|as|and|break|case|cast|continue|default|delete|div|do|downto|dynamic|else|ensures|except|extern|finally|for|if|implements|in|isa|is|lock|new|not|of|out|or|otherwise|pass|private|raise|raises|readonly|ref|requires|to|try|unless|when|while)\>"
# Special variables.
color brightcyan "\<(self|super)\>"
# Null value.
color brightyellow "\<(null)\>"
# Boolean.
color yellow "\<(false|true)\>"
# Builtin functions.
color cyan "\<(array|assert|dict|list|max|min|print|prop|sizeof|typeof)\>"
# Numbers.
color brightmagenta "[0-9][0-9\.]*(m|ms|d|h|s|f|F|l|L)?"
# Regular expression.
color brightgreen "/(\\.|[^/])*/"
# Double quoted string.
color brightblue ""(\\.|[^"])*""
# Single quoted string.
color brightblue "'(\\.|[^'])*'"
# Multiline string.
color blue start=""""" end="""""
# Line comment.
color yellow "(^|[[:space:]])//.*"
# Block comment.
color yellow start="^\s*/\*" end="\*/"
# Trailing whitespace.
color ,green "[[:space:]]+$"
# Spaces in front or rear of tabs.
color ,red " + +| + +"

50
nano/gentoo.nanorc Executable file
View file

@ -0,0 +1,50 @@
## Here is an example for ebuilds/eclasses
##
syntax "ebuild" "\.e(build|class)$"
## All the standard portage functions
color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
## Highlight bash related syntax
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "-(e|d|f|r|g|u|w|x|L)\>"
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
## Highlight variables ... official portage ones in red, all others in bright red
color brightred "\$\{?[a-zA-Z_0-9]+\}?"
color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>"
color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
## Highlight portage commands
color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\>"
color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
# color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
# color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
# color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>"
## Highlight common commands used in ebuilds
color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
## Highlight comments (doesnt work that well)
color yellow "#.*$"
## Highlight strings (doesnt work that well)
color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
## Trailing space is bad!
color ,green "[[:space:]]+$"
## Here is an example for Portage control files
##
syntax "/etc/portage" "\.(keywords|mask|unmask|use)$"
## Base text:
color green "^.+$"
## Use flags:
color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+"
color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+"
## Likely version numbers:
color magenta "-[[:digit:]].*([[:space:]]|$)"
## Accepted arches:
color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>"
color white "[[:space:]][~-]?\*"
## Categories:
color cyan "^[[:space:]]*.*/"
## Masking regulators:
color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
## Comments:
color yellow "#.*$"

80
nano/git.nanorc Executable file
View file

@ -0,0 +1,80 @@
syntax "git-config" "git(config|modules)$|\.git/config$"
color brightcyan "\<(true|false)\>"
color cyan "^[[:space:]]*[^=]*="
color brightmagenta "^[[:space:]]*\[.*\]$"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
# This code is free software; you can redistribute it and/or modify it under
# the terms of the new BSD License.
#
# Copyright (c) 2010, Sebastian Staudt
# A nano configuration file to enable syntax highlighting of some Git specific
# files with the GNU nano text editor (http://www.nano-editor.org)
#
syntax "git-commit" "COMMIT_EDITMSG|TAG_EDITMSG"
# Commit message
color yellow ".*"
# Comments
color brightblack "^#.*"
# Files changes
color white "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
color red "#[[:space:]]deleted:"
color green "#[[:space:]]modified:"
color brightgreen "#[[:space:]]new file:"
color brightblue "#[[:space:]]renamed:"
# Untracked filenames
color black "^# [^/?*:;{}\\]+\.[^/?*:;{}\\]+$"
color brightmagenta "^#[[:space:]]Changes.*[:]"
color brightred "^#[[:space:]]Your branch and '[^']+"
color brightblack "^#[[:space:]]Your branch and '"
color brightwhite "^#[[:space:]]On branch [^ ]+"
color brightblack "^#[[:space:]]On branch"
# Recolor hash symbols
# Recolor hash symbols
color brightblack "#"
# Trailing spaces (+LINT is not ok, git uses tabs)
color ,green "[[:space:]]+$"
# This syntax format is used for interactive rebasing
syntax "git-rebase-todo" "git-rebase-todo"
# Default
color yellow ".*"
# Comments
color brightblack "^#.*"
# Rebase commands
color green "^(e|edit) [0-9a-f]{7,40}"
color green "^# (e, edit)"
color brightgreen "^(f|fixup) [0-9a-f]{7,40}"
color brightgreen "^# (f, fixup)"
color brightwhite "^(p|pick) [0-9a-f]{7,40}"
color brightwhite "^# (p, pick)"
color blue "^(r|reword) [0-9a-f]{7,40}"
color blue "^# (r, reword)"
color brightred "^(s|squash) [0-9a-f]{7,40}"
color brightred "^# (s, squash)"
color yellow "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
color yellow "^# (x, exec)"
# Recolor hash symbols
color brightblack "#"
# Commit IDs
color brightblue "[0-9a-f]{7,40}"

1
nano/gitcommit.nanorc Symbolic link
View file

@ -0,0 +1 @@
git.nanorc

15
nano/glsl.nanorc Executable file
View file

@ -0,0 +1,15 @@
syntax "GLSL" "\.(frag|vert|fp|vp|glsl)$"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color green "\<(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\>"
color green "\<gl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\>"
color cyan "\<(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\>"
color brightred "\<(break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>?:!~%&|^]"
color blue "\<([0-9]+|0x[0-9a-fA-F]*)\>"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="^\s*/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

23
nano/go.nanorc Executable file
View file

@ -0,0 +1,23 @@
syntax "GO" "\.go$"
comment "//"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color brightblue "\<(append|cap|close|complex|copy|delete|imag|len)\>"
color brightblue "\<(make|new|panic|print|println|protect|real|recover)\>"
color green "\<(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\>"
color green "\<(uintptr|byte|rune|string|interface|bool|map|chan|error)\>"
color cyan "\<(package|import|const|var|type|struct|func|go|defer|nil|iota)\>"
color cyan "\<(for|range|if|else|case|default|switch|return)\>"
color brightred "\<(go|goto|break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>!~%&|^]|:="
color blue "\<([0-9]+|0x[0-9a-fA-F]*)\>|'.'"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\[abfnrtv'\"\\]"
color magenta "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
color yellow "`[^`]*`"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="^\s*/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

45
nano/gophermap.nanorc Executable file
View file

@ -0,0 +1,45 @@
## syntax for gophernicus gophermaps
syntax gophermap "\.(gophermap|gph)$"
# Port Numbers
color yellow "^.[ -~]*.[ -~]*.[ -~]*.[ -~]+"
# Domains
color red "^.[ -~]*.[ -~]*.[ -~]+"
# Resource Path (no directories)
color green "^[^1][ -~]*.[ -~]*"
# Directories (w/ Name)
color brightmagenta "^1[ -~]*.[ -~]*"
# Names
color brightblue "^[ -~]+."
# Directories (w/o Name)
color brightyellow "^1[ -~]+.$"
# URLs
color brightcyan "URL:.*"
# Types
# General
color magenta "^."
# HTML & Interactive Content
color brightcyan "^(h|7|8)"
# Info Text
color cyan "^i.*"
color cyan "^[ -~]*$"
color blue "^i"
# Special Tags & Characters
color brightgreen "^(!|-|:|~|%|=|\*|\.).*"
# Comments
color white,blue "#.*"

23
nano/gradle.nanorc Executable file
View file

@ -0,0 +1,23 @@
syntax "groovy" "\.(groovy|gradle)$"
# Keywords
color brightblue "\<(boolean|byte|char|double|enum|float|int|long|new|short|super|this|transient)\>"
color brightblue "\<(as|assert|break|case|catch|continue|default|do|else|finally|for|goto|if|in|return|switch|throw|try|while)\>"
color brightblue "\<(abstract|class|extends|implements|import|interface|native|package|private|protected|public|static|strictfp|synchronized|throws|trait|void|volatile)\>"
color brightblue "\<(const|def|final|instanceof)\>"
color brightblue "\<(true|false|null)\>"
# Strings
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
# Interpolation
icolor yellow "\$\{[^\}]*}"
# Comments
color cyan "^//.*"
color cyan "\s//.*"
color cyan start="^/\*(\*)?" end="\*/"
color cyan start="\s/\*(\*)?" end="\*/"
# Trailing whitespace
color ,green "[[:space:]]+$"

24
nano/groff.nanorc Executable file
View file

@ -0,0 +1,24 @@
## Here is an example for groff.
##
syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac."
## The argument of .ds or .nr
color cyan "^\.(ds|nr) [^[[:space:]]]*"
## Single character escapes
color brightmagenta "\\."
## Highlight the argument of \f or \s in the same color
color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]"
## Newlines
color cyan "(\\|\\\\)n(.|\(..)"
color cyan start="(\\|\\\\)n\[" end="]"
## Requests
color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
## Comments
color yellow "^\.\\".*$"
## Strings
color green "(\\|\\\\)\*(.|\(..)"
color green start="(\\|\\\\)\*\[" end="]"
## Characters
color brightred "\\\(.."
color brightred start="\\\[" end="]"
## Macro arguments
color brightcyan "\\\\\$[1-9]"

16
nano/haml.nanorc Executable file
View file

@ -0,0 +1,16 @@
syntax "haml" "\.haml$"
color cyan "-|="
color white "->|=>"
icolor cyan "([ ]|^)%[0-9A-Z_]+\>"
icolor magenta ":[0-9A-Z_]+\>"
icolor yellow "\.[A-Z_]+\>"
## Double quote & single quote
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Vars
color brightgreen "#\{[^}]*\}"
color brightblue "(@|@@)[0-9A-Z_a-z]+"
## Comments
color brightcyan "#[^{].*$" "#$"

35
nano/haskell.nanorc Executable file
View file

@ -0,0 +1,35 @@
syntax "haskell" "\.hs$"
comment "--"
## Keywords
color red "\<(as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)\>"
## Various symbols
color cyan "(\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\})"
## Operators
color magenta "(==|/=|&&|\|\||<|>|<=|>=)"
## Various symbols
color cyan "(->|<-|=>)"
color magenta "\.|\$"
## Data constructors
color magenta "\<(True|False|Nothing|Just|Left|Right|LT|EQ|GT)\>"
## Data classes
color magenta "\<(Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)\>"
## Strings
color yellow ""([^\"]|\\.)*""
## Chars
color brightyellow "'([^\']|\\.)'"
## Comments
color green "--.*"
color green start="\{-" end="-\}"
color brightred "undefined"
## Trailing spaces
color ,green "[[:space:]]+$"

10
nano/havp.nanorc Executable file
View file

@ -0,0 +1,10 @@
syntax "havp" "havp.config$"
color brightred "REMOVETHISLINE"
color red "(deleteme|false)"
color brightgreen "true"
color brightwhite "[0-9]"
color yellow "\ \/.*$"
color brightyellow "--[a-z]*"
color cyan "^[[:space:]]*[.A-Z_0-9]*"
color green "#.*$"

36
nano/hcl.nanorc Executable file
View file

@ -0,0 +1,36 @@
## Syntax highlighting for Hashicorp Terraform / HCL files.
# See: https://github.com/hashicorp/hcl
# Original author: John Boero
# License: GPLv3 or newer
syntax "hcl" "\.(tf|hcl)$"
# No comments are permitted in JSON.
comment ""
# Numbers (used as value).
color green ":[[:space:]]*\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee]?[-+]?[0-9]+)?"
# Values (well, any string).
color brightmagenta "\".+\""
# Hex numbers (used as value).
color green ":[[:space:]]*\"#[0-9abcdefABCDEF]+\""
# Escapes.
color green "\\\\" "\\\"" "\\[bfnrt]" "\\u[0-9abcdefABCDEF]{4})"
# Special words.
color green "(true|false|null|output|path|vault|description|default|value)"
color brightgreen "(variable|terraform|resource|provider|module)"
# Names (very unlikely to contain a quote).
color brightblue "\"[^"]+\"[[:space:]]*:"
# Brackets, braces, and separators.
color brightblue "\[" "\]"
color brightred "\{" "\}"
color brightred "," ":"
# Comments.
color cyan "(^|[[:space:]]+)(//|#).*$"
# Trailing whitespace.
color ,green "[[:space:]]+$"

19
nano/histoire.nanorc Executable file
View file

@ -0,0 +1,19 @@
## Coloration syntaxique pour les devoirs d'Histoire
## très limité !
## Auteur: Lilian Besson
## On associe ce fichier à l'extension de fichier .histoire
## (qui n'est pas celle d'un vrai type de fichier, mais ce n'est pas grave)
syntax "histoire" "\.histoire$"
## Maintenant, si ce fichier 'histoire.nanorc' est chargé dans le '~/.nanorc'
## par la ligne :
## include "~/.nano/histoire.nanorc"
## cela permet d'éditer les fichiers truc.histoire comme des devoir d'Histoire
color brightgreen "[0-9][0-9]*"
color brightgreen "-[0-9][0-9]*"
## On définit les dates comme des nombres entre -9999 et 9999
color brightblue "[A-Z][A-Za-z]*"
## On définit les noms propres comme des mots commençant par une majuscule

1
nano/html.j2.nanorc Symbolic link
View file

@ -0,0 +1 @@
html.nanorc

7
nano/html.nanorc Executable file
View file

@ -0,0 +1,7 @@
## Here is a short improved example for HTML.
##
syntax "html" "\.htm[l]?$"
color brightblue start="<" end=">"
color red "&[^;[[:space:]]]*;"
color yellow "".*"|qq\|.*\|"
color red "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="

15
nano/i3.nanorc Executable file
View file

@ -0,0 +1,15 @@
## Here is an example for i3 Window Manager config
##
syntax "i3" "i3/config"
header "^(.*)i3 config file"
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "-[Ldefgruwx]\>"
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
icolor brightgreen "^\s+[0-9A-Z_]+\s+\(\)"
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color cyan "(^|[[:space:]])#.*$"
color ,green "[[:space:]]+$"

20
nano/ical.nanorc Executable file
View file

@ -0,0 +1,20 @@
syntax "iCal" "\.ics$"
color green start="^BEGIN:VCALENDAR$" end="^END:VCALENDAR$"
color yellow start="^BEGIN:VCARD$" end="^END:VCARD$"
color brightblue start="^BEGIN:VJOURNAL$" end="^END:VJOURNAL$"
color magenta start="^BEGIN:VTIMEZONE$" end="^END:VTIMEZONE"
color cyan start="^BEGIN:VEVENT$" end="^END:VEVENT$"
color brightmagenta start="^BEGIN:VALARM$" end="^END:VALARM$"
color brightcyan start="^BEGIN:VFREEBUSY$" end="^END:VFREEBUSY$"
# URLs
color blue start="(https?|ftp)://" end="^[^ ]"
# email
icolor blue "mailto:[^ ]+"
icolor white "mailto:"
# parameters
color brightyellow start="^[-A-Z0-9]" end=":"
color white "^[-A-Z0-9]+"
# section markers
color red "^(BEGIN|END):.*$"

18
nano/info.nanorc Executable file
View file

@ -0,0 +1,18 @@
## *.Info file syntax
##
syntax "info" "Info.txt$"
color green "[0-9]"
color brightblue "\<(video|codec|bitrate|width|height|General|FileSize|Format|OveralBitRate|PlayTime)\>"
color brightblue "\<(Video|Codec|Bitrate|BitRate|Width|Height|AspectRatio|FrameRate|Bits|SamplingRate)\>"
color brightblue "\<(audio|channel|V(i|I)DEO|CODEC|FORMAT|B(I|i)TRATE|METHOD|R(I|i)P|AUD(I|i)O|RESOLUT(I|i)ON|GENRE)\>"
color brightblue "\<(Audio|Channel|Sound|ASPECT|RAT(i|I)O|MOV(I|i)E|S(i|I)ZE|RUNT(I|i)ME)\>"
color magenta "Movie.*$"
color blue "\<(KHz|kHz|Kbps|fps|MB|KB|channels|MiB|min|kbit\/s|Min)\>"
color brightyellow "\<(DivX|XviD|MPEG\-4|AAC\ LC|H\.264|LAME|NTSC|MPEG1|AVI)\>"
color brightblack "\="
icolor brightcyan "[.0-9A-Z_]*:"
icolor brightyellow "http:.*$"

11
nano/ini.nanorc Executable file
View file

@ -0,0 +1,11 @@
syntax "INI" "\.(ini|desktop|lfl|override|cfg)$" "(mimeapps\.list|pinforc|setup\.cfg)$" "weechat/.+\.conf$"
header "^\[[A-Za-z]+\]$"
color brightcyan "\<(true|false)\>"
color cyan "^[[:space:]]*[^=]*="
color brightmagenta "^[[:space:]]*\[.*\]$"
color red "[=;]"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblue "(^|[[:space:]])(#([^{].*)?|;.*)$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

22
nano/initng.nanorc Executable file
View file

@ -0,0 +1,22 @@
## InitNG syntax
##
syntax "initngscripts" "\.i$"
icolor brightgreen "^[0-9A-Z_]+\(\)"
color magenta "(daemon|virtual)"
color brightwhite "virtual/.*$"
color brightblack "daemon/.*$"
color yellow "(need|use|respawn|exec\ daemon|also_stop)"
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "-[Ldefgruwx]\>"
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color cyan "(^|[[:space:]])#.*$"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
syntax "initng-settings" "system.virtual$" "\.runlevel$"
color magenta "daemon"
color cyan "system"
color blue "net"
color red "debug"

28
nano/initscript.nanorc Executable file
View file

@ -0,0 +1,28 @@
## initscripts syntax (stolen from gentoo.nanorc) ;)
##
syntax "initscript" "/etc/init.d/(\.|/|)"
## All the standard portage functions
#color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
## Highlight bash related syntax
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "-(e|d|f|r|g|u|w|x|L)\>"
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
## Highlight variables ... official portage ones in red, all others in bright red
color brightred "\$\{?[a-zA-Z_0-9]+\}?"
color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>"
color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
## Highlight portage commands
color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|patch)\>"
color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>"
## Highlight common commands used in ebuilds
color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
## Highlight comments (doesnt work that well)
color yellow "#.*$"
## Highlight strings (doesnt work that well)
color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"

10
nano/inputrc.nanorc Executable file
View file

@ -0,0 +1,10 @@
syntax "Inputrc" "inputrc$"
color red "\<(off|none)\>"
color green "\<on\>"
color brightblue "\<set|\$include\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

45
nano/jade.nanorc Executable file
View file

@ -0,0 +1,45 @@
syntax "Jade" "\.jade$"
# Elements
color yellow "^\s*([a-z0-9]+)"
# Main elements
color red "^\s*(html|head|body)"
# Includes
icolor magenta "^\s*(include)"
# Variables
color brightblue "^\s*(\-)\s(var)\s([a-z0-9]+)"
icolor magenta "^\s*-\s(var)$" "^\s*-\s(var)\s"
# Cases
color brightblue "^\s*(case)\s(.*)"
color cyan "^\s*(when)\s(.*)"
icolor magenta "^\s*(case|when|default)$" "^\s*(case|when|default)\s"
color brightred "^\s*-\s(break)$" "^\s*-\s(break)\s"
# Conditionals
icolor magenta "^\s*(if|else|else if)$" "^\s*(if|else|else if)\s"
# For loops
icolor magenta "^\s*-\s(for)"
# Each
icolor magenta "^\s*(each)$" "^\s*(each)\s"
# Parenthesis content
color blue start="\(" end="\)"
# Strings
color cyan "('[^']*')|(\"[^\"]*\")"
# Parenthesis, commas, equals
icolor green "\(" "\)" "\," "\="
# Comments, dashes and spaces
color blue "\s+(//.*)"
color blue start="/\*" end="\*/"
color white "^\s*(\-)"
color ,green "[[:space:]]+$"
# Unbuffered comments
color brightblue "\s+(//-.*)"
# HTML-style conditional comments
color brightmagenta start="<!" end="!>"
color brightmagenta "<!\[endif\]-->"
# HTML-style elements
color yellow "<([^!].*)>"
# Pipes
color yellow,magenta "\|"
# Doctype
color brightblack "^\s*(doctype)(.*)"
# Links
icolor brightgreen "https?:\/\/(www\.)?[a-zA-Z0-9@%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)" "_blank"

12
nano/java.nanorc Executable file
View file

@ -0,0 +1,12 @@
## Here is an example for Java.
##
syntax "java" "\.java$"
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|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:]]+$"

25
nano/javascript.nanorc Executable file
View file

@ -0,0 +1,25 @@
syntax "JavaScript" "\.(js|ts)$"
comment "//"
color blue "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
color blue "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color blue "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]|)"
color cyan "\<(break|case|catch|continue|default|delete|do|else|finally)\>"
color cyan "\<(for|function|get|if|in|instanceof|new|return|set|switch)\>"
color cyan "\<(switch|this|throw|try|typeof|var|void|while|with)\>"
color cyan "\<(null|undefined|NaN)\>"
color cyan "\<(import|as|from|export)\>"
color cyan "\<(const|let|class|extends|get|set|of|async|await|yield)\>"
color brightcyan "\<(true|false)\>"
color green "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>"
color green "\<(Map|WeakMap|Set|WeakSet|Promise|Symbol)\>"
color green "\<(Number|Object|RegExp|String)\>"
color red "[-+/*=<>!~%?:&|]"
color magenta "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color magenta "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color brightblack "//.*"
color brightblack "/\*.+\*/"
color brightwhite,cyan "TODO:?"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'|(`|\})(\\.|[^`$]|$[^{])*(\$\{|`)"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

46
nano/js.nanorc Executable file
View file

@ -0,0 +1,46 @@
### all *js files ( e.g. Firefox user.js, prefs.js )
## Old version
#syntax "jsfiles" "(\.|/|)js$"
#color green "//.*$" start="\/\*" end="\*\/"
#color blue "'(\\.|[^'])*'"
#color red ""(\\.|[^\"])*""
#color brightgreen "\<(true)\>"
#color brightred "\<(false)\>" "http\:\/\/.*$"
#color brightmagenta "[0-9](\\.|[^\"])*)"
## New updated taken from http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting
syntax "JavaScript" "\.(js)$"
## Default
color white "^.+$"
## Decimal, cotal and hexadecimal numbers
color yellow "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
## Floating point number with at least one digit before decimal point
color yellow "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color yellow "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
## Keywords
color green "\<(break|case|catch|continue|default|delete|do|else|finally)\>"
color green "\<(for|function|if|in|instanceof|new|null|return|switch)\>"
color green "\<(switch|this|throw|try|typeof|undefined|var|void|while|with)\>"
## Type specifiers
color red "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>"
color red "\<(Number|Object|RegExp|String)\>"
color red "\<(true|false)\>"
## String
color brightyellow "L?\"(\\"|[^"])*\""
color brightyellow "L?'(\'|[^'])*'"
## Escapes
color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
## Comments
color brightblue start="/\*" end="\*/"
color brightblue "//.*$"

13
nano/json.nanorc Executable file
View file

@ -0,0 +1,13 @@
syntax "JSON" "\.json$"
header "^\{$"
# You can't add a comment to JSON.
comment ""
color blue "\<[-]?[1-9][0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>"
color cyan "\<null\>"
color brightcyan "\<(true|false)\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightyellow "\"(\\"|[^"])*\"[[:space:]]*:" "'(\'|[^'])*'[[:space:]]*:"
color magenta "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

20
nano/julia.nanorc Executable file
View file

@ -0,0 +1,20 @@
syntax "julia" "\.jl$"
color brightcyan "\<(begin|break|catch|continue|function|elseif|else|end)\>"
color brightcyan "\<(finally|for|global|local|if|include|using|require|macro)\>"
color brightcyan "\<(println|return|try|type|while|module)\>"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color white "[(]"
color red "[-+*/|=%<>&~^]|\<(and|not|or|is|in)\>"
color brightyellow "@[A-Za-z0-9_]+"
color brightmagenta "__[A-Za-z0-9_]+__"
color brightblack "\<(true|false)\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color yellow "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color yellow "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
color yellow start=""""[^"]" end="""""
color yellow start="'''[^']" end="'''"
color magenta "\\.?"
color cyan "(^|[[:space:]])#([^{].*)?$"
color cyan start="#=" end="=#"
color brightwhite,cyan "TODO:?"

10
nano/keymap.nanorc Executable file
View file

@ -0,0 +1,10 @@
syntax "Keymap" "\.(k|key)?map$|Xmodmap$"
color cyan "\<(add|clear|compose|keycode|keymaps|keysym|remove|string)\>"
color cyan "\<(control|alt|shift)\>"
color blue "\<[0-9]+\>"
color red "="
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "^!.*$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

15
nano/kickstart.nanorc Executable file
View file

@ -0,0 +1,15 @@
syntax "KickStart" "\.ks$" "\.kickstart$"
color brightmagenta "%[a-z]+"
color cyan "^[[:space:]]*(install|cdrom|text|graphical|volgroup|logvol|reboot|timezone|lang|keyboard|authconfig|firstboot|rootpw|user|firewall|selinux|repo|part|partition|clearpart|bootloader)"
color cyan "--(name|mirrorlist|baseurl|utc)(=|\>)"
color brightyellow "\$(releasever|basearch)\>"
# Packages and groups
color brightblack "^@[A-Za-z][A-Za-z-]*"
color brightred "^-@[a-zA-Z0-9*-]+"
color red "^-[a-zA-Z0-9*-]+"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

26
nano/kotlin.nanorc Executable file
View file

@ -0,0 +1,26 @@
# Nano syntax file
# Language: Kotlin
# Maintainer: Bjarne Holen <bjarneholen@gmail.com>
# Edited by: Ritiek Malhotra <ritiekmalhotra123@gmail.com>
# Last Change: 2017 May 24
# Copyright (c) 2014, Bjarne Holen
syntax "kotlin" "\.kt$" "\.kts$"
color magenta "\b(([1-9][0-9]+)|0+)\.[0-9]+\b" "\b[1-9][0-9]*\b" "\b0[0-7]*\b" "\b0x[1-9a-f][0-9a-f]*\b"
color yellow "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
color green "\<(namespace|as|type|class|this|super|val|var|fun|is|in|object|when|trait|import|where|by|get|set|abstract|enum|open|annotation|override|private|public|internal|protected|out|vararg|inline|final|package|lateinit|constructor|companion|const|suspend|sealed)\>"
color yellow "\<(true|false|null)\>"
color cyan "\<(break|catch|continue|do|else|finally|for|if|return|throw|try|while|repeat)\>"
color brightred "\<(inner|outer)\>"
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color brightblue "<[^= ]*>" ""(\\.|[^"])*""
## Comment highlighting
color red "^\s*//.*"
color red start="^\s*/\*" end="\*/"
## Trailing whitespace
color ,green "[[:space:]]+$"

10
nano/ledger.nanorc Executable file
View file

@ -0,0 +1,10 @@
syntax "Ledger" "(^|\.|/)ledger|ldgr|beancount|bnct$"
color brightmagenta "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*"
color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}"
color brightyellow "^~ .*"
color brightblue "^= .*"
color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?"
color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z_-]+(:[A-Za-z_-]+)*\)?"
color red "[*!]"
color brightblack "^[[:space:]]*;.*"

13
nano/lisp.nanorc Executable file
View file

@ -0,0 +1,13 @@
syntax "Lisp" "(emacs|zile)$" "\.(el|li?sp|scm|ss)$"
color brightblue "\([a-z-]+"
color red "\(([-+*/<>]|<=|>=)|'"
color blue "\<[0-9]+\>"
icolor cyan "\<nil\>"
color brightcyan "\<[tT]\>"
color yellow "\"(\\.|[^"])*\""
color magenta "'[A-Za-z][A-Za-z0-9_-]+"
color magenta "\\.?"
color brightblack "(^|[[:space:]]);.*"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

45
nano/log-stuff.nanorc Executable file
View file

@ -0,0 +1,45 @@
## to have logs interpreted for you in just about 1000 ways use log analyzers
## this only helps in viewing them directly
## TODO
# getdelta, others...
syntax "logs" "midentd.log$" "mldonkey.log$"
color brightwhite "[0-9]"
color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
color blue "[0-9][0-9][0-9][0-9]"
color cyan "\].*$"
color brightblack start="\[" end="\]"
syntax "emergelog" "emerge.log$"
color brightwhite "[0-9]"
color yellow ">>>.*$"
color cyan "\*\*\*.*$"
color magenta "\:\:\:.*$"
color green start="\(" end="\)"
color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
color blue "[0-9][0-9][0-9][0-9]"
icolor red "^[[:space:]]*[.0-9A-Z_]*:"
syntax "ntplog" "ntp.log$"
icolor red "^[[:space:]]*[.0-9A-Z_]*:"
color brightwhite "[0-9]"
color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
color cyan "\].*$"
color brightblack start="\[" end="\]"
syntax "cronlog" "cron.log$"
color cyan "/.*$"
color brightblue "[0-9][0-9]\-[.A-Z_]*\-[0-9][0-9]"
color brightwhite "[0-9][0-9]\:[0-9][0-9]"
color magenta "(FILE|USER)"
color yellow "(pid|cmd)"
syntax "miniserv" "miniserv.log$" "miniserv.error$"
color cyan "Bad\ Request.*$"
color brightred "Access\ denied.*$"
color brightwhite "[0-9]"
color green "(POST|GET|HTTP)"
color brightred "\""
color yellow "(\:|\+|/|\.|\-)"
color green ".*started$"

72
nano/lua.nanorc Executable file
View file

@ -0,0 +1,72 @@
##############################################################################
#
# Lua syntax highlighting for Nano.
#
# Author: Matthew Wild <mwild1 (at) gmail.com>
# License: GPL 2 or later
#
# Version: 2007-06-06
#
# Notes: Originally based on Ruby syntax rc by Josef 'Jupp' Schugt
##############################################################################
# Automatically use for '.lua' files
syntax "lua" ".*\.lua$"
# General
color brightwhite ".+"
# Operators
color brightyellow ":|\*\*|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\<(not|and|or)\>"
# Statements
color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return)\>"
# Keywords
color brightyellow "\<(debug|string|math|table|io|coroutine|os)\>\."
color brightyellow "\<(_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\("
# Standard library
color brightyellow "io\.\<(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)\>"
color brightyellow "math\.\<(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|min|modf|pi|pow|rad|random|randomseed|sinh|tan)\>"
color brightyellow "os\.\<(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\>"
color brightyellow "package\.\<(cpath|loaded|loadlib|path|preload|seeall)\>"
color brightyellow "string\.\<(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)\>"
color brightyellow "table\.\<(concat|insert|maxn|remove|sort)\>"
color brightyellow "coroutine\.\<(create|resume|running|status|wrap|yield)\>"
color brightyellow "debug\.\<(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)\>"
# File handle methods
color brightyellow "\:\<(close|flush|lines|read|seek|setvbuf|write)\>"
# false, nil, true
color brightmagenta "\<(false|nil|true)\>"
# External files
color brightgreen "(\<(dofile|require|include)|%q|%!|%Q|%r|%x)\>"
# Numbers
color red "\<([0-9]+)\>"
# Symbols
color brightmagenta "(\(|\)|\[|\]|\{|\})"
# Strings
#color green "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
# Strings
color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
# Escapes
color red "\\[0-7][0-7][0-7]|\\x[0-9a-fA-F][0-9a-fA-F]|\\[abefnrs]|(\\c|\\C-|\\M-|\\M-\\C-)."
# Shebang
color brightcyan "^#!.*"
# Simple comments
color green "\-\-.*$"
# Multiline comments
color green start="\-\-\[" end="]"

22
nano/m3u.nanorc Executable file
View file

@ -0,0 +1,22 @@
syntax "m3u" "\.(m3u|m3u8)$"
# Header text
color brightcyan "^#EXTINF.*,[^,]*$"
# Header property values
color brightyellow "^#[^:]*:[^ ,]*"
color brightyellow "=[^ ,]*"
color brightyellow "=[\"][^\"]*[\"]"
# Header property keys
color brightgreen "[a-zA-Z-]*="
# Headers
color brightred "^#EXT[-A-Z]*:"
color brightmagenta "^#EXTM3U"
# Separators
color normal "[,=]"
# URLs
color normal "^[^#].*"

8
nano/maincf.nanorc Executable file
View file

@ -0,0 +1,8 @@
### all *cf files (e.g. main.cf, Postfix )
syntax "maincf" "(\.|/|)cf$"
color magenta "\=.*$"
color green "#.*$"
color cyan "[A-Z0-9\_]+="
color blue ""(\\.|[^\"])*""
color red "\@"

8
nano/makefile.nanorc Executable file
View file

@ -0,0 +1,8 @@
# unattributed syntax highlighting example from wiki.linuxhelp.net/
syntax "makefile" "Makefile[^/]*$"
color red "[:=]"
color magenta "\<(if|ifeq|else|endif)\>"
color blue "\$+[{(][a-zA-Z0-9_-]+[})]"
color brightblue "^[^ ]+:"
color green "#.*$"

9
nano/man.nanorc Executable file
View file

@ -0,0 +1,9 @@
## Here is an example for manpages.
##
syntax "man" "\.[1-9]x?$"
color green "\.(S|T)H.*$"
color brightgreen "\.(S|T)H" "\.TP"
color brightred "\.(BR?|I[PR]?).*$"
color brightblue "\.(BR?|I[PR]?|PP)"
color brightwhite "\\f[BIPR]"
color yellow "\.(br|DS|RS|RE|PD)"

81
nano/markdown.nanorc Executable file
View file

@ -0,0 +1,81 @@
## Syntax definition for Markdown for coloration with GNU Nano
## (Syntax reference: http://daringfireball.net/projects/markdown/syntax)
##
## (C) 01/2014 Lilian Besson (lilian DOT besson AT normale DOT fr)
## Last version : http://besson.qc.to/NanoSyntax/markdown.nanorc
##############################################################################
# Definition of the name of the syntax : rst
# and capture of the extension : .txt .text .md .markdown
syntax "markdown" "\.md$" "\.markdown$"
##############################################################################
# Numbers
color white "-?[0-9\.][0-9\._,]*([eE]-?)?[0-9\._,]*"
# code block
color brightred,black "(FIXME|TODO|NEW|XXX|HOWTO|DEBUG|WARNING|PEP)"
# wrong links (empty)
color white,red "[a-z][a-z]+://[^([[:alnum:]]|[\]\[])]*"
# Balise <truc> et </truc>, pour embarquer du JavaScript notamment.
color brightblue,black "</?[[:alnum:]]+([[:space:]]+[[:alnum:]]*=\"[^\"]*\")*>"
# lists (not yet perfect)
color brightwhite "(^ *[\*\+-]([[:blank:]]| *[\*\+-])+)|(^ *#\.[[:blank:]]+)|(^ *[0-9]+\.[[:blank:]]+)|(^ *[\(]?[a-z]+[\.\)][[:blank:]]+)|(^ *[\(]?[A-Z]+[\.\)][[:blank:]]+)"
# options lists
color white "^ *([/\+\-]{1,2}[a-zA-Z0-9][[:blank:]]?([[:alnum:]]|_)*[,=]*([[:alnum:]]|_)*[[:blank:]]*)+"
## Links and others:
##
## link reference
## color brightgreen "((`[^`]+`_{1,2})|([[:blank:]]*\.\. _[[:alnum:]]+.*: .*$))"
## targets
## color brightgreen "^ *\.\. _[[:alnum:]]+:"
# email
icolor brightred,black "(mailto:)?[[:alnum:]]([[:alnum:]]|[_\.\[\]\--]|\.|-)*(@|AT)[[:alnum:]]([[:alnum:]]|[_\.\[\]\--]|\.|-)*\.[[:alnum:]]+"
# http, ftp, https, apt, links
icolor red,black "[a-z][a-z]+://[[:alnum:]]([[:alnum:]]|[-_\.~#\?:=%&])*([[:alnum:]]|[-/_\.~#\?:=%&;])*"
# italics
color red "\*[[:alnum:]]([[:alnum:]]|[[:space:]]|-|,|;|\.|'|\$|\\|/)*\*\\?"
color brightmagenta "\"[a-zA-Z]([[:alnum:]]|[[:space:]]|-|,|;|\.|'|\$|\\|/)*\"\\?"
color brightmagenta "'[a-zA-Z]([[:alnum:]]|-|,|;|\.|'|\$|\\|/)*'\\?"
color brightmagenta "“[a-zA-Z]([[:alnum:]]|-|,|;|\.|'|\$|\\|/)*”\\?"
# bold
color brightyellow "\*\*[^*^*]+\*\*\\?"
##############################################################################
## Old stuff
# Quotations
color cyan "^>.*"
# Emphasis
color green "_[^_]*_"
color green "\*[^\*]*\*"
# Strong emphasis
color brightgreen "\*\*[^\*]*\*\*"
color brightgreen "__[\_]*__"
# Underline headers
color brightblue "^====(=*)"
color brightblue "^----(-*)"
# Hash headers
color brightcyan "^#.*"
# Linkified URLs (and inline html tags)
color brightmagenta start="<" end=">"
# Links
color brightmagenta "\[.*\](\([^\)]*\))?"
# Link id's:
color brightmagenta "^\[.*\]:( )+.*"
# Code spans
color brightyellow "`[^`]*`"
# Code blocks
# disabled, because indented lines aren't always code blocks
# color brightyellow "^( ).*"
# Links and inline images
color brightred start="!\[" end="\]"
color white start="\[" end="\]"
# Lists
color yellow "^( )*(\*|\+|\-|[0-9]+\.) "
# <hr>
color ,red "^\* \* \*.*$"
color ,red "^- - -.*$"
color ,red "^-----.*$"
color ,red "^----.*$"
color ,red "^---.*$"

8
nano/mgp.nanorc Executable file
View file

@ -0,0 +1,8 @@
## Here is an example for Magicpoint presentations
##
syntax "mgp" "\.mgp$"
header "^%include.*"
icolor green "^%[a-z].*$"
color cyan "(^|[[:space:]])#.*$"
color cyan "(^|[[:space:]])%%.*$"
color ,green "[[:space:]]+$"

6
nano/mimetype.nanorc Executable file
View file

@ -0,0 +1,6 @@
syntax "mimetype" "mime.types"
icolor cyan "[.A-Z_]*/"
color brightwhite "/"
color green "[[:space:]].*$"
## comments
color green "#.*$"

54
nano/moonscript.nanorc Executable file
View file

@ -0,0 +1,54 @@
#syntax highlighting for MoonScript
#based on leafo/moonscript-vim
syntax "MoonScript" "\.moon$"
#statement
color yellow "\<(return|break|continue)\>"
#conditional
color yellow "\<(if|else|elseif|then|switch|when|unless)\>"
#keyword
color yellow "\<(export|local|import|from|with|in|and|or|not|class|extends|super|using|do)\>"
#repeat
color yellow "\<(for|while)\>"
#identifiers (lua 5.1 functions)
color green "\<(assert|collectgarbage|dofile|error|next|print|rawget|rawset|tonumber|tostring)\>"
color green "\<(type|_VERSION|_G|getfenv|getmetatable|ipairs|loadfile|loadstring|pairs)\>"
color green "\<(pcall|rawequal|require|setfenv|setmetatable|unpack|xpcallload|module|select)\>"
color green "package\.(cpath|loaded|loadlib|path|preload|seeall)"
color green "coroutine\.(running|create|resume|status|wrap|yield)"
color green "string\.(byte|char|dump|find|len|lower|rep|sub|upper|format|gsub|gmatch|match|reverse)"
color green "table\.(maxn|concat|sort|insert|remove)"
color green "math\.(abs|acos|asin|atan|atan2|ceil|sin|cos|tan|deg|exp|floor|log|log10|max|min|fmod|modf|cosh|sinh|tanh|pow|rad|sqrt|frexp|ldexp|random|randomseed|pi)"
color green "io\.(stdin|stdout|stderr|close|flush|input|lines|open|output|popen|read|tmpfile|type|write)"
color green "os\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)"
color green "debug\.(debug|gethook|getinfo|getlocal|getupvalue|setlocal|setupvalue|sethook|traceback|getfenv|getmetatable|getregistry|setfenv|setmetatable)"
#operator
color red "[-+=^*.<>&?%#@!:|\/\\]+"
color red "(and=|or=)"
#function
color brightblue "(->|=>|\(|\)|\[|\]|\{|\}|!\s|!$)"
#boolean
color brightcyan "\<(true|false)\>"
#special type
color brightred "\<(nil)\>"
#class-like name starting with a capital letter
color green "\<[A-Z]\w*\>"
#special variable
color green "\<(self|self\.\w+)\>"
color green "\B@@?\w*"
#constant
color brightgreen "\<[A-Z0-9_]+\>"
#integer (incl. leading plus or minus)
color brightmagenta "\<[-+]?[0-9]+\>"
#float (incl. leading plus or minus)
color brightmagenta "\<[-+]?[0-9]+\.[0-9]+\>"
#hex number
color brightmagenta "\<0[xX]\x+\>"
#some common errors
color green,red "(;$|[[:space:]]+$)"
#string
color brightyellow start="\"" end="\""
color brightyellow start="\'" end="\'"
#comment
color blue "--.*"

Some files were not shown because too many files have changed in this diff Show more