commit b04f979811d485466b9d8a7f73a61acbfc5d17188481b7c7cabcea59c83392d9 Author: riomoo Date: Fri Jan 17 19:21:40 2025 -0500 Init Commit diff --git a/git/.config/git/config b/git/.config/git/config new file mode 100644 index 0000000..f6c7d9e --- /dev/null +++ b/git/.config/git/config @@ -0,0 +1,65 @@ +[core] + repositoryFormatVersion = 1 + filemode = true + bare = false + logallrefupdates = true + sshCommand = ssh -F ~/.config/ssh/config -o UserKnownHostsFile='/home/moo/.config/ssh/known_hosts' + quotePath = false + commitGraph = true +[user] + email = the7772howaboutyou@protonmail.com + name = riomoo + signingkey = /home/moo/.config/ssh/gpg/the7772/id_ed25519.pub + #signingkey = FEC86E49B4437D4D + +[alias] + resign = "!re() { git rebase --exec 'git commit --amend --no-edit -n -S' -i $1; }; re" + gwtm = worktree add master + gwtd = worktree add -b dev dev master + gwtf = worktree add -b feat feat dev + gwtrf = worktree remove feat + gbrf = branch -D feat + gbsem = rebase -i --root master + lg = lg1 + lg1 = lg1-specific --all + lg2 = lg2-specific --all + lg3 = lg3-specific --all + lg4 = lg4-specific --all --show-signature + + lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' + lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' + lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' + lg4-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' + + +[push] + followTags = true +[gc] + reflogexpire = 90 + writeCommitGraph = true +[diff] + algorithm = histogram +[receive] + advertisePushOptions = true + procReceiveRefs = refs/for +[fetch] + writeCommitGraph = true +[safe] + directory = * + directory = /opt/flutter +[uploadpack] + allowfilter = true + allowAnySHA1InWant = true +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true +[gpg] + format = ssh +[gpg "ssh"] + allowedSignersFile = /home/moo/.config/ssh/allowed_signers +[commit] + gpgsign = true +[init] + defaultBranch = main diff --git a/git/.config/git/gitk b/git/.config/git/gitk new file mode 100644 index 0000000..5f14a2d --- /dev/null +++ b/git/.config/git/gitk @@ -0,0 +1,64 @@ +set mainfont {sans 12} +set textfont {monospace 12} +set uifont {sans 9 bold} +set tabstop 8 +set findmergefiles 0 +set maxgraphpct 50 +set maxwidth 16 +set cmitmode patch +set wrapcomment none +set autoselect 1 +set autosellen 40 +set showneartags 1 +set maxrefs 20 +set visiblerefs {"master"} +set hideremotes 0 +set showlocalchanges 1 +set datetimeformat {%Y-%m-%d %H:%M:%S} +set limitdiffs 1 +set uicolor grey85 +set want_ttk 1 +set bgcolor white +set fgcolor black +set uifgcolor black +set uifgdisabledcolor #999 +set colors {"#00ff00" red blue magenta darkgrey brown orange} +set diffcolors {"#c30000" "#009800" blue} +set mergecolors {red blue "#00ff00" purple brown "#009090" magenta "#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0" "#f0b070" "#ff70b0"} +set markbgcolor #e0e0ff +set diffcontext 3 +set selectbgcolor gray85 +set foundbgcolor yellow +set currentsearchhitbgcolor orange +set extdifftool meld +set perfile_attrs 0 +set headbgcolor #00ff00 +set headfgcolor black +set headoutlinecolor black +set remotebgcolor #ffddaa +set tagbgcolor yellow +set tagfgcolor black +set tagoutlinecolor black +set reflinecolor black +set filesepbgcolor #aaaaaa +set filesepfgcolor black +set linehoverbgcolor #ffff80 +set linehoverfgcolor black +set linehoveroutlinecolor black +set mainheadcirclecolor yellow +set workingfilescirclecolor red +set indexcirclecolor #00ff00 +set circlecolors {white blue gray blue blue} +set linkfgcolor blue +set circleoutlinecolor black +set diffbgcolors {"#fff3f3" "#f0fff0"} +set web_browser xdg-open +set geometry(main) 2556x1547+0+19 +set geometry(state) normal +set geometry(topwidth) 2556 +set geometry(topheight) 225 +set geometry(pwsash0) "440 1" +set geometry(pwsash1) "660 1" +set geometry(botwidth) 550 +set geometry(botheight) 1317 +set permviews {} diff --git a/git/.config/git/hub.cnf b/git/.config/git/hub.cnf new file mode 100644 index 0000000..47dd283 --- /dev/null +++ b/git/.config/git/hub.cnf @@ -0,0 +1,4 @@ +[user] + #email = 83623960+riomoo@users.noreply.github.com + email = the7772howaboutyou@protonmail.com + name = riomoo diff --git a/git/.config/git/jester.cnf b/git/.config/git/jester.cnf new file mode 100644 index 0000000..0eb4865 --- /dev/null +++ b/git/.config/git/jester.cnf @@ -0,0 +1,3 @@ +[user] + signingemail = nobodyatall@cock.li + name = riomoo diff --git a/paru/.config/paru/paru.conf b/paru/.config/paru/paru.conf new file mode 100644 index 0000000..de15b36 --- /dev/null +++ b/paru/.config/paru/paru.conf @@ -0,0 +1,39 @@ +# +# $PARU_CONF +# /etc/paru.conf +# ~/.config/paru/paru.conf +# +# See the paru.conf(5) manpage for options + +# +# GENERAL OPTIONS +# +[options] +PgpFetch +Devel +Provides +DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil +#AurOnly +#BottomUp +#RemoveMake +#SudoLoop +#UseAsk +#SaveChanges +#CombinedUpgrade +#CleanAfter +#UpgradeMenu +#NewsOnUpgrade + +#LocalRepo +#Chroot +#Sign +#SignDb +#KeepRepoCache + +# +# Binary OPTIONS +# +[bin] +#FileManager = vifm +#MFlags = --skippgpcheck +Sudo = doas diff --git a/picom/.config/picom/picom.conf b/picom/.config/picom/picom.conf new file mode 100644 index 0000000..cfd8048 --- /dev/null +++ b/picom/.config/picom/picom.conf @@ -0,0 +1,413 @@ +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +shadow = false; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +shadow-radius = 7; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -7; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -7; + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue) +# shadow-color = "#000000" + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; + +# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window. +# clip-shadow-above = [] + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +fading = false; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.03; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Specify a list of conditions of windows that should not be faded. +# fade-exclude = [] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +inactive-opacity = 1; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 1; + +# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +# active-opacity = 1.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should never be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] + + +################################# +# Corners # +################################# + +# Sets the radius of rounded window corners. When > 0, the compositor will +# round the corners of windows. Does not interact well with +# `transparent-clipping`. +corner-radius = 0 + +# Exclude conditions for rounded corners. +rounded-corners-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = +# blur-size = 12 +# +# blur-deviation = false +# +# blur-strength = 5 + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = "" +blur-kern = "3x3box"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +# backend = "glx" +backend = "glx"; + +# Enable/disable VSync. +# vsync = false +vsync = true; + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true; + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. This usually means windows from the same application +# will be considered focused or unfocused at the same time. +# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too. +# +# detect-client-leader = false + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +glx-no-stencil = true; + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = true; + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +# xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = "" + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "warn"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = "/path/to/your/log/file" + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = "/path/to/your/log/file" + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# clip-shadow-above::: +# Controls wether shadows that would have been drawn above the window should +# be clipped. Useful for dock windows that should have no shadow painted on top. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; clip-shadow-above = true; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; diff --git a/tmux/.config/tmux/different-layout/.tmux.conf b/tmux/.config/tmux/different-layout/.tmux.conf new file mode 100644 index 0000000..61fff46 --- /dev/null +++ b/tmux/.config/tmux/different-layout/.tmux.conf @@ -0,0 +1,1531 @@ +# : << EOF +# https://github.com/gpakosz/.tmux +# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, +# without any warranty. +# Copyright 2012— Gregory Pakosz (@gpakosz). +# /!\ do not edit this file +# instead, override settings in ~/.tmux.conf.local, see README.md + + +# -- general ------------------------------------------------------------------- + +set -g default-terminal "screen-256color" +if 'infocmp -x tmux-256color > /dev/null 2>&1' 'set -g default-terminal "tmux-256color"' + +setw -g xterm-keys on +set -s escape-time 10 # faster command sequences +set -sg repeat-time 600 # increase repeat timeout +set -s focus-events on + +set -g prefix2 C-a # GNU-Screen compatible prefix +bind C-a send-prefix -2 + +set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2) +setw -q -g utf8 on + +set -g history-limit 5000 # boost history + +# edit configuration +bind e new-window -n "~/.tmux.conf.local" sh -c '${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"' + +# reload configuration +bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' + + +# -- display ------------------------------------------------------------------- + +set -g base-index 1 # start windows numbering at 1 +setw -g pane-base-index 1 # make pane numbering consistent with windows + +setw -g automatic-rename on # rename window to reflect current program +set -g renumber-windows on # renumber windows when a window is closed + +set -g set-titles on # set terminal title + +set -g display-panes-time 800 # slightly longer pane indicators display time +set -g display-time 1000 # slightly longer status messages display time + +set -g status-interval 10 # redraw status line every 10 seconds + +# clear both screen and history +bind -n C-l send-keys C-l \; run 'sleep 0.2' \; clear-history + +# activity +set -g monitor-activity on +set -g visual-activity off + + +# -- navigation ---------------------------------------------------------------- + +# create session +bind C-c new-session + +# find session +bind C-f command-prompt -p find-session 'switch-client -t %%' + +# session navigation +bind BTab switch-client -l # move to last session + +# split current window horizontally +bind - split-window -v +# split current window vertically +bind _ split-window -h + +# pane navigation +bind -r h select-pane -L # move left +bind -r j select-pane -D # move down +bind -r k select-pane -U # move up +bind -r l select-pane -R # move right +bind > swap-pane -D # swap current pane with the next one +bind < swap-pane -U # swap current pane with the previous one + +# maximize current pane +bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D' + +# pane resizing +bind -r H resize-pane -L 2 +bind -r J resize-pane -D 2 +bind -r K resize-pane -U 2 +bind -r L resize-pane -R 2 + +# window navigation +unbind n +unbind p +bind -r C-h previous-window # select previous window +bind -r C-l next-window # select next window +bind Tab last-window # move to last active window + +# toggle mouse +bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse" + + +# -- urlview ------------------------------------------------------------------- + +bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}" + + +# -- facebook pathpicker ------------------------------------------------------- + +bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id} #{pane_current_path}" + + +# -- list choice (tmux < 2.4) -------------------------------------------------- + +# vi-choice is gone in tmux >= 2.4 +run -b 'tmux bind -t vi-choice h tree-collapse 2> /dev/null || true' +run -b 'tmux bind -t vi-choice l tree-expand 2> /dev/null || true' +run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null || true' +run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null || true' +run -b 'tmux bind -t vi-choice H tree-collapse-all 2> /dev/null || true' +run -b 'tmux bind -t vi-choice L tree-expand-all 2> /dev/null || true' +run -b 'tmux bind -t vi-choice Escape cancel 2> /dev/null || true' + + +# -- edit mode (tmux < 2.4) ---------------------------------------------------- + +# vi-edit is gone in tmux >= 2.4 +run -b 'tmux bind -ct vi-edit H start-of-line 2> /dev/null || true' +run -b 'tmux bind -ct vi-edit L end-of-line 2> /dev/null || true' +run -b 'tmux bind -ct vi-edit q cancel 2> /dev/null || true' +run -b 'tmux bind -ct vi-edit Escape cancel 2> /dev/null || true' + + +# -- copy mode ----------------------------------------------------------------- + +bind Enter copy-mode # enter copy mode + +run -b 'tmux bind -t vi-copy v begin-selection 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi v send -X begin-selection 2> /dev/null || true' +run -b 'tmux bind -t vi-copy C-v rectangle-toggle 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi C-v send -X rectangle-toggle 2> /dev/null || true' +run -b 'tmux bind -t vi-copy y copy-selection 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi y send -X copy-selection-and-cancel 2> /dev/null || true' +run -b 'tmux bind -t vi-copy Escape cancel 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi Escape send -X cancel 2> /dev/null || true' +run -b 'tmux bind -t vi-copy H start-of-line 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi H send -X start-of-line 2> /dev/null || true' +run -b 'tmux bind -t vi-copy L end-of-line 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true' + +# copy to X11 clipboard +if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"' +if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"' +# copy to macOS clipboard +if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"' +if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"' +# copy to Windows clipboard +if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"' +if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"' + + +# -- buffers ------------------------------------------------------------------- + +bind b list-buffers # list paste buffers +bind p paste-buffer # paste from the top paste buffer +bind P choose-buffer # choose which buffer to paste from + + +# -- 8< ------------------------------------------------------------------------ + +source -q ~/.tmux.conf.local +run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' + + +# EOF +# +# # exit the script if any statement returns a non-true return value +# set -e +# +# unset GREP_OPTIONS +# export LC_NUMERIC=C +# (set +H 2>/dev/null) && set +H || true +# +# if ! printf '' | sed -E 's///' 2>/dev/null; then +# if printf '' | sed -r 's///' 2>/dev/null; then +# sed () { +# n=$#; while [ "$n" -gt 0 ]; do arg=$1; shift; case $arg in -E*) arg=-r${arg#-E};; esac; set -- "$@" "$arg"; n=$(( n - 1 )); done +# command sed "$@" +# } +# fi +# fi +# +# _uname_s=$(uname -s) +# +# _tmux_version=$(tmux -V | awk '{gsub(/[^0-9.]/, "", $2); print ($2+0) * 100}') +# +# _is_true() { +# [ x"$1" = x"true" ] || [ x"$1" = x"yes" ] || [ x"$1" = x"1" ] +# } +# +# _is_enabled() { +# [ x"$1" = x"enabled" ] +# } +# +# _is_disabled() { +# [ x"$1" = x"disabled" ] +# } +# +# _circled() { +# circled_digits='⓪ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳' +# if [ "$1" -le 20 ] 2>/dev/null; then +# i=$(( $1 + 1 )) +# eval set -- "$circled_digits" +# eval echo "\${$i}" +# else +# echo "$1" +# fi +# } +# +# _decode_unicode_escapes() { +# printf '%s' "$*" | perl -CS -pe 's/(\\u([0-9A-Fa-f]{1,4})|\\U([0-9A-Fa-f]{1,8}))/chr(hex($2.$3))/eg' 2>/dev/null +# } +# +# if command -v pkill > /dev/null 2>&1; then +# _pkillf() { +# pkill -f "$@" || true +# } +# else +# case "$_uname_s" in +# *CYGWIN*) +# _pkillf() { +# while IFS= read -r pid; do +# kill "$pid" || true +# done << EOF +# $(grep -Eao "$@" /proc/*/cmdline | xargs -0 | sed -E -n 's,/proc/([0-9]+)/.+$,\1,pg') +# EOF +# } +# ;; +# *) +# _pkillf() { +# while IFS= read -r pid; do +# kill "$pid" || true +# done << EOF +# $(ps -x -o pid= -o command= | grep -E "$@" | cut -d' ' -f1) +# EOF +# } +# ;; +# esac +# fi +# +# _maximize_pane() { +# current_session=${1:-$(tmux display -p '#{session_name}')} +# current_pane=${2:-$(tmux display -p '#{pane_id}')} +# +# dead_panes=$(tmux list-panes -s -t "$current_session" -F '#{pane_dead} #{pane_id} #{pane_start_command}' | grep -E -o '^1 %.+maximized.+$' || true) +# restore=$(printf "%s" "$dead_panes" | sed -n -E -e "s/^1 $current_pane .+maximized.+'(%[0-9]+)'\"?$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t $current_pane/p"\ +# -e "s/^1 (%[0-9]+) .+maximized.+'$current_pane'\"?$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t \1/p") +# +# if [ -z "$restore" ]; then +# [ "$(tmux list-panes -t "$current_session:" | wc -l | sed 's/^ *//g')" -eq 1 ] && tmux display "Can't maximize with only one pane" && return +# current_pane_height=$(tmux display -t "$current_pane" -p "#{pane_height}") +# info=$(tmux new-window -t "$current_session:" -F "#{session_name}:#{window_index}.#{pane_id}" -P "maximized... 2>/dev/null & tmux setw -t \"$current_session:\" remain-on-exit on; printf \"\\033[\$(tput lines);0fPane has been maximized, press + to restore\n\" '$current_pane'") +# session_window=${info%.*} +# new_pane=${info#*.} +# +# retry=1000 +# while [ x"$(tmux list-panes -t "$session_window" -F '#{session_name}:#{window_index}.#{pane_id} #{pane_dead}' 2>/dev/null)" != x"$info 1" ] && [ "$retry" -ne 0 ]; do +# sleep 0.1 +# retry=$((retry - 1)) +# done +# if [ "$retry" -eq 0 ]; then +# tmux display 'Unable to maximize pane' +# fi +# +# tmux setw -t "$session_window" remain-on-exit off \; swap-pane -s "$current_pane" -t "$new_pane" +# else +# $restore || tmux kill-pane +# fi +# } +# +# _toggle_mouse() { +# old=$(tmux show -gv mouse) +# new="" +# +# if [ "$old" = "on" ]; then +# new="off" +# else +# new="on" +# fi +# +# tmux set -g mouse $new +# } +# +# _battery_info() { +# count=0 +# charge=0 +# case "$_uname_s" in +# *Darwin*) +# while IFS= read -r line; do +# [ -z "$line" ] && continue +# discharging=$(printf '%s' "$line" | grep -qi "discharging" && echo "true" || echo "false") +# percentage=$(printf '%s' "$line" | grep -E -o '[0-9]+%' || echo "0%") +# charge=$(awk -v charge="$charge" -v percentage="${percentage%%%}" 'BEGIN { print charge + percentage / 100 }') +# count=$((count + 1)) +# done << EOF +# $(pmset -g batt | grep 'InternalBattery') +# EOF +# ;; +# *Linux*) +# while IFS= read -r batpath; do +# [ -z "$batpath" ] && continue +# grep -i -q device "$batpath/scope" 2> /dev/null && continue +# +# discharging=$(grep -qi "discharging" "$batpath/status" && echo "true" || echo "false") +# bat_capacity="$batpath/capacity" +# if [ -r "$bat_capacity" ]; then +# charge=$(awk -v charge="$charge" -v capacity="$(cat "$bat_capacity")" 'BEGIN { print charge + (capacity > 100 ? 100 : capacity) / 100 }') +# else +# bat_energy_full="$batpath/energy_full" +# bat_energy_now="$batpath/energy_now" +# if [ -r "$bat_energy_full" ] && [ -r "$bat_energy_now" ]; then +# charge=$(awk -v charge="$charge" -v energy_now="$(cat "$bat_energy_now")" -v energy_full="$(cat "$bat_energy_full")" 'BEGIN { print charge + energy_now / energy_full }') +# fi +# fi +# count=$((count + 1)) +# done << EOF +# $(find /sys/class/power_supply -maxdepth 1 -iname '*bat*') +# EOF +# ;; +# *CYGWIN*|*MSYS*|*MINGW*) +# while IFS= read -r line; do +# [ -z "$line" ] && continue +# discharging=$(printf '%s' "$line" | awk '{ s = ($1 == 1) ? "true" : "false"; print s }') +# charge=$(printf '%s' "$line" | awk -v charge="$charge" '{ print charge + $2 / 100 }') +# count=$((count + 1)) +# done << EOF +# $(wmic path Win32_Battery get BatteryStatus, EstimatedChargeRemaining 2> /dev/null | tr -d '\r' | tail -n +2 || true) +# EOF +# ;; +# *OpenBSD*) +# for batid in 0 1 2; do +# sysctl -n "hw.sensors.acpibat$batid.raw0" 2>&1 | grep -q 'not found' && continue +# discharging=$(sysctl -n "hw.sensors.acpibat$batid.raw0" | grep -q 1 && echo "true" || echo "false") +# if sysctl -n "hw.sensors.acpibat$batid" | grep -q amphour; then +# charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.amphour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.amphour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }') +# else +# charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.watthour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.watthour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }') +# fi +# count=$((count + 1)) +# done +# ;; +# esac +# [ "$count" -ne 0 ] && charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }') || true +# } +# +# _battery_status() { +# _battery_info +# if [ "$charge" = 0 ]; then +# tmux set -ug '@battery_status' +# return +# fi +# +# battery_status_charging=$1 +# battery_status_discharging=$2 +# if [ x"$discharging" = x"true" ]; then +# battery_status="$battery_status_discharging" +# else +# battery_status="$battery_status_charging" +# fi +# +# tmux set -g '@battery_status' "$battery_status" +# } +# +# _battery_bar() { +# _battery_info +# if [ "$charge" = 0 ]; then +# tmux set -ug '@battery_bar' \;\ +# set -ug '@battery_hbar' \;\ +# set -ug '@battery_vbar' \;\ +# set -ug '@battery_percentage' +# return +# fi +# +# battery_bar_symbol_full=$1 +# battery_bar_symbol_empty=$2 +# battery_bar_length=$3 +# battery_bar_palette=$4 +# battery_hbar_palette=$5 +# battery_vbar_palette=$6 +# +# if [ x"$battery_bar_length" = x"auto" ]; then +# columns=$(tmux -q display -p '#{client_width}' 2> /dev/null || echo 80) +# if [ "$columns" -ge 80 ]; then +# battery_bar_length=10 +# else +# battery_bar_length=5 +# fi +# fi +# +# if echo "$battery_bar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; } +# palette_style=$1 +# battery_bg=${2:-none} +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# battery_bar="#[bg=$battery_bg]" +# # shellcheck disable=SC2046 +# [ "$full" -gt 0 ] && \ +# battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_full" $(echo "$palette" | cut -d' ' -f1-"$full"))" +# # shellcheck disable=SC2046 +# empty=$((battery_bar_length - full)) +# # shellcheck disable=SC2046 +# [ "$empty" -gt 0 ] && \ +# battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_empty" $(echo "$palette" | cut -d' ' -f$((full + 1))-$((full + empty))))" +# eval battery_bar="$battery_bar#[fg=colour\${$((full == 0 ? 1 : full))}]" +# elif echo "$battery_bar_palette" | grep -q -E '^(([#a-z0-9]{7,9}|none),?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; } +# battery_full_fg=$1 +# battery_empty_fg=$2 +# battery_bg=$3 +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# [ x"$battery_bg" != x"none" ] && \ +# battery_bar="#[bg=$battery_bg]" +# #shellcheck disable=SC2046 +# [ "$full" -gt 0 ] && \ +# battery_bar="$battery_bar#[fg=$battery_full_fg]$(printf "%0.s$battery_bar_symbol_full" $(seq 1 "$full"))" +# empty=$((battery_bar_length - full)) +# #shellcheck disable=SC2046 +# [ "$empty" -gt 0 ] && \ +# battery_bar="$battery_bar#[fg=$battery_empty_fg]$(printf "%0.s$battery_bar_symbol_empty" $(seq 1 "$empty"))" && \ +# battery_bar="$battery_bar#[fg=$battery_empty_fg]" +# fi +# +# if echo "$battery_hbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; } +# palette_style=$1 +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# eval battery_hbar_fg="colour\${$((full == 0 ? 1 : full))}" +# elif echo "$battery_hbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; } +# +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_hbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }") +# fi +# +# eval set -- "▏ ▎ ▍ ▌ ▋ ▊ ▉ █" +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_hbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }") +# battery_hbar="#[fg=${battery_hbar_fg?}]${battery_hbar_symbol?}" +# +# if echo "$battery_vbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; } +# palette_style=$1 +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# eval battery_vbar_fg="colour\${$((full == 0 ? 1 : full))}" +# elif echo "$battery_vbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; } +# +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_vbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }") +# fi +# +# eval set -- "▁ ▂ ▃ ▄ ▅ ▆ ▇ █" +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_vbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }") +# battery_vbar="#[fg=${battery_vbar_fg?}]${battery_vbar_symbol?}" +# +# battery_percentage="$(awk "BEGIN { printf \"%.0f%%\", ($charge) * 100 }")" +# +# tmux set -g '@battery_status' "$battery_status" \;\ +# set -g '@battery_bar' "$battery_bar" \;\ +# set -g '@battery_hbar' "$battery_hbar" \;\ +# set -g '@battery_vbar' "$battery_vbar" \;\ +# set -g '@battery_percentage' "$battery_percentage" +# } +# +# _pane_info() { +# pane_pid="$1" +# pane_tty="${2##/dev/}" +# case "$_uname_s" in +# *CYGWIN*) +# ps -al | tail -n +2 | awk -v pane_pid="$pane_pid" -v tty="$pane_tty" ' +# ((/ssh/ && !/-W/) || !/ssh/) && !/tee/ && $5 == tty { +# user[$1] = $6; if (!child[$2]) child[$2] = $1 +# } +# END { +# pid = pane_pid +# while (child[pid]) +# pid = child[pid] +# +# file = "/proc/" pid "/cmdline"; getline command < file; close(file) +# gsub(/\0/, " ", command) +# "id -un " user[pid] | getline username +# print pid":"username":"command +# } +# ' +# ;; +# *Linux*) +# ps -t "$pane_tty" --sort=lstart -o user=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -o pid= -o ppid= -o command= | awk -v pane_pid="$pane_pid" ' +# ((/ssh/ && !/-W/) || !/ssh/) && !/tee/ { +# user[$2] = $1; if (!child[$3]) child[$3] = $2; pid=$2; $1 = $2 = $3 = ""; command[pid] = substr($0,4) +# } +# END { +# pid = pane_pid +# while (child[pid]) +# pid = child[pid] +# +# print pid":"user[pid]":"command[pid] +# } +# ' +# ;; +# *) +# ps -t "$pane_tty" -o user=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -o pid= -o ppid= -o command= | awk -v pane_pid="$pane_pid" ' +# ((/ssh/ && !/-W/) || !/ssh/) && !/tee/ { +# user[$2] = $1; if (!child[$3]) child[$3] = $2; pid=$2; $1 = $2 = $3 = ""; command[pid] = substr($0,4) +# } +# END { +# pid = pane_pid +# while (child[pid]) +# pid = child[pid] +# +# print pid":"user[pid]":"command[pid] +# } +# ' +# ;; +# esac +# } +# +# _ssh_or_mosh_args() { +# case "$1" in +# *ssh*) +# args=$(printf '%s' "$1" | perl -n -e 'print if s/.*?\bssh[\w]*\s*((?:\s+-\w+)*)(\s+\w+)(\s\w+)?/\1\2/') +# ;; +# *mosh-client*) +# args=$(printf '%s' "$1" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g') +# ;; +# esac +# +# printf '%s' "$args" +# } +# +# _username() { +# pane_pid=${1:-$(tmux display -p '#{pane_pid}')} +# pane_tty=${2:-$(tmux display -p '#{b:pane_tty}')} +# ssh_only=$3 +# +# pane_info=$(_pane_info "$pane_pid" "$pane_tty") +# command=${pane_info#*:} +# command=${command#*:} +# +# ssh_or_mosh_args=$(_ssh_or_mosh_args "$command") +# if [ -n "$ssh_or_mosh_args" ]; then +# # shellcheck disable=SC2086 +# username=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk '/^user / { print $2; exit }') +# # shellcheck disable=SC2086 +# [ -z "$username" ] && username=$(ssh $ssh_or_mosh_args -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%username%% %r >&2'" 2>&1 | awk '/^%username% / { print $2; exit }') +# [ -z "$username" ] && username=$(ssh $ssh_or_mosh_args -v -T -o ControlPath=none -o ProxyCommand=false -o IdentityFile='%%username%%/%r' 2>&1 | awk '/%username%/ { print substr($4,12); exit }') +# else +# if ! _is_true "$ssh_only"; then +# username=${pane_info#*:} +# username=${username%%:*} +# fi +# fi +# +# printf '%s\n' "$username" +# } +# +# _hostname() { +# pane_pid=${1:-$(tmux display -p '#{pane_pid}')} +# pane_tty=${2:-$(tmux display -p '#{b:pane_tty}')} +# ssh_only=$3 +# full=$4 +# h_or_H=$5 +# +# pane_info=$(_pane_info "$pane_pid" "$pane_tty") +# command=${pane_info#*:} +# command=${command#*:} +# +# ssh_or_mosh_args=$(_ssh_or_mosh_args "$command") +# if [ -n "$ssh_or_mosh_args" ]; then +# # shellcheck disable=SC2086 +# hostname=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk '/^hostname / { print $2; exit }') +# # shellcheck disable=SC2086 +# [ -z "$hostname" ] && hostname=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%hostname%% %h >&2'" $ssh_or_mosh_args 2>&1 | awk '/^%hostname% / { print $2; exit }') +# +# if ! _is_true "$full"; then +# case "$hostname" in +# *[a-z-].*) +# hostname=${hostname%%.*} +# ;; +# 127.0.0.1) +# hostname="localhost" +# ;; +# esac +# fi +# else +# if ! _is_true "$ssh_only"; then +# hostname="$h_or_H" +# fi +# fi +# +# printf '%s\n' "$hostname" +# } +# +# _root() { +# pane_pid=${1:-$(tmux display -p '#{pane_pid}')} +# pane_tty=${2:-$(tmux display -p '#{b:pane_tty}')} +# root=$3 +# +# username=$(_username "$pane_id" "$pane_tty" false) +# +# [ x"$username" = x"root" ] && echo "$root" +# } +# +# _uptime() { +# case "$_uname_s" in +# *Darwin*|*FreeBSD*) +# boot=$(sysctl -q -n kern.boottime | awk -F'[ ,:]+' '{ print $4 }') +# now=$(date +%s) +# ;; +# *Linux*|*CYGWIN*|*MSYS*|*MINGW*) +# boot=0 +# now=$(cut -d' ' -f1 < /proc/uptime) +# ;; +# *OpenBSD*) +# boot=$(sysctl -n kern.boottime) +# now=$(date +%s) +# esac +# # shellcheck disable=SC1004 +# awk -v boot="$boot" -v now="$now" ' +# BEGIN { +# uptime = now - boot +# y = int(uptime / 31536000) +# dy = int(uptime / 86400) % 365 +# d = int(uptime / 86400) +# h = int(uptime / 3600) % 24 +# m = int(uptime / 60) % 60 +# s = int(uptime) % 60 +# +# system("tmux set -g @uptime_y " y + 0 " \\; " \ +# "set -g @uptime_dy " dy + 0 " \\; " \ +# "set -g @uptime_d " d + 0 " \\; " \ +# "set -g @uptime_h " h + 0 " \\; " \ +# "set -g @uptime_m " m + 0 " \\; " \ +# "set -g @uptime_s " s + 0) +# }' +# } +# +# _loadavg() { +# case "$_uname_s" in +# *Darwin*|*FreeBSD*) +# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f2)" +# ;; +# *Linux*|*CYGWIN*) +# tmux set -g @loadavg "$(cut -d' ' -f1 < /proc/loadavg)" +# ;; +# *OpenBSD*) +# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f1)" +# ;; +# esac +# } +# +# _split_window_ssh() { +# pane_pid=${1:-$(tmux display -p '#{pane_pid}')} +# pane_tty=${2:-$(tmux display -p '#{b:pane_tty}')} +# shift 2 +# +# pane_info=$(_pane_info "$pane_pid" "$pane_tty") +# command=${pane_info#*:} +# command=${command#*:} +# +# case "$command" in +# *mosh-client*) +# # shellcheck disable=SC2046 +# tmux split-window "$@" mosh $(echo "$command" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/') +# ;; +# *ssh*) +# # shellcheck disable=SC2046 +# tmux split-window "$@" $(echo "$command" | sed -e 's/;/\\;/g') +# ;; +# *) +# tmux split-window "$@" +# esac +# } +# +# _split_window() { +# _split_window_ssh "$@" +# } +# +# _apply_24b() { +# tmux_conf_theme_24b_colour=${tmux_conf_theme_24b_colour:-auto} +# tmux_conf_24b_colour=${tmux_conf_24b_colour:-$tmux_conf_theme_24b_colour} +# if [ x"$tmux_conf_24b_colour" = x"auto" ]; then +# case "$COLORTERM" in +# truecolor|24bit) +# apply_24b=true +# ;; +# esac +# if [ x"$apply_24b" = x"" ] && [ x"$(tput colors)" = x"16777216" ]; then +# apply_24b=true +# fi +# elif _is_true "$tmux_conf_24b_colour"; then +# apply_24b=true +# fi +# if [ x"$apply_24b" = x"true" ]; then +# case "$TERM" in +# screen-*|tmux-*) +# ;; +# *) +# tmux set-option -ga terminal-overrides ",*256col*:Tc" +# ;; +# esac +# fi +# } +# +# _apply_bindings() { +# cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT +# +# tmux list-keys | grep -vF 'tmux.conf.local' | grep -E 'new-window|split(-|_)window|new-session|copy-selection|copy-pipe' > "$cfg" +# +# # tmux 3.0 doesn't include 02254d1e5c881be95fd2fc37b4c4209640b6b266 and the +# # output of list-keys can be truncated +# perl -p -i -e "s/'#\{\?window_zoomed_flag,Unzoom,Zoom\}' 'z' \{resize-pane -$/'#{?window_zoomed_flag,Unzoom,Zoom}' 'z' {resize-pane -Z}\"/g" "$cfg" +# +# tmux_conf_new_window_retain_current_path=${tmux_conf_new_window_retain_current_path:-false} +# if ! _is_disabled "$tmux_conf_new_window_retain_current_path"; then +# perl -p -i -e " +# s/\bnew-window\b([^;}\n]*?)(?:\s+-c\s+((?:\\\\\")?|\"?|'?)#\{pane_current_path\}\2)/new-window\1/g" \ +# "$cfg" +# fi +# +# tmux_conf_new_pane_retain_current_path=${tmux_conf_new_pane_retain_current_path:-true} +# if ! _is_disabled "$tmux_conf_new_pane_retain_current_path"; then +# perl -p -i -e " +# s/\brun-shell\b\s+(\"|')cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+#\{b:pane_tty\}([^\n\1]*)(\s+-c\s+((?:\\\\\")?|\"?|'?)#\{pane_current_path\}\4)([^\n\1]*)\1/run-shell \1cut -c3- ~\/.tmux.conf | sh -s _split_window #{pane_pid} #{b:pane_tty}\2\5\1/g +# ; +# s/\brun-shell\b(\s+((?:\\\\\")?|\"?|'?)cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+((?:\\\\\")?|\"?|'?)#\{b:pane_tty\}\3)(.*?)\2/split-window\4/g +# ; +# s/\bsplit-window\b([^;}\n]*?)(?:\s+-c\s+((?:\\\\\")?|\"?|'?)#\{pane_current_path\}\2)/split-window\1/g" \ +# "$cfg" +# fi +# +# if ! _is_disabled "$tmux_conf_new_window_retain_current_path"; then +# if _is_true "$tmux_conf_new_window_retain_current_path"; then +# perl -p -i -e " +# s/\bnew-window\b(?!\s+(?:-|}))/{$&}/g if /\bdisplay-menu\b/ +# ; +# s/\bnew-window\b/new-window -c '#\{pane_current_path\}'/g" \ +# "$cfg" +# fi +# fi +# +# perl -p -i -e " +# s/\bsplit-window\b((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!\bssh\b)[^\s]+))*)?(?:\s+(\bssh\b))((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!\bssh\b)[^\s]+))*)?/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window_ssh #\{pane_pid\} #\{b:pane_tty\}\1'/g if /\bsplit-window\b((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!ssh)[^\s]+))*)?(?:\s+(ssh))((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!ssh)[^\s]+))*)?/"\ +# "$cfg" +# +# tmux_conf_new_pane_reconnect_ssh=${tmux_conf_new_pane_reconnect_ssh:-false} +# if ! _is_disabled "$tmux_conf_new_pane_reconnect_ssh" && _is_true "$tmux_conf_new_pane_reconnect_ssh"; then +# perl -p -i -e "s/\bsplit-window\b([^;}\n\"]*)/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window #\{pane_pid\} #\{b:pane_tty\}\1'/g" "$cfg" +# fi +# +# if ! _is_disabled "$tmux_conf_new_pane_retain_current_path" && _is_true "$tmux_conf_new_pane_retain_current_path"; then +# perl -p -i -e " +# s/\bsplit-window\b(?!\s+(?:-|}))/{$&}/g if /\bdisplay-menu\b/ +# ; +# s/\bsplit-window\b/split-window -c '#{pane_current_path}'\1/g +# ; +# s/\brun-shell\b\s+'cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window(_ssh)?\s+#\{pane_pid\}\s+#\{b:pane_tty\}([^}\n']*)'/run-shell 'cut -c3- ~\/.tmux.conf | sh -s _split_window\1 #\{pane_pid\} #\{b:pane_tty\} -c \\\\\"#\{pane_current_path\}\\\\\"\2'/g if /\bdisplay-menu\b/ +# ; +# s/\brun-shell\b\s+'cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window(_ssh)?\s+#\{pane_pid\}\s+#\{b:pane_tty\}([^}\n']*)'/run-shell 'cut -c3- ~\/.tmux.conf | sh -s _split_window\1 #\{pane_pid\} #\{b:pane_tty\} -c \"#\{pane_current_path\}\"\2'/g" \ +# "$cfg" +# fi +# +# tmux_conf_new_session_prompt=${tmux_conf_new_session_prompt:-false} +# if ! _is_disabled "$tmux_conf_new_session_prompt" && _is_true "$tmux_conf_new_session_prompt"; then +# perl -p -i \ +# -e "s/(? /dev/null 2>&1 && command='xsel -i -b' +# ! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1 && command='xclip -i -selection clipboard > \/dev\/null 2>\&1' +# command -v pbcopy > /dev/null 2>&1 && command='pbcopy' +# command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy' +# command -v clip.exe > /dev/null 2>&1 && command='clip\.exe' +# [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard' +# +# if [ -n "$command" ]; then +# if ! _is_disabled "$tmux_conf_copy_to_os_clipboard" && _is_true "$tmux_conf_copy_to_os_clipboard"; then +# perl -p -i -e "s/(?!.*?$command)\bcopy-(?:selection|pipe)(-and-cancel)?\b/copy-pipe\1 '$command'/g" "$cfg" +# else +# if [ $_tmux_version -ge 320 ]; then +# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2?/copy-pipe\1/g" "$cfg" +# else +# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2?/copy-selection\1/g" "$cfg" +# fi +# fi +# fi +# +# # until tmux >= 3.0, output of tmux list-keys can't be consumed back by tmux source-file without applying some escapings +# awk < "$cfg" \ +# '{i = $2 == "-T" ? 4 : 5; gsub(/^[;]$/, "\\\\&", $i); gsub(/^[$"#~]$/, "'"'"'&'"'"'", $i); gsub(/^['"'"']$/, "\"&\"", $i); print}' > "$cfg.in" +# +# # ignore bindings with errors +# if ! tmux source-file "$cfg.in"; then +# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true) +# while ! out=$(tmux source-file "$verbose_flag" "$cfg.in"); do +# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2) +# perl -n -i -e "if ($. != $line) { print }" "$cfg.in" +# done +# fi +# } +# +# _apply_theme() { +# +# # -- default theme ----------------------------------------------------- +# +# tmux_conf_theme_colour_1=${tmux_conf_theme_colour_1:-#080808} # dark gray +# tmux_conf_theme_colour_2=${tmux_conf_theme_colour_2:-#303030} # gray +# tmux_conf_theme_colour_3=${tmux_conf_theme_colour_3:-#8a8a8a} # light gray +# tmux_conf_theme_colour_4=${tmux_conf_theme_colour_4:-#00afff} # light blue +# tmux_conf_theme_colour_5=${tmux_conf_theme_colour_5:-#ffff00} # yellow +# tmux_conf_theme_colour_6=${tmux_conf_theme_colour_6:-#080808} # dark gray +# tmux_conf_theme_colour_7=${tmux_conf_theme_colour_7:-#e4e4e4} # white +# tmux_conf_theme_colour_8=${tmux_conf_theme_colour_8:-#080808} # dark gray +# tmux_conf_theme_colour_9=${tmux_conf_theme_colour_9:-#ffff00} # yellow +# tmux_conf_theme_colour_10=${tmux_conf_theme_colour_10:-#ff00af} # pink +# tmux_conf_theme_colour_11=${tmux_conf_theme_colour_11:-#5fff00} # green +# tmux_conf_theme_colour_12=${tmux_conf_theme_colour_12:-#8a8a8a} # light gray +# tmux_conf_theme_colour_13=${tmux_conf_theme_colour_13:-#e4e4e4} # white +# tmux_conf_theme_colour_14=${tmux_conf_theme_colour_14:-#080808} # dark gray +# tmux_conf_theme_colour_15=${tmux_conf_theme_colour_15:-#080808} # dark gray +# tmux_conf_theme_colour_16=${tmux_conf_theme_colour_16:-#d70000} # red +# tmux_conf_theme_colour_17=${tmux_conf_theme_colour_17:-#e4e4e4} # white +# +# # -- panes ------------------------------------------------------------- +# +# tmux_conf_theme_window_fg=${tmux_conf_theme_window_fg:-default} +# tmux_conf_theme_window_bg=${tmux_conf_theme_window_bg:-default} +# tmux_conf_theme_highlight_focused_pane=${tmux_conf_theme_highlight_focused_pane:-false} +# tmux_conf_theme_focused_pane_fg=${tmux_conf_theme_focused_pane_fg:-default} +# tmux_conf_theme_focused_pane_bg=${tmux_conf_theme_focused_pane_bg:-$tmux_conf_theme_colour_2} +# +# window_style="fg=$tmux_conf_theme_window_fg,bg=$tmux_conf_theme_window_bg" +# if _is_true "$tmux_conf_theme_highlight_focused_pane"; then +# window_active_style="fg=$tmux_conf_theme_focused_pane_fg,bg=$tmux_conf_theme_focused_pane_bg" +# else +# window_active_style="default" +# fi +# +# tmux_conf_theme_pane_border_style=${tmux_conf_theme_pane_border_style:-thin} +# tmux_conf_theme_pane_border=${tmux_conf_theme_pane_border:-$tmux_conf_theme_colour_2} +# tmux_conf_theme_pane_active_border=${tmux_conf_theme_pane_active_border:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_pane_border_fg=${tmux_conf_theme_pane_border_fg:-$tmux_conf_theme_pane_border} +# tmux_conf_theme_pane_active_border_fg=${tmux_conf_theme_pane_active_border_fg:-$tmux_conf_theme_pane_active_border} +# case "$tmux_conf_theme_pane_border_style" in +# fat) +# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-$tmux_conf_theme_pane_border_fg} +# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-$tmux_conf_theme_pane_active_border_fg} +# ;; +# thin|*) +# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-default} +# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-default} +# ;; +# esac +# +# tmux_conf_theme_pane_indicator=${tmux_conf_theme_pane_indicator:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_pane_active_indicator=${tmux_conf_theme_pane_active_indicator:-$tmux_conf_theme_colour_4} +# +# # -- status line ------------------------------------------------------- +# +# tmux_conf_theme_left_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_main-}") +# tmux_conf_theme_left_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_sub-|}") +# tmux_conf_theme_right_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_main-}") +# tmux_conf_theme_right_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_sub-|}") +# +# tmux_conf_theme_message_fg=${tmux_conf_theme_message_fg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_message_bg=${tmux_conf_theme_message_bg:-$tmux_conf_theme_colour_5} +# tmux_conf_theme_message_attr=${tmux_conf_theme_message_attr:-bold} +# +# tmux_conf_theme_message_command_fg=${tmux_conf_theme_message_command_fg:-$tmux_conf_theme_colour_5} +# tmux_conf_theme_message_command_bg=${tmux_conf_theme_message_command_bg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_message_command_attr=${tmux_conf_theme_message_command_attr:-bold} +# +# tmux_conf_theme_mode_fg=${tmux_conf_theme_mode_fg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_mode_bg=${tmux_conf_theme_mode_bg:-$tmux_conf_theme_colour_5} +# tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-bold} +# +# tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-$tmux_conf_theme_colour_3} +# tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_status_attr=${tmux_conf_theme_status_attr:-none} +# +# tmux_conf_theme_terminal_title=${tmux_conf_theme_terminal_title:-#h ❐ #S ● #I #W} +# +# tmux_conf_theme_terminal_title=$(echo "$tmux_conf_theme_terminal_title" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# +# tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-$tmux_conf_theme_colour_3} +# tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_window_status_attr=${tmux_conf_theme_window_status_attr:-none} +# tmux_conf_theme_window_status_format=${tmux_conf_theme_window_status_format:-#I #W} +# +# tmux_conf_theme_window_status_current_fg=${tmux_conf_theme_window_status_current_fg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_window_status_current_bg=${tmux_conf_theme_window_status_current_bg:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_window_status_current_attr=${tmux_conf_theme_window_status_current_attr:-bold} +# tmux_conf_theme_window_status_current_format=${tmux_conf_theme_window_status_current_format:-#I #W} +# +# tmux_conf_theme_window_status_activity_fg=${tmux_conf_theme_window_status_activity_fg:-default} +# tmux_conf_theme_window_status_activity_bg=${tmux_conf_theme_window_status_activity_bg:-default} +# tmux_conf_theme_window_status_activity_attr=${tmux_conf_theme_window_status_activity_attr:-underscore} +# +# tmux_conf_theme_window_status_bell_fg=${tmux_conf_theme_window_status_bell_fg:-$tmux_conf_theme_colour_5} +# tmux_conf_theme_window_status_bell_bg=${tmux_conf_theme_window_status_bell_bg:-default} +# tmux_conf_theme_window_status_bell_attr=${tmux_conf_theme_window_status_bell_attr:-blink,bold} +# +# tmux_conf_theme_window_status_last_fg=${tmux_conf_theme_window_status_last_fg:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_window_status_last_bg=${tmux_conf_theme_window_status_last_bg:-default} +# tmux_conf_theme_window_status_last_attr=${tmux_conf_theme_window_status_last_attr:-none} +# +# if [ x"$tmux_conf_theme_window_status_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_bg" = x"default" ]; then +# spacer='' +# spacer_current=' ' +# else +# spacer=' ' +# spacer_current=' ' +# fi +# if [ x"$tmux_conf_theme_window_status_last_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_last_bg" = x"default" ] ; then +# spacer_last='' +# else +# spacer_last=' ' +# fi +# if [ x"$tmux_conf_theme_window_status_activity_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_activity_bg" = x"default" ] ; then +# spacer_activity='' +# spacer_last_activity="$spacer_last" +# else +# spacer_activity=' ' +# spacer_last_activity=' ' +# fi +# if [ x"$tmux_conf_theme_window_status_bell_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_bell_bg" = x"default" ] ; then +# spacer_bell='' +# spacer_last_bell="$spacer_last" +# spacer_activity_bell="$spacer_activity" +# spacer_last_activity_bell="$spacer_last_activity" +# else +# spacer_bell=' ' +# spacer_last_bell=' ' +# spacer_activity_bell=' ' +# spacer_last_activity_bell=' ' +# fi +# spacer="#{?window_last_flag,#{?window_activity_flag,#{?window_bell_flag,$spacer_last_activity_bell,$spacer_last_activity},#{?window_bell_flag,$spacer_last_bell,$spacer_last}},#{?window_activity_flag,#{?window_bell_flag,$spacer_activity_bell,$spacer_activity},#{?window_bell_flag,$spacer_bell,$spacer}}}" +# if [ x"$(tmux show -g -v status-justify)" = x"right" ]; then +# if [ -z "$tmux_conf_theme_right_separator_main" ]; then +# window_status_separator=' ' +# else +# window_status_separator='' +# fi +# tmux_conf_theme_window_status_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_status_bg,none]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$spacer$(printf "$tmux_conf_theme_window_status_last_attr" | perl -n -e 'print "#{?window_last_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_last_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_activity_attr" | perl -n -e 'print "#{?window_activity_flag?,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_activity_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_bell_attr" | perl -n -e 'print "#{?window_bell_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_bell_flag,#[\1],}/g; print if !/default/')$tmux_conf_theme_window_status_format#[none]$spacer#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_bg]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#[none]$tmux_conf_theme_right_separator_main" +# tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,none]$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr]$spacer_current$tmux_conf_theme_window_status_current_format$spacer_current#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_right_separator_main" +# else +# if [ -z "$tmux_conf_theme_left_separator_main" ]; then +# window_status_separator=' ' +# else +# window_status_separator='' +# fi +# tmux_conf_theme_window_status_format="#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_bg,none]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$spacer$(printf "$tmux_conf_theme_window_status_last_attr" | perl -n -e 'print "#{?window_last_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_last_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_activity_attr" | perl -n -e 'print "#{?window_activity_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_activity_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_bell_attr" | perl -n -e 'print "#{?window_bell_flag,#[none],}" if /!default/ ; s/([a-z]+),?/#{?window_bell_flag,#[\1],}/g; print if !/default/')$tmux_conf_theme_window_status_format#[none]$spacer#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_status_bg]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}$tmux_conf_theme_left_separator_main" +# tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr]$spacer_current$tmux_conf_theme_window_status_current_format$spacer_current#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg]$tmux_conf_theme_left_separator_main" +# fi +# +# tmux_conf_theme_window_status_format=$(echo "$tmux_conf_theme_window_status_format" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# tmux_conf_theme_window_status_current_format=$(echo "$tmux_conf_theme_window_status_current_format" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# +# # -- indicators +# +# tmux_conf_theme_pairing=${tmux_conf_theme_pairing:-⚇} # U+2687 +# tmux_conf_theme_pairing_fg=${tmux_conf_theme_pairing_fg:-none} +# tmux_conf_theme_pairing_bg=${tmux_conf_theme_pairing_bg:-none} +# tmux_conf_theme_pairing_attr=${tmux_conf_theme_pairing_attr:-none} +# +# tmux_conf_theme_prefix=${tmux_conf_theme_prefix:-⌨} # U+2328 +# tmux_conf_theme_prefix_fg=${tmux_conf_theme_prefix_fg:-none} +# tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-none} +# tmux_conf_theme_prefix_attr=${tmux_conf_theme_prefix_attr:-none} +# +# tmux_conf_theme_mouse=${tmux_conf_theme_mouse:-↗} # U+2197 +# tmux_conf_theme_mouse_fg=${tmux_conf_theme_mouse_fg:-none} +# tmux_conf_theme_mouse_bg=${tmux_conf_theme_mouse_bg:-none} +# tmux_conf_theme_mouse_attr=${tmux_conf_theme_mouse_attr:-none} +# +# tmux_conf_theme_root=${tmux_conf_theme_root:-!} +# tmux_conf_theme_root_fg=${tmux_conf_theme_root_fg:-none} +# tmux_conf_theme_root_bg=${tmux_conf_theme_root_bg:-none} +# tmux_conf_theme_root_attr=${tmux_conf_theme_root_attr:-bold,blink} +# +# tmux_conf_theme_synchronized=${tmux_conf_theme_synchronized:-⚏} # U+268F +# tmux_conf_theme_synchronized_fg=${tmux_conf_theme_synchronized_fg:-none} +# tmux_conf_theme_synchronized_bg=${tmux_conf_theme_synchronized_bg:-none} +# tmux_conf_theme_synchronized_attr=${tmux_conf_theme_synchronized_attr:-none} +# +# # -- status-left style +# +# tmux_conf_theme_status_left=${tmux_conf_theme_status_left-' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '} +# tmux_conf_theme_status_left_fg=${tmux_conf_theme_status_left_fg:-$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8} +# tmux_conf_theme_status_left_bg=${tmux_conf_theme_status_left_bg:-$tmux_conf_theme_colour_9,$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_11} +# tmux_conf_theme_status_left_attr=${tmux_conf_theme_status_left_attr:-bold,none,none} +# +# if [ -n "$tmux_conf_theme_status_left" ]; then +# status_left=$(echo "$tmux_conf_theme_status_left" | sed \ +# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{?session_many_attached,$tmux_conf_theme_pairing ,}/g" \ +# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \ +# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \ +# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g') +# +# if [ -n "$(tmux display -p '#{version}')" ]; then +# status_left=$(echo "$status_left" | sed \ +# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g") +# else +# status_left=$(echo "$status_left" | sed \ +# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_pid} #{b:pane_tty} $tmux_conf_theme_root #D)#[inherit]%g") +# fi +# +# status_left=$(printf '%s' "$status_left" | awk \ +# -v status_bg="$tmux_conf_theme_status_bg" \ +# -v fg_="$tmux_conf_theme_status_left_fg" \ +# -v bg_="$tmux_conf_theme_status_left_bg" \ +# -v attr_="$tmux_conf_theme_status_left_attr" \ +# -v mainsep="$tmux_conf_theme_left_separator_main" \ +# -v subsep="$tmux_conf_theme_left_separator_sub" ' +# function subsplit(s, l, i, a, r) +# { +# l = split(s, a, ",") +# for (i = 1; i <= l; ++i) +# { +# o = split(a[i], _, "(") - 1 +# c = split(a[i], _, ")") - 1 +# open += o - c +# o_ = split(a[i], _, "{") - 1 +# c_ = split(a[i], _, "}") - 1 +# open_ += o_ - c_ +# o__ = split(a[i], _, "[") - 1 +# c__ = split(a[i], _, "]") - 1 +# open__ += o__ - c__ +# +# if (i == l) +# r = sprintf("%s%s", r, a[i]) +# else if (open || open_ || open__) +# r = sprintf("%s%s,", r, a[i]) +# else +# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep) +# } +# +# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r) +# return r +# } +# BEGIN { +# FS = "|" +# l1 = split(fg_, fg, ",") +# l2 = split(bg_, bg, ",") +# l3 = split(attr_, attr, ",") +# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3) +# } +# { +# for (i = j = 1; i <= NF; ++i) +# { +# if (open || open_ || open__) +# printf "|%s", subsplit($i) +# else +# { +# if (i > 1) +# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j_], bg[j], mainsep, fg[j], bg[j], attr[j], subsplit($i) +# else +# printf "#[fg=%s,bg=%s,%s]%s", fg[j], bg[j], attr[j], subsplit($i) +# } +# +# if (!open && !open_ && !open__) +# { +# j_ = j +# j = j % l + 1 +# } +# } +# printf "#[fg=%s,bg=%s,none]%s", bg[j_], status_bg, mainsep +# }') +# fi +# +# status_left="$status_left " +# +# # -- status-right style +# +# tmux_conf_theme_status_right=${tmux_conf_theme_status_right-' #{prefix}#{mouse}#{pairing}#{synchronized}#{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '} +# tmux_conf_theme_status_right_fg=${tmux_conf_theme_status_right_fg:-$tmux_conf_theme_colour_12,$tmux_conf_theme_colour_13,$tmux_conf_theme_colour_14} +# tmux_conf_theme_status_right_bg=${tmux_conf_theme_status_right_bg:-$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_17} +# tmux_conf_theme_status_right_attr=${tmux_conf_theme_status_right_attr:-none,none,bold} +# +# if [ -n "$tmux_conf_theme_status_right" ]; then +# status_right=$(echo "$tmux_conf_theme_status_right" | sed \ +# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{?session_many_attached,$tmux_conf_theme_pairing ,}/g" \ +# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \ +# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \ +# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g') +# +# if [ -z "$(tmux display -p '#{version}')" ]; then +# status_right=$(echo "$status_right" | sed \ +# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g") +# else +# status_right=$(echo "$status_right" | sed \ +# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_pid} #{b:pane_tty} $tmux_conf_theme_root #D)#[inherit]%g") +# fi +# +# status_right=$(printf '%s' "$status_right" | awk \ +# -v status_bg="$tmux_conf_theme_status_bg" \ +# -v fg_="$tmux_conf_theme_status_right_fg" \ +# -v bg_="$tmux_conf_theme_status_right_bg" \ +# -v attr_="$tmux_conf_theme_status_right_attr" \ +# -v mainsep="$tmux_conf_theme_right_separator_main" \ +# -v subsep="$tmux_conf_theme_right_separator_sub" ' +# function subsplit(s, l, i, a, r) +# { +# l = split(s, a, ",") +# for (i = 1; i <= l; ++i) +# { +# o = split(a[i], _, "(") - 1 +# c = split(a[i], _, ")") - 1 +# open += o - c +# o_ = split(a[i], _, "{") - 1 +# c_ = split(a[i], _, "}") - 1 +# open_ += o_ - c_ +# o__ = split(a[i], _, "[") - 1 +# c__ = split(a[i], _, "]") - 1 +# open__ += o__ - c__ +# +# if (i == l) +# r = sprintf("%s%s", r, a[i]) +# else if (open || open_ || open__) +# r = sprintf("%s%s,", r, a[i]) +# else +# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep) +# } +# +# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r) +# return r +# } +# BEGIN { +# FS = "|" +# l1 = split(fg_, fg, ",") +# l2 = split(bg_, bg, ",") +# l3 = split(attr_, attr, ",") +# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3) +# } +# { +# for (i = j = 1; i <= NF; ++i) +# { +# if (open_ || open || open__) +# printf "|%s", subsplit($i) +# else +# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j], (i == 1) ? status_bg : bg[j_], mainsep, fg[j], bg[j], attr[j], subsplit($i) +# +# if (!open && !open_ && !open__) +# { +# j_ = j +# j = j % l + 1 +# } +# } +# }') +# fi +# +# # -- variables +# +# tmux_conf_battery_bar_symbol_full=$(_decode_unicode_escapes "${tmux_conf_battery_bar_symbol_full:-◼}") +# tmux_conf_battery_bar_symbol_empty=$(_decode_unicode_escapes "${tmux_conf_battery_bar_symbol_empty:-◻}") +# tmux_conf_battery_bar_length=${tmux_conf_battery_bar_length:-auto} +# tmux_conf_battery_bar_palette=${tmux_conf_battery_bar_palette:-gradient} +# tmux_conf_battery_hbar_palette=${tmux_conf_battery_hbar_palette:-gradient} +# tmux_conf_battery_vbar_palette=${tmux_conf_battery_vbar_palette:-gradient} +# tmux_conf_battery_status_charging=$(_decode_unicode_escapes "${tmux_conf_battery_status_charging:-↑}") # U+2191 +# tmux_conf_battery_status_discharging=$(_decode_unicode_escapes "${tmux_conf_battery_status_discharging:-↓}") # U+2193 +# +# _pkillf 'cut -c3- ~/\.tmux\.conf \| sh -s _battery_bar' +# _battery_info +# if [ "$charge" != 0 ]; then +# case "$status_left $status_right" in +# *'#{battery_'*|*'#{?battery_'*) +# status_left=$(echo "$status_left" | sed -E \ +# -e 's/#\{(\?)?battery_bar/#\{\1@battery_bar/g' \ +# -e 's/#\{(\?)?battery_hbar/#\{\1@battery_hbar/g' \ +# -e 's/#\{(\?)?battery_vbar/#\{\1@battery_vbar/g' \ +# -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \ +# -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g') +# status_right=$(echo "$status_right" | sed -E \ +# -e 's/#\{(\?)?battery_bar/#\{\1@battery_bar/g' \ +# -e 's/#\{(\?)?battery_hbar/#\{\1@battery_hbar/g' \ +# -e 's/#\{(\?)?battery_vbar/#\{\1@battery_vbar/g' \ +# -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \ +# -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g') +# status_right="#(echo; nice cut -c3- ~/.tmux.conf | sh -s _battery_status \"$tmux_conf_battery_status_charging\" \"$tmux_conf_battery_status_discharging\")$status_right" +# interval=60 +# if [ $_tmux_version -ge 320 ]; then +# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \$sleep_pid; exit 0' TERM; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\"; sleep $interval & sleep_pid=\$!; wait \$sleep_pid; sleep_pid=; done" +# elif [ $_tmux_version -ge 280 ]; then +# status_right="#(echo; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\"; sleep $interval; done)$status_right" +# elif [ $_tmux_version -gt 240 ]; then +# status_right="#(echo; while :; do nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\"; sleep $interval; done)$status_right" +# else +# status_right="#(nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\")$status_right" +# fi +# ;; +# esac +# fi +# +# case "$status_left $status_right" in +# *'#{username}'*|*'#{hostname}'*|*'#{hostname_full}'*|*'#{username_ssh}'*|*'#{hostname_ssh}'*|*'#{hostname_full_ssh}'*) +# status_left=$(echo "$status_left" | sed \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# status_right=$(echo "$status_right" | sed \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# ;; +# esac +# +# _pkillf 'cut -c3- ~/\.tmux\.conf \| sh -s _uptime' +# case "$status_left $status_right" in +# *'#{uptime_'*|*'#{?uptime_'*) +# status_left=$(echo "$status_left" | perl -p -e ' +# ; s/#\{(\?)?uptime_y\b/#\{\1\@uptime_y/g +# ; s/#\{(\?)?uptime_d\b/#\{\1\@uptime_d/g +# ; s/\@uptime_d\b/\@uptime_dy/g if /\@uptime_y\b/ +# ; s/#\{(\?)?uptime_h\b/#\{\1\@uptime_h/g +# ; s/#\{(\?)?uptime_m\b/#\{\1\@uptime_m/g +# ; s/#\{(\?)?uptime_s\b/#\{\1\@uptime_s/g') +# status_right=$(echo "$status_right" | perl -p -e ' +# ; s/#\{(\?)?uptime_y\b/#\{\1\@uptime_y/g +# ; s/#\{(\?)?uptime_d\b/#\{\1\@uptime_d/g +# ; s/\@uptime_d\b/\@uptime_dy/g if /\@uptime_y\b/ +# ; s/#\{(\?)?uptime_h\b/#\{\1\@uptime_h/g +# ; s/#\{(\?)?uptime_m\b/#\{\1\@uptime_m/g +# ; s/#\{(\?)?uptime_s\b/#\{\1\@uptime_s/g') +# interval=60 +# case "$status_left $status_right" in +# *'#{@uptime_s}'*) +# interval=$(tmux show -gv status-interval) +# ;; +# esac +# if [ $_tmux_version -ge 320 ]; then +# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \$sleep_pid; exit 0' TERM; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _uptime; sleep $interval & sleep_pid=\$!; wait \$sleep_pid; sleep_pid=; done" +# elif [ $_tmux_version -gt 280 ]; then +# status_right="#(echo; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _uptime; sleep $interval; done)$status_right" +# elif [ $_tmux_version -gt 240 ]; then +# status_right="#(echo; while :; do nice cut -c3- ~/.tmux.conf | sh -s _uptime; sleep $interval; done)$status_right" +# else +# status_right="#(nice cut -c3- ~/.tmux.conf | sh -s _uptime)$status_right" +# fi +# ;; +# esac +# +# _pkillf 'cut -c3- ~/\.tmux\.conf \| sh -s _loadavg' +# case "$status_left $status_right" in +# *'#{loadavg'*|*'#{?loadavg'*) +# status_left=$(echo "$status_left" | sed -E \ +# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g') +# status_right=$(echo "$status_right" | sed -E \ +# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g') +# interval=$(tmux show -gv status-interval) +# if [ $_tmux_version -ge 320 ]; then +# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \$sleep_pid; exit 0' TERM; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _loadavg; sleep $interval & sleep_pid=\$!; wait \$sleep_pid; sleep_pid=; done" +# elif [ $_tmux_version -gt 280 ]; then +# status_right="#(echo; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _loadavg; sleep $interval; done)$status_right" +# elif [ $_tmux_version -gt 240 ]; then +# status_right="#(echo; while :; do nice cut -c3- ~/.tmux.conf | sh -s _loadavg; sleep $interval; done)$status_right" +# else +# status_right="#(nice cut -c3- ~/.tmux.conf | sh -s _loadavg)$status_right" +# fi +# ;; +# esac +# +# # -- clock ------------------------------------------------------------- +# +# tmux_conf_theme_clock_colour=${tmux_conf_theme_clock_colour:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_clock_style=${tmux_conf_theme_clock_style:-24} +# +# # -- custom variables --------------------------------------------------- +# +# if [ -f ~/.tmux.conf.local ] && [ x"$(cut -c3- ~/.tmux.conf.local | sh 2>/dev/null -s printf probe)" = x"probe" ]; then +# replacements=$(perl -n -e 'print if s!^#\s+([^_][^()\s]+)\s*\(\)\s*{\s*\n!s%#\\\{\1((?:\\s+(?:[^\{\}]+?|#\\{(?:[^\{\}]+?)\}))*)\\\}%#(cut -c3- ~/.tmux.conf.local | sh -s \1\\1)%g; !p' < ~/.tmux.conf.local) +# status_left=$(echo "$status_left" | perl -p -e "$replacements" || echo "$status_left") +# status_right=$(echo "$status_right" | perl -p -e "$replacements" || echo "$status_right") +# fi +# +# # ----------------------------------------------------------------------- +# +# tmux setw -g window-style "$window_style" \; setw -g window-active-style "$window_active_style" \;\ +# setw -g pane-border-style "fg=$tmux_conf_theme_pane_border_fg,bg=$tmux_conf_theme_pane_border_bg" \; set -g pane-active-border-style "fg=$tmux_conf_theme_pane_active_border_fg,bg=$tmux_conf_theme_pane_active_border_bg" \;\ +# set -g display-panes-colour "$tmux_conf_theme_pane_indicator" \; set -g display-panes-active-colour "$tmux_conf_theme_pane_active_indicator" \;\ +# set -g message-style "fg=$tmux_conf_theme_message_fg,bg=$tmux_conf_theme_message_bg,$tmux_conf_theme_message_attr" \;\ +# set -g message-command-style "fg=$tmux_conf_theme_message_command_fg,bg=$tmux_conf_theme_message_command_bg,$tmux_conf_theme_message_command_attr" \;\ +# setw -g mode-style "fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr" \;\ +# set -g status-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ +# set -g status-left-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ +# set -g status-right-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ +# set -g set-titles-string "$(_decode_unicode_escapes "$tmux_conf_theme_terminal_title")" \;\ +# setw -g window-status-style "fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr" \;\ +# setw -g window-status-format "$(_decode_unicode_escapes "$tmux_conf_theme_window_status_format")" \;\ +# setw -g window-status-current-style "fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr" \;\ +# setw -g window-status-current-format "$(_decode_unicode_escapes "$tmux_conf_theme_window_status_current_format")" \;\ +# setw -g window-status-activity-style "fg=$tmux_conf_theme_window_status_activity_fg,bg=$tmux_conf_theme_window_status_activity_bg,$tmux_conf_theme_window_status_activity_attr" \;\ +# setw -g window-status-bell-style "fg=$tmux_conf_theme_window_status_bell_fg,bg=$tmux_conf_theme_window_status_bell_bg,$tmux_conf_theme_window_status_bell_attr" \;\ +# setw -g window-status-last-style "fg=$tmux_conf_theme_window_status_last_fg,bg=$tmux_conf_theme_window_status_last_bg,$tmux_conf_theme_window_status_last_attr" \;\ +# setw -g window-status-separator "$window_status_separator" \;\ +# set -g status-left-length 1000 \; set -g status-left "$(_decode_unicode_escapes "$status_left")" \;\ +# set -g status-right-length 1000 \; set -g status-right "$(_decode_unicode_escapes "$status_right")" \;\ +# setw -g clock-mode-colour "$tmux_conf_theme_clock_colour" \;\ +# setw -g clock-mode-style "$tmux_conf_theme_clock_style" +# } +# +# __apply_plugins() { +# window_active="$1" +# tmux_conf_update_plugins_on_launch="$2" +# tmux_conf_update_plugins_on_reload="$3" +# tmux_conf_uninstall_plugins_on_reload="$4" +# +# TMUX_PLUGIN_MANAGER_PATH=${TMUX_PLUGIN_MANAGER_PATH:-~/.tmux/plugins} +# if [ -z "$(tmux show -gv '@plugin')" ] && [ -z "$(tmux show -gv '@tpm_plugins')" ]; then +# if _is_true "$tmux_conf_uninstall_plugins_on_reload" && [ -d "$TMUX_PLUGIN_MANAGER_PATH/tpm" ]; then +# tmux display 'Uninstalling tpm and plugins...' +# rm -rf "$TMUX_PLUGIN_MANAGER_PATH" +# tmux display 'Done uninstalling tpm and plugins...' +# fi +# else +# if git ls-remote -hq https://github.com/gpakosz/.tmux.git master > /dev/null; then +# if [ ! -d "$TMUX_PLUGIN_MANAGER_PATH/tpm" ]; then +# install_tpm=true +# tmux display 'Installing tpm and plugins...' +# git clone --depth 1 https://github.com/tmux-plugins/tpm "$TMUX_PLUGIN_MANAGER_PATH/tpm" +# elif { [ -z "$window_active" ] && _is_true "$tmux_conf_update_plugins_on_launch"; } || { [ -n "$window_active" ] && _is_true "$tmux_conf_update_plugins_on_reload"; }; then +# update_tpm=true +# tmux display 'Updating tpm and plugins...' +# (cd "$TMUX_PLUGIN_MANAGER_PATH/tpm" && git fetch -q -p && git checkout -q master && git reset -q --hard origin/master) +# fi +# if [ x"$install_tpm" = x"true" ] || [ x"$update_tpm" = x"true" ]; then +# perl -0777 -p -i -e 's/git clone(?!\s+--depth\s+1)/git clone --depth 1/g +# ;s/(install_plugin(.(?!&))*)\n(\s+)done/\1&\n\3done\n\3wait/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/install_plugins.sh" +# perl -p -i -e 's/git submodule update --init --recursive(?!\s+--depth\s+1)/git submodule update --init --recursive --depth 1/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/update_plugin.sh" +# perl -p -i -e 's,\$tmux_file\s+>/dev/null\s+2>\&1,$& || { tmux display "Plugin \$(basename \${plugin_path}) failed" && false; },' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/source_plugins.sh" +# tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH" +# fi +# if [ x"$update_tpm" = x"true" ]; then +# { +# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \ +# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins" >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\ +# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/update_plugins all ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \ +# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/update_plugins" all >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\ +# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/clean_plugins all ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \ +# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/clean_plugins" all >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\ +# tmux display 'Done updating tpm and plugins...' +# } || tmux display 'Failed updating tpm and plugins...' +# elif [ x"$install_tpm" = x"true" ]; then +# { +# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \ +# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins" >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 +# tmux display 'Done installing tpm and plugins...' +# } || tmux display 'Failed installing tpm and plugins...' +# fi +# else +# tmux display "GitHub doesn't seem to be reachable, skipping installing and/or updating tpm and plugins..." +# fi +# +# [ -z "$(tmux show -gqv '@tpm-install')" ] && tmux set -g '@tpm-install' 'I' +# [ -z "$(tmux show -gqv '@tpm-update')" ] && tmux set -g '@tpm-update' 'u' +# [ -z "$(tmux show -gqv '@tpm-clean')" ] && tmux set -g '@tpm-clean' 'M-u' +# [ -f "$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm" ] && "$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm" || tmux display "One or more tpm plugin(s) failed" +# if [ $_tmux_version -gt 260 ]; then +# tmux set -gu '@tpm-install' \; set -gu '@tpm-update' \; set -gu '@tpm-clean' \; set -gu '@plugin' +# fi +# fi +# +# if [ -z "$window_active" ] && [ $_tmux_version -lt 240 ]; then +# tmux run -b "sleep $(expr $(tmux display -p '#{display-time}') / 500) && tmux set display-time 3000 \; display 'This configuration will soon require tmux 2.4+' \; set -u display-time" +# fi +# } +# +# _apply_plugins() { +# tmux_conf_update_plugins_on_launch=${tmux_conf_update_plugins_on_launch:-true} +# tmux_conf_update_plugins_on_reload=${tmux_conf_update_plugins_on_reload:-true} +# tmux_conf_uninstall_plugins_on_reload=${tmux_conf_uninstall_plugins_on_reload:-true} +# tmux run -b "cut -c3- ~/.tmux.conf | sh -s __apply_plugins \"$window_active\" \"$tmux_conf_update_plugins_on_launch\" \"$tmux_conf_update_plugins_on_reload\" \"$tmux_conf_uninstall_plugins_on_reload\"" +# } +# +# _apply_important() { +# cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT +# +# if perl -n -e 'print if /^\s*(?:set|bind|unbind).+?#!important\s*$/' ~/.tmux.conf.local 2>/dev/null > "$cfg.local"; then +# if ! tmux source-file "$cfg.local"; then +# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true) +# while ! out=$(tmux source-file "$verbose_flag" "$cfg.local"); do +# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2) +# perl -n -i -e "if ($. != $line) { print }" "$cfg.local" +# done +# fi +# fi +# } +# +# _apply_configuration() { +# +# window_active="$(tmux display -p '#{window_active}' 2>/dev/null || true)" +# if [ -z "$window_active" ]; then +# if ! command -v perl > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires perl" \; set -u display-time \; run "sleep 3" \; kill-server' +# return +# fi +# if ! command -v sed > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires sed" \; set -u display-time \; run "sleep 3" \; kill-server' +# return +# fi +# if ! command -v awk > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires awk" \; set -u display-time \; run "sleep 3" \; kill-server' +# return +# fi +# if [ $_tmux_version -lt 230 ]; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires tmux 2.3+" \; set -u display-time \; run "sleep 3" \; kill-server' +# return +# fi +# fi +# +# # see https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard +# if command -v reattach-to-user-namespace > /dev/null 2>&1; then +# default_shell="$(tmux show -gv default-shell)" +# case "$default_shell" in +# *fish) +# tmux set -g default-command "reattach-to-user-namespace -l $default_shell" +# ;; +# *sh) +# tmux set -g default-command "exec $default_shell... 2> /dev/null & reattach-to-user-namespace -l $default_shell" +# ;; +# esac +# fi +# +# case "$_uname_s" in +# *CYGWIN*|*MSYS*) +# # prevent Cygwin and MSYS2 from cd-ing into home directory when evaluating /etc/profile +# tmux setenv -g CHERE_INVOKING 1 +# ;; +# esac +# +# _apply_24b +# _apply_theme& +# _apply_bindings& +# wait +# +# _apply_plugins +# _apply_important +# +# # shellcheck disable=SC2046 +# tmux setenv -gu tmux_conf_dummy $(printenv | grep -E -o '^tmux_conf_[^=]+' | awk '{printf "; setenv -gu %s", $0}') +# } +# +# _urlview() { +# tmux capture-pane -J -S - -E - -b "urlview-$1" -t "$1" +# tmux split-window "tmux show-buffer -b urlview-$1 | urlview || true; tmux delete-buffer -b urlview-$1" +# } +# +# _fpp() { +# tmux capture-pane -J -S - -E - -b "fpp-$1" -t "$1" +# tmux split-window -c $2 "tmux show-buffer -b fpp-$1 | fpp || true; tmux delete-buffer -b fpp-$1" +# } +# +# "$@" diff --git a/tmux/.config/tmux/different-layout/.tmux.conf.local b/tmux/.config/tmux/different-layout/.tmux.conf.local new file mode 100644 index 0000000..9071098 --- /dev/null +++ b/tmux/.config/tmux/different-layout/.tmux.conf.local @@ -0,0 +1,431 @@ +# : << EOF +# https://github.com/gpakosz/.tmux +# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, +# without any warranty. +# Copyright 2012— Gregory Pakosz (@gpakosz). + + +# -- navigation ---------------------------------------------------------------- + +# if you're running tmux within iTerm2 +# - and tmux is 1.9 or 1.9a +# - and iTerm2 is configured to let option key act as +Esc +# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys +# then uncomment the following line to make Meta + arrow keys mapping work +#set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D" + + +# -- windows & pane creation --------------------------------------------------- + +# new window retains current path, possible values are: +# - true +# - false (default) +# - disabled (do not modify new-window bindings) +tmux_conf_new_window_retain_current_path=false + +# new pane retains current path, possible values are: +# - true (default) +# - false +# - disabled (do not modify split-window bindings) +tmux_conf_new_pane_retain_current_path=true + +# new pane tries to reconnect ssh sessions, possible values are: +# - true +# - false (default) +# - disabled (do not modify split-window bindings) +tmux_conf_new_pane_reconnect_ssh=false + +# prompt for session name when creating a new session, possible values are: +# - true +# - false (default) +# - disabled (do not modify new-session bindings) +tmux_conf_new_session_prompt=false + + +# -- display ------------------------------------------------------------------- + +# RGB 24-bit colour support (tmux >= 2.2), possible values are: +# - true +# - false +# - auto (default) +# +# automatic detection relies on the COLORTERM environment variable being defined +# to 'truecolor' or '24bit' or '$ tput colors' answering '16777216' +# see https://github.com/termstandard/colors +tmux_conf_24b_colour=auto + +# default theme +tmux_conf_theme_colour_1="#080808" # dark gray +tmux_conf_theme_colour_2="#303030" # gray +tmux_conf_theme_colour_3="#8a8a8a" # light gray +tmux_conf_theme_colour_4="#00afff" # light blue +tmux_conf_theme_colour_5="#ffff00" # yellow +tmux_conf_theme_colour_6="#080808" # dark gray +tmux_conf_theme_colour_7="#e4e4e4" # white +tmux_conf_theme_colour_8="#080808" # dark gray +tmux_conf_theme_colour_9="#ffff00" # yellow +tmux_conf_theme_colour_10="#ff00af" # pink +tmux_conf_theme_colour_11="#5fff00" # green +tmux_conf_theme_colour_12="#8a8a8a" # light gray +tmux_conf_theme_colour_13="#e4e4e4" # white +tmux_conf_theme_colour_14="#080808" # dark gray +tmux_conf_theme_colour_15="#080808" # dark gray +tmux_conf_theme_colour_16="#d70000" # red +tmux_conf_theme_colour_17="#e4e4e4" # white + +# default theme (ansi) +#tmux_conf_theme_colour_1="colour0" +#tmux_conf_theme_colour_2="colour8" +#tmux_conf_theme_colour_3="colour8" +#tmux_conf_theme_colour_4="colour14" +#tmux_conf_theme_colour_5="colour11" +#tmux_conf_theme_colour_6="colour0" +#tmux_conf_theme_colour_7="colour15" +#tmux_conf_theme_colour_8="colour0" +#tmux_conf_theme_colour_9="colour11" +#tmux_conf_theme_colour_10="colour13" +#tmux_conf_theme_colour_11="colour10" +#tmux_conf_theme_colour_12="colour8" +#tmux_conf_theme_colour_13="colour15" +#tmux_conf_theme_colour_14="colour0" +#tmux_conf_theme_colour_15="colour0" +#tmux_conf_theme_colour_16="colour1" +#tmux_conf_theme_colour_17="colour15" + +# window style +tmux_conf_theme_window_fg="default" +tmux_conf_theme_window_bg="default" + +# highlight focused pane (tmux >= 2.1), possible values are: +# - true +# - false (default) +tmux_conf_theme_highlight_focused_pane=false + +# focused pane colours: +tmux_conf_theme_focused_pane_bg="$tmux_conf_theme_colour_2" + +# pane border style, possible values are: +# - thin (default) +# - fat +tmux_conf_theme_pane_border_style=thin + +# pane borders colours: +tmux_conf_theme_pane_border="$tmux_conf_theme_colour_2" +tmux_conf_theme_pane_active_border="$tmux_conf_theme_colour_4" + +# pane indicator colours (when you hit + q) +tmux_conf_theme_pane_indicator="$tmux_conf_theme_colour_4" +tmux_conf_theme_pane_active_indicator="$tmux_conf_theme_colour_4" + +# status line style +tmux_conf_theme_message_fg="$tmux_conf_theme_colour_1" +tmux_conf_theme_message_bg="$tmux_conf_theme_colour_5" +tmux_conf_theme_message_attr="bold" + +# status line command style ( : Escape) +tmux_conf_theme_message_command_fg="$tmux_conf_theme_colour_5" +tmux_conf_theme_message_command_bg="$tmux_conf_theme_colour_1" +tmux_conf_theme_message_command_attr="bold" + +# window modes style +tmux_conf_theme_mode_fg="$tmux_conf_theme_colour_1" +tmux_conf_theme_mode_bg="$tmux_conf_theme_colour_5" +tmux_conf_theme_mode_attr="bold" + +# status line style +tmux_conf_theme_status_fg="$tmux_conf_theme_colour_3" +tmux_conf_theme_status_bg="$tmux_conf_theme_colour_1" +tmux_conf_theme_status_attr="none" + +# terminal title +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{hostname_full} +# - #{hostname_full_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_terminal_title="#h ❐ #S ● #I #W" + +# window status style +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{hostname_full} +# - #{hostname_full_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_window_status_fg="$tmux_conf_theme_colour_3" +tmux_conf_theme_window_status_bg="$tmux_conf_theme_colour_1" +tmux_conf_theme_window_status_attr="none" +tmux_conf_theme_window_status_format="#I #W" +#tmux_conf_theme_window_status_format="#{circled_window_index} #W" +#tmux_conf_theme_window_status_format="#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}" + +# window current status style +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{hostname_full} +# - #{hostname_full_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_window_status_current_fg="$tmux_conf_theme_colour_1" +tmux_conf_theme_window_status_current_bg="$tmux_conf_theme_colour_4" +tmux_conf_theme_window_status_current_attr="bold" +tmux_conf_theme_window_status_current_format="#I #W" +#tmux_conf_theme_window_status_current_format="#{circled_window_index} #W" +#tmux_conf_theme_window_status_current_format="#I #W#{?window_zoomed_flag,🔍,}" + +# window activity status style +tmux_conf_theme_window_status_activity_fg="default" +tmux_conf_theme_window_status_activity_bg="default" +tmux_conf_theme_window_status_activity_attr="underscore" + +# window bell status style +tmux_conf_theme_window_status_bell_fg="$tmux_conf_theme_colour_5" +tmux_conf_theme_window_status_bell_bg="default" +tmux_conf_theme_window_status_bell_attr="blink,bold" + +# window last status style +tmux_conf_theme_window_status_last_fg="$tmux_conf_theme_colour_4" +tmux_conf_theme_window_status_last_bg="$tmux_conf_theme_colour_2" +tmux_conf_theme_window_status_last_attr="none" + +# status left/right sections separators +tmux_conf_theme_left_separator_main="" +tmux_conf_theme_left_separator_sub="|" +tmux_conf_theme_right_separator_main="" +tmux_conf_theme_right_separator_sub="|" +#tmux_conf_theme_left_separator_main='\uE0B0' # /!\ you don't need to install Powerline +#tmux_conf_theme_left_separator_sub='\uE0B1' # you only need fonts patched with +#tmux_conf_theme_right_separator_main='\uE0B2' # Powerline symbols or the standalone +#tmux_conf_theme_right_separator_sub='\uE0B3' # PowerlineSymbols.otf font, see README.md + +# status left/right content: +# - separate main sections with "|" +# - separate subsections with "," +# - built-in variables are: +# - #{battery_bar} +# - #{battery_hbar} +# - #{battery_percentage} +# - #{battery_status} +# - #{battery_vbar} +# - #{circled_session_name} +# - #{hostname_ssh} +# - #{hostname} +# - #{hostname_full} +# - #{hostname_full_ssh} +# - #{loadavg} +# - #{mouse} +# - #{pairing} +# - #{prefix} +# - #{root} +# - #{synchronized} +# - #{uptime_y} +# - #{uptime_d} (modulo 365 when #{uptime_y} is used) +# - #{uptime_h} +# - #{uptime_m} +# - #{uptime_s} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_status_left=" ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} " +tmux_conf_theme_status_right=" #{prefix}#{mouse}#{pairing}#{synchronized}#{?battery_status,#{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} " + +# status left style +tmux_conf_theme_status_left_fg="$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8" +tmux_conf_theme_status_left_bg="$tmux_conf_theme_colour_9,$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_11" +tmux_conf_theme_status_left_attr="bold,none,none" + +# status right style +tmux_conf_theme_status_right_fg="$tmux_conf_theme_colour_12,$tmux_conf_theme_colour_13,$tmux_conf_theme_colour_14" +tmux_conf_theme_status_right_bg="$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_17" +tmux_conf_theme_status_right_attr="none,none,bold" + +# pairing indicator +tmux_conf_theme_pairing="⚇" # U+2687 +tmux_conf_theme_pairing_fg="none" +tmux_conf_theme_pairing_bg="none" +tmux_conf_theme_pairing_attr="none" + +# prefix indicator +tmux_conf_theme_prefix="⌨" # U+2328 +tmux_conf_theme_prefix_fg="none" +tmux_conf_theme_prefix_bg="none" +tmux_conf_theme_prefix_attr="none" + +# mouse indicator +tmux_conf_theme_mouse="↗" # U+2197 +tmux_conf_theme_mouse_fg="none" +tmux_conf_theme_mouse_bg="none" +tmux_conf_theme_mouse_attr="none" + +# root indicator +tmux_conf_theme_root="!" +tmux_conf_theme_root_fg="none" +tmux_conf_theme_root_bg="none" +tmux_conf_theme_root_attr="bold,blink" + +# synchronized indicator +tmux_conf_theme_synchronized="⚏" # U+268F +tmux_conf_theme_synchronized_fg="none" +tmux_conf_theme_synchronized_bg="none" +tmux_conf_theme_synchronized_attr="none" + +# battery bar symbols +tmux_conf_battery_bar_symbol_full="◼" +tmux_conf_battery_bar_symbol_empty="◻" +#tmux_conf_battery_bar_symbol_full="♥" +#tmux_conf_battery_bar_symbol_empty="·" + +# battery bar length (in number of symbols), possible values are: +# - auto +# - a number, e.g. 5 +tmux_conf_battery_bar_length="auto" + +# battery bar palette, possible values are: +# - gradient (default) +# - heat +# - "colour_full_fg,colour_empty_fg,colour_bg" +tmux_conf_battery_bar_palette="gradient" +#tmux_conf_battery_bar_palette="#d70000,#e4e4e4,#000000" # red, white, black + +# battery hbar palette, possible values are: +# - gradient (default) +# - heat +# - "colour_low,colour_half,colour_full" +tmux_conf_battery_hbar_palette="gradient" +#tmux_conf_battery_hbar_palette="#d70000,#ff5f00,#5fff00" # red, orange, green + +# battery vbar palette, possible values are: +# - gradient (default) +# - heat +# - "colour_low,colour_half,colour_full" +tmux_conf_battery_vbar_palette="gradient" +#tmux_conf_battery_vbar_palette="#d70000,#ff5f00,#5fff00" # red, orange, green + +# symbols used to indicate whether battery is charging or discharging +tmux_conf_battery_status_charging="↑" # U+2191 +tmux_conf_battery_status_discharging="↓" # U+2193 +#tmux_conf_battery_status_charging="🔌" # U+1F50C +#tmux_conf_battery_status_discharging="🔋" # U+1F50B + +# clock style (when you hit + t) +# you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right +tmux_conf_theme_clock_colour="$tmux_conf_theme_colour_4" +tmux_conf_theme_clock_style="24" + + +# -- clipboard ----------------------------------------------------------------- + +# in copy mode, copying selection also copies to the OS clipboard +# - true +# - false (default) +# - disabled +# on macOS, this requires installing reattach-to-user-namespace, see README.md +# on Linux, this requires xsel or xclip +tmux_conf_copy_to_os_clipboard=false + + +# -- user customizations ------------------------------------------------------- +# this is the place to override or undo settings + +# increase history size +#set -g history-limit 10000 + +# start with mouse mode enabled +#set -g mouse on + +# force Vi mode +# really you should export VISUAL or EDITOR environment variable, see manual +#set -g status-keys vi +#set -g mode-keys vi + +# replace C-b by C-a instead of using both prefixes +# set -gu prefix2 +# unbind C-a +# unbind C-b +# set -g prefix C-a +# bind C-a send-prefix + +# if you don't want Oh my tmux! to alter a binding, use #!important +# bind v new-window -c #{pane_current_path} #!important + +# move status line to top +#set -g status-position top + + +# -- tpm ----------------------------------------------------------------------- + +# while I don't use tpm myself, many people requested official support so here +# is a seamless integration that automatically installs plugins in parallel + +# whenever a plugin introduces a variable to be used in 'status-left' or +# 'status-right', you can use it in 'tmux_conf_theme_status_left' and +# 'tmux_conf_theme_status_right' variables. + +# by default, launching tmux will update tpm and all plugins +# - true (default) +# - false +tmux_conf_update_plugins_on_launch=true + +# by default, reloading the configuration will update tpm and all plugins +# - true (default) +# - false +tmux_conf_update_plugins_on_reload=true + +# by default, reloading the configuration will uninstall tpm and plugins when no +# plugins are enabled +# - true (default) +# - false +tmux_conf_uninstall_plugins_on_reload=true + +# /!\ the tpm bindings differ slightly from upstream: +# - installing plugins: + I +# - uninstalling plugins: + Alt + u +# - updating plugins: + u + +# /!\ do not add set -g @plugin 'tmux-plugins/tpm' +# /!\ do not add run '~/.tmux/plugins/tpm/tpm' + +# to enable a plugin, use the 'set -g @plugin' syntax: +# visit https://github.com/tmux-plugins for available plugins +#set -g @plugin 'tmux-plugins/tmux-copycat' +#set -g @plugin 'tmux-plugins/tmux-cpu' +#set -g @plugin 'tmux-plugins/tmux-resurrect' +#set -g @plugin 'tmux-plugins/tmux-continuum' +#set -g @continuum-restore 'on' + + +# -- custom variables ---------------------------------------------------------- + +# to define a custom #{foo} variable, define a POSIX shell function between the +# '# EOF' and the '# "$@"' lines. Please note that the opening brace { character +# must be on the same line as the function name otherwise the parse won't detect +# it. +# +# then, use #{foo} in e.g. the 'tmux_conf_theme_status_left' or the +# 'tmux_conf_theme_status_right' variables. + +# # /!\ do not remove the following line +# EOF +# +# # /!\ do not "uncomment" the functions: the leading "# " characters are needed +# +# weather() { # see https://github.com/chubin/wttr.in#one-line-output +# curl -f -s -m 2 'wttr.in?format=3' || printf '\n' # /!\ make sure curl is installed +# sleep 900 # sleep for 15 minutes, throttle network requests whatever the value of status-interval +# } +# +# online() { +# ping -c 1 1.1.1.1 >/dev/null 2>&1 && printf '✔' || printf '✘' +# } +# +# "$@" +# # /!\ do not remove the previous line diff --git a/tmux/.config/tmux/different-layout/LICENSE.MIT b/tmux/.config/tmux/different-layout/LICENSE.MIT new file mode 100644 index 0000000..7adba75 --- /dev/null +++ b/tmux/.config/tmux/different-layout/LICENSE.MIT @@ -0,0 +1,18 @@ +Copyright 2012— Gregory Pakosz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tmux/.config/tmux/different-layout/LICENSE.WTFPLv2 b/tmux/.config/tmux/different-layout/LICENSE.WTFPLv2 new file mode 100644 index 0000000..9668222 --- /dev/null +++ b/tmux/.config/tmux/different-layout/LICENSE.WTFPLv2 @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/tmux/.config/tmux/different-layout/README.md b/tmux/.config/tmux/different-layout/README.md new file mode 100644 index 0000000..8c46580 --- /dev/null +++ b/tmux/.config/tmux/different-layout/README.md @@ -0,0 +1,370 @@ +.tmux +===== + +Self-contained, pretty and versatile `.tmux.conf` configuration file. + +![Screenshot](https://cloud.githubusercontent.com/assets/553208/19740585/85596a5a-9bbf-11e6-8aa1-7c8d9829c008.gif) + +Installation +------------ + +Requirements: + + - tmux **`>= 2.3`** (soon `>= 2.4`) running inside Linux, Mac, OpenBSD, Cygwin + or WSL + - awk, perl and sed + - outside of tmux, `$TERM` must be set to `xterm-256color` + +To install, run the following from your terminal: (you may want to backup your +existing `~/.tmux.conf` first) + +``` +$ cd +$ git clone https://github.com/gpakosz/.tmux.git +$ ln -s -f .tmux/.tmux.conf +$ cp .tmux/.tmux.conf.local . +``` + +💡 You can clone the repository anywhere you want, provided you create the +proper `~/.tmux.conf` symlink and you copy the `.tmux.conf.local` sample file in +your home directory: + +``` +$ git clone https://github.com/gpakosz/.tmux.git /path/to/oh-my-tmux +$ ln -s -f /path/to/oh-my-tmux/.tmux.conf ~/.tmux.conf +$ cp /path/to/oh-my-tmux/.tmux.conf.local ~/.tmux.conf.local +``` + +Then proceed to [customize] your `~/.tmux.conf.local` copy. + +[customize]: #configuration + +If you're a Vim user, setting the `$EDITOR` environment variable to `vim` will +enable and further customize the vi-style key bindings (see tmux manual). + +If you're new to tmux, I recommend you read [tmux 2: Productive Mouse-Free +Development][bhtmux2] by [@bphogan]. + +[bhtmux2]: https://pragprog.com/book/bhtmux2/tmux-2 +[@bphogan]: https://twitter.com/bphogan + +Troubleshooting +--------------- + + - **I'm running tmux `HEAD` and things don't work properly. What should I do?** + + Please open an issue describing what doesn't work with upcoming tmux. I'll do + my best to address it. + + - **Status line is broken and/or gets duplicated at the bottom of the screen. + What gives?** + + This particularly happens on Linux when the distribution provides a version + of glib that received Unicode 9.0 upgrades (glib `>= 2.50.1`) while providing + a version of glibc that didn't (glibc `< 2.26`). You may also configure + `LC_CTYPE` to use an `UTF-8` locale. Typically VTE based terminal emulators + rely on glib's `g_unichar_iswide()` function while tmux relies on glibc's + `wcwidth()` function. When these two functions disagree, display gets messed + up. + + This can also happen on macOS when using iTerm2 and "Use Unicode version 9 + character widths" is enabled in `Preferences... > Profiles > Text` + + For that reason, the default `~/.tmux.conf.local` file stopped using Unicode + characters for which width changed in between Unicode 8.0 and 9.0 standards, + as well as Emojis. + + - **I installed Powerline and/or (patched) fonts but can't see Powerline + symbols.** + + First, you don't need to install Powerline. You only need fonts patched with + Powerline symbols or the standalone `PowerlineSymbols.otf` font. Then make + sure your `~/.tmux.conf.local` copy uses the right code points for + `tmux_conf_theme_left_separator_XXX` values. + + - **I'm using Bash On Windows (WSL), colors and Powerline look are broken.** + + There is currently a [bug][1681] in the new console powering Bash On Windows + preventing text attributes (bold, underscore, ...) to combine properly with + colors. The workaround is to search your `~/.tmux.conf.local` copy and + replace attributes with `'none'`. + + Also, until Window's console replaces its GDI based render with a DirectWrite + one, Powerline symbols will be broken. + + The alternative is to use the [Mintty terminal for WSL][wsltty]. + +[1681]: https://github.com/Microsoft/BashOnWindows/issues/1681 +[wsltty]: https://github.com/mintty/wsltty + +Features +-------- + + - `C-a` acts as secondary prefix, while keeping default `C-b` prefix + - visual theme inspired by [Powerline][] + - [maximize any pane to a new window with ` +`][maximize-pane] + - SSH/Mosh aware username and hostname status line information + - mouse mode toggle with ` m` + - automatic usage of [`reattach-to-user-namespace`][reattach-to-user-namespace] + if available + - laptop battery status line information + - uptime status line information + - optional highlight of focused pane + - configurable new windows and panes behavior (optionally retain current path) + - SSH/Mosh aware split pane (reconnects to remote server) + - copy to OS clipboard (needs [`reattach-to-user-namespace`][reattach-to-user-namespace] + on macOS, `xsel` or `xclip` on Linux) + - support for 4-digit hexadecimal Unicode characters + - [Facebook PathPicker][] integration if available + - [Urlview][] integration if available + +[Powerline]: https://github.com/Lokaltog/powerline +[maximize-pane]: http://pempek.net/articles/2013/04/14/maximizing-tmux-pane-new-window/ +[reattach-to-user-namespace]: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard +[Facebook PathPicker]: https://facebook.github.io/PathPicker/ +[Urlview]: https://packages.debian.org/stable/misc/urlview + +The "maximize any pane to a new window with ` +`" feature is different +from builtin `resize-pane -Z` as it allows you to further split a maximized +pane. It's also more flexible by allowing you to maximize a pane to a new +window, then change window, then go back and the pane is still in maximized +state in its own window. You can then minimize a pane by using ` +` +either from the source window or the maximized window. + +![Maximize pane](https://cloud.githubusercontent.com/assets/553208/9890858/ee3c0ca6-5c02-11e5-890e-05d825a46c92.gif) + +Mouse mode allows you to set the active window, set the active pane, resize +panes and automatically switches to copy-mode to select text. + +![Mouse mode](https://cloud.githubusercontent.com/assets/553208/9890797/8dffe542-5c02-11e5-9c06-a25b452e6fcc.gif) + +Bindings +-------- + +tmux may be controlled from an attached client by using a key combination of a +prefix key, followed by a command key. This configuration uses `C-a` as a +secondary prefix while keeping `C-b` as the default prefix. In the following +list of key bindings: + - `` means you have to either hit Ctrl + a or Ctrl + b + - ` c` means you have to hit Ctrl + a or Ctrl + b followed by c + - ` C-c` means you have to hit Ctrl + a or Ctrl + b followed by Ctrl + c + +This configuration uses the following bindings: + + - ` e` opens `~/.tmux.conf.local` with the editor defined by the + `$EDITOR` environment variable (defaults to `vim` when empty) + - ` r` reloads the configuration + - `C-l` clears both the screen and the tmux history + + - ` C-c` creates a new session + - ` C-f` lets you switch to another session by name + + - ` C-h` and ` C-l` let you navigate windows (default + ` n` and ` p` are unbound) + - ` Tab` brings you to the last active window + + - ` -` splits the current pane vertically + - ` _` splits the current pane horizontally + - ` h`, ` j`, ` k` and ` l` let you navigate + panes ala Vim + - ` H`, ` J`, ` K`, ` L` let you resize panes + - ` <` and ` >` let you swap panes + - ` +` maximizes the current pane to a new window + + - ` m` toggles mouse mode on or off + + - ` U` launches Urlview (if available) + - ` F` launches Facebook PathPicker (if available) + + - ` Enter` enters copy-mode + - ` b` lists the paste-buffers + - ` p` pastes from the top paste-buffer + - ` P` lets you choose the paste-buffer to paste from + +Additionally, `copy-mode-vi` matches [my own Vim configuration][] + +[my own Vim configuration]: https://github.com/gpakosz/.vim.git + +Bindings for `copy-mode-vi`: + +- `v` begins selection / visual mode +- `C-v` toggles between blockwise visual mode and visual mode +- `H` jumps to the start of line +- `L` jumps to the end of line +- `y` copies the selection to the top paste-buffer +- `Escape` cancels the current operation + +Configuration +------------- + +While this configuration tries to bring sane default settings, you may want to +customize it further to your needs. Instead of altering the `~/.tmux.conf` file +and diverging from upstream, the proper way is to edit the `~/.tmux.conf.local` +file. + +Please refer to the sample `.tmux.conf.local` file to know more about variables +you can adjust to alter different behaviors. Pressing ` e` will open +`~/.tmux.conf.local` with the editor defined by the `$EDITOR` environment +variable (defaults to `vim` when empty). + +### Enabling the Powerline look + +Powerline originated as a status-line plugin for Vim. Its popular eye-catching +look is based on the use of special symbols: Powerline Symbols + +To make use of these symbols, there are several options: + +- use a font that already bundles those: this is e.g. the case of the + [2.030R-ro/1.050R-it version][source code pro] of the Source Code Pro font +- use a [pre-patched font][powerline patched fonts] +- use your preferred font along with the [Powerline font][powerline font] (that + only contains the Powerline symbols): [this highly depends on your operating + system and your terminal emulator][terminal support], for instance here's a + screenshot of iTerm2 configured to use `PowerlineSymbols.otf` + ![iTerm2 + Powerline font](https://user-images.githubusercontent.com/553208/62243890-8232f500-b3de-11e9-9b8c-51a5d38bdaa8.png) + +[source code pro]: https://github.com/adobe-fonts/source-code-pro/releases/tag/2.030R-ro/1.050R-it +[powerline patched fonts]: https://github.com/powerline/fonts +[powerline font]: https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf +[terminal support]: http://powerline.readthedocs.io/en/master/usage.html#usage-terminal-emulators +[Powerline manual]: http://powerline.readthedocs.org/en/latest/installation.html#fonts-installation + +Please see the [Powerline manual] for further details. + +Then edit your `~/.tmux.conf.local` copy (with ` e`) and adjust the +following variables: + +``` +tmux_conf_theme_left_separator_main='\uE0B0' +tmux_conf_theme_left_separator_sub='\uE0B1' +tmux_conf_theme_right_separator_main='\uE0B2' +tmux_conf_theme_right_separator_sub='\uE0B3' +``` +### Configuring the status line + +Contrary to the first iterations of this configuration, by now you have total +control on the content and order of `status-left` and `status-right`. + +Edit your `~/.tmux.conf.local` copy (` e`) and adjust the +`tmux_conf_theme_status_left` and `tmux_conf_theme_status_right` variables to +your own preferences. + +This configuration supports the following builtin variables: + + - `#{battery_bar}`: horizontal battery charge bar + - `#{battery_percentage}`: battery percentage + - `#{battery_status}`: is battery charging or discharging? + - `#{battery_vbar}`: vertical battery charge bar + - `#{circled_session_name}`: circled session number, up to 20 + - `#{hostname}`: SSH/Mosh aware hostname information + - `#{hostname_ssh}`: SSH/Mosh aware hostname information, blank when not + connected to a remote server through SSH/Mosh + - `#{loadavg}`: load average + - `#{pairing}`: is session attached to more than one client? + - `#{prefix}`: is prefix being depressed? + - `#{root}`: is current user root? + - `#{synchronized}`: are the panes synchronized? + - `#{uptime_y}`: uptime years + - `#{uptime_d}`: uptime days, modulo 365 when `#{uptime_y}` is used + - `#{uptime_h}`: uptime hours + - `#{uptime_m}`: uptime minutes + - `#{uptime_s}`: uptime seconds + - `#{username}`: SSH/Mosh aware username information + - `#{username_ssh}`: SSH aware username information, blank when not connected + to a remote server through SSH/Mosh + +Beside custom variables mentioned above, the `tmux_conf_theme_status_left` and +`tmux_conf_theme_status_right` variables support usual tmux syntax, e.g. using +`#()` to call an external command that inserts weather information provided by +[wttr.in]: +``` +tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #(curl -m 1 wttr.in?format=3 2>/dev/null; sleep 900) , %R , %d %b | #{username}#{root} | #{hostname} ' +``` +The `sleep 900` call makes sure the network request is issued at most every 15 +minutes whatever the value of `status-interval`. + +![Weather information from wttr.in](https://user-images.githubusercontent.com/553208/52175490-07797c00-27a5-11e9-9fb6-42eec4fe4188.png) + +[wttr.in]: https://github.com/chubin/wttr.in#one-line-output + +💡 You can also define your own custom variables. See the sample +`.tmux.conf.local` file for instructions. + +Finally, remember `tmux_conf_theme_status_left` and +`tmux_conf_theme_status_right` end up being given to tmux as `status-left` and +`status-right` which means they're passed through `strftime()`. As such, the `%` +character has a special meaning and needs to be escaped by doubling it, e.g. +``` +tmux_conf_theme_status_right='#(echo foo %% bar)' +``` +See `man 3 strftime`. + +### Using TPM plugins + +This configuration now comes with built-in [TPM] support: +- use the `set -g @plugin ...` syntax to enable a plugin +- whenever a plugin introduces a variable to be used in `status-left` or + `status-right`, you can use it in `tmux_conf_theme_status_left` and + `tmux_conf_theme_status_right` variables, see instructions above 👆 +- ⚠️ do not add `set -g @plugin 'tmux-plugins/tpm'` +- ⚠️ do not add `run '~/.tmux/plugins/tpm/tpm'` to `~/.tmux.conf` or your +- `~/.tmux.conf.local` copy ← people who are used to alter + `.tmux.conf` to add TPM support will have to adapt their configuration + +⚠️ The TPM bindings differ slightly from upstream: + - installing plugins: ` + I` + - uninstalling plugins: ` + Alt + u` + - updating plugins: ` + u` + +See `~/.tmux.conf.local` for instructions. + +[TPM]: https://github.com/tmux-plugins/tpm + +### Accessing the macOS clipboard from within tmux sessions (tmux `< 2.6`) + +[Chris Johnsen created the `reattach-to-user-namespace` +utility][reattach-to-user-namespace] that makes `pbcopy` and `pbpaste` work +again within tmux. + +To install `reattach-to-user-namespace`, use either [MacPorts][] or +[Homebrew][]: + + $ port install tmux-pasteboard + +or + + $ brew install reattach-to-user-namespace + +Once installed, `reattach-to-usernamespace` will be automatically detected. + +[MacPorts]: http://www.macports.org/ +[Homebrew]: http://brew.sh/ + +### Using the configuration under Cygwin within Mintty + +**I don't recommend running this configuration with Cygwin anymore. Forking +under Cygwin is extremely slow and this configuration issues a lot of +`run-shell` commands under the hood. As such, you will experience high CPU +usage. As an alternative consider using [Mintty terminal for WSL][wsltty].** + +![cygwin](https://cloud.githubusercontent.com/assets/553208/19741789/67a3f3d8-9bc2-11e6-9ecc-499fc0228ee6.png) + +It is possible to use this configuration under Cygwin within Mintty, however +support for Unicode symbols and emojis lacks behind Mac and Linux. + +Particularly, Mintty's text rendering is implemented with GDI which has +limitations: + +- color emojis are only available through DirectWrite starting with Windows 8.1 +- display of double width symbols, like the battery discharging symbol indicator + (U+1F50B) is buggy + +To get Unicode symbols displayed properly, you have to use [font linking]. +Open `regedit.exe` then navigate to the registry key at +`HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink` +and add a new entry for you preferred font to link it with the Segoe UI Symbol +font. + +![regedit](https://cloud.githubusercontent.com/assets/553208/19741304/71a2f3ae-9bc0-11e6-96aa-4c09a812c313.png) + +[font linking]: https://msdn.microsoft.com/en-us/goglobal/bb688134.aspx diff --git a/tmux/.config/tmux/plugins/tmux-power/.github/stale.yml b/tmux/.config/tmux/plugins/tmux-power/.github/stale.yml new file mode 100644 index 0000000..4ed9724 --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-power/.github/stale.yml @@ -0,0 +1,18 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security + - bug +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/tmux/.config/tmux/plugins/tmux-power/LICENSE b/tmux/.config/tmux/plugins/tmux-power/LICENSE new file mode 100644 index 0000000..9e1f8ec --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-power/LICENSE @@ -0,0 +1 @@ +https://wfxr.mit-license.org/2017 diff --git a/tmux/.config/tmux/plugins/tmux-power/README.md b/tmux/.config/tmux/plugins/tmux-power/README.md new file mode 100644 index 0000000..bbb0932 --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-power/README.md @@ -0,0 +1,118 @@ +# Tmux Powerline Theme + +[![TPM](https://img.shields.io/badge/tpm--support-true-blue)](https://github.com/tmux-plugins/tpm) +[![Awesome](https://img.shields.io/badge/Awesome-tmux-d07cd0?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABVklEQVRIS+3VvWpVURDF8d9CRAJapBAfwWCt+FEJthIUUcEm2NgIYiOxsrCwULCwktjYKSgYLfQF1JjCNvoMNhYRCwOO7HAiVw055yoBizvN3nBmrf8+M7PZsc2RbfY3AfRWeNMSVdUlHEzS1t6oqvt4n+TB78l/AKpqHrdwLcndXndU1WXcw50k10c1PwFV1fa3cQVzSR4PMd/IqaoLeIj2N1eTfG/f1gFVtQMLOI+zSV6NYz4COYFneIGLSdZSVbvwCMdxMsnbvzEfgRzCSyzjXAO8xlHcxMq/mI9oD+AGlhqgxjD93OVOD9TUuICdXd++/VeAVewecKKv2NPlfcHUAM1qK9FTnBmQvJjkdDfWzzE7QPOkAfZiEce2ECzhVJJPHWAfGuTwFpo365pO0NYjmEFr5Eas4SPeJfll2rqb38Z7/yaaD+0eNM3kPejt86REvSX6AamgdXkgoxLxAAAAAElFTkSuQmCC)](https://github.com/rothgar/awesome-tmux) +[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://wfxr.mit-license.org/2017) + +Yet another powerline theme for tmux. + +### 📥 Installation + +**Install manually** + +Clone the repo somewhere and source it in `.tmux.conf`: + +```tmux +run-shell "/path/to/tmux-power.tmux" +``` + +*NOTE: Options should be set before sourcing.* + +**Install using [TPM](https://github.com/tmux-plugins/tpm)** + +```tmux +set -g @plugin 'wfxr/tmux-power' +``` + +### 🎨 Themes + +**Gold**(default): `set -g @tmux_power_theme 'gold'` +![screenshot](https://raw.githubusercontent.com/wfxr/i/master/tmux-power-gold.png) + +**Redwine**: `set -g @tmux_power_theme 'redwine'` +![screenshot](https://raw.githubusercontent.com/wfxr/i/master/tmux-power-redwine.png) + +**Moon**: `set -g @tmux_power_theme 'moon'` +![screenshot](https://raw.githubusercontent.com/wfxr/i/master/tmux-power-moon.png) + +**Forest**: `set -g @tmux_power_theme 'forest'` +![screenshot](https://raw.githubusercontent.com/wfxr/i/master/tmux-power-forest.png) + +**Violet**: `set -g @tmux_power_theme 'violet'` +![screenshot](https://raw.githubusercontent.com/wfxr/i/master/tmux-power-violet.png) + +**Snow**: `set -g @tmux_power_theme 'snow'` +![screenshot](https://raw.githubusercontent.com/wfxr/i/master/tmux-power-snow.png) + +**Coral**: `set -g @tmux_power_theme 'coral'` +![screenshot](https://raw.githubusercontent.com/wfxr/i/master/tmux-power-coral.png) + +**Sky**: `set -g @tmux_power_theme 'sky'` +![screenshot](https://raw.githubusercontent.com/wfxr/i/master/tmux-power-sky.png) + +**Default**: `set -g @tmux_power_theme 'default'` +Set this theme if you want to honor the terminal colorscheme. To be used with +something like [pywal](https://github.com/dylanaraps/pywal) for instance. + +### ⚙ Customizing + +You can define your favourite main color if you don't like any of above. + +```tmux +set -g @tmux_power_theme '#483D8B' # dark slate blue +``` + +You can change the date and time formats using strftime: + +```tmux +set -g @tmux_power_date_format '%F' +set -g @tmux_power_time_format '%T' +``` + +You can also customize the icons: + +```tmux +set -g @tmux_power_date_icon ' ' # set it to a blank will disable the icon +set -g @tmux_power_time_icon '🕘' # emoji can be used if your terminal supports +set -g @tmux_power_user_icon 'U' +set -g @tmux_power_session_icon 'S' +set -g @tmux_power_upload_speed_icon '↑' +set -g @tmux_power_download_speed_icon '↓' +set -g @tmux_power_left_arrow_icon '<' +set -g @tmux_power_right_arrow_icon '>' +``` +*The default icons use glyphs from [nerd-fonts](https://github.com/ryanoasis/nerd-fonts).* + +### 📦 Plugin support + +**[tmux-net-speed](https://github.com/wfxr/tmux-net-speed)** + +```tmux +set -g @tmux_power_show_upload_speed true +set -g @tmux_power_show_download_speed true +``` + +**[tmux-prefix-highlight](https://github.com/tmux-plugins/tmux-prefix-highlight)** + +```tmux +# 'L' for left only, 'R' for right only and 'LR' for both +set -g @tmux_power_prefix_highlight_pos 'LR' +``` + +**[tmux-web-reachable](https://github.com/wfxr/tmux-web-reachable)** + +```tmux +set -g @tmux_power_show_web_reachable true +``` + +### 🔗 Other plugins + +You might also find these useful: + +- [tmux-fzf-url](https://github.com/wfxr/tmux-fzf-url) +- [tmux-net-speed](https://github.com/wfxr/tmux-net-speed) +- [tmux-web-reachable](https://github.com/wfxr/tmux-web-reachable) + +### 📃 License + +[MIT](https://wfxr.mit-license.org/2017) (c) Wenxuan Zhang diff --git a/tmux/.config/tmux/plugins/tmux-power/tmux-power.tmux b/tmux/.config/tmux/plugins/tmux-power/tmux-power.tmux new file mode 100755 index 0000000..2bb5bb7 --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-power/tmux-power.tmux @@ -0,0 +1,168 @@ +#!/usr/bin/env bash +#=============================================================================== +# Author: Wenxuan +# Email: wenxuangm@gmail.com +# Created: 2018-04-05 17:37 +#=============================================================================== + +# $1: option +# $2: default value +tmux_get() { + local value="$(tmux show -gqv "$1")" + [ -n "$value" ] && echo "$value" || echo "$2" +} + +# $1: option +# $2: value +tmux_set() { + tmux set-option -gq "$1" "$2" +} + +# Options +right_arrow_icon=$(tmux_get '@tmux_power_right_arrow_icon' '') +left_arrow_icon=$(tmux_get '@tmux_power_left_arrow_icon' '') +upload_speed_icon=$(tmux_get '@tmux_power_upload_speed_icon' '') +download_speed_icon=$(tmux_get '@tmux_power_download_speed_icon' '') +session_icon="$(tmux_get '@tmux_power_session_icon' '')" +user_icon="$(tmux_get '@tmux_power_user_icon' '')" +time_icon="$(tmux_get '@tmux_power_time_icon' '')" +date_icon="$(tmux_get '@tmux_power_date_icon' '')" +show_upload_speed="$(tmux_get @tmux_power_show_upload_speed false)" +show_download_speed="$(tmux_get @tmux_power_show_download_speed false)" +show_web_reachable="$(tmux_get @tmux_power_show_web_reachable false)" +prefix_highlight_pos=$(tmux_get @tmux_power_prefix_highlight_pos) +time_format=$(tmux_get @tmux_power_time_format '%T') +date_format=$(tmux_get @tmux_power_date_format '%F') +# short for Theme-Colour +TC=$(tmux_get '@tmux_power_theme' 'gold') +case $TC in + 'gold' ) + TC='#ffb86c' + ;; + 'redwine' ) + TC='#b34a47' + ;; + 'moon' ) + TC='#00abab' + ;; + 'forest' ) + TC='#228b22' + ;; + 'violet' ) + TC='#9370db' + ;; + 'snow' ) + TC='#fffafa' + ;; + 'coral' ) + TC='#ff7f50' + ;; + 'sky' ) + TC='#87ceeb' + ;; + 'default' ) # Useful when your term changes colour dynamically (e.g. pywal) + TC='colour3' + ;; +esac + +G01=#080808 #232 +G02=#121212 #233 +G03=#1c1c1c #234 +G04=#262626 #235 +G05=#303030 #236 +G06=#3a3a3a #237 +G07=#444444 #238 +G08=#4e4e4e #239 +G09=#585858 #240 +G10=#626262 #241 +G11=#6c6c6c #242 +G12=#767676 #243 + +FG="$G10" +BG="$G04" + +# Status options +tmux_set status-interval 1 +tmux_set status on + +# Basic status bar colors +tmux_set status-fg "$FG" +tmux_set status-bg "$BG" +tmux_set status-attr none + +# tmux-prefix-highlight +tmux_set @prefix_highlight_fg "$BG" +tmux_set @prefix_highlight_bg "$FG" +tmux_set @prefix_highlight_show_copy_mode 'on' +tmux_set @prefix_highlight_copy_mode_attr "fg=$TC,bg=$BG,bold" +tmux_set @prefix_highlight_output_prefix "#[fg=$TC]#[bg=$BG]$left_arrow_icon#[bg=$TC]#[fg=$BG]" +tmux_set @prefix_highlight_output_suffix "#[fg=$TC]#[bg=$BG]$right_arrow_icon" + +#      +# Left side of status bar +tmux_set status-left-bg "$G04" +tmux_set status-left-fg "G12" +tmux_set status-left-length 150 +user=$(whoami) +LS="#[fg=$G04,bg=$TC,bold] $user_icon $user@#h #[fg=$TC,bg=$G06,nobold]$right_arrow_icon#[fg=$TC,bg=$G06] $session_icon #S " +if "$show_upload_speed"; then + LS="$LS#[fg=$G06,bg=$G05]$right_arrow_icon#[fg=$TC,bg=$G05] $upload_speed_icon #{upload_speed} #[fg=$G05,bg=$BG]$right_arrow_icon" +else + LS="$LS#[fg=$G06,bg=$BG]$right_arrow_icon" +fi +if [[ $prefix_highlight_pos == 'L' || $prefix_highlight_pos == 'LR' ]]; then + LS="$LS#{prefix_highlight}" +fi +tmux_set status-left "$LS" + +# Right side of status bar +tmux_set status-right-bg "$G04" +tmux_set status-right-fg "G12" +tmux_set status-right-length 150 +RS="#[fg=$G06]$left_arrow_icon#[fg=$TC,bg=$G06] $time_icon $time_format #[fg=$TC,bg=$G06]$left_arrow_icon#[fg=$G04,bg=$TC] $date_icon $date_format " +if "$show_download_speed"; then + RS="#[fg=$G05,bg=$BG]$left_arrow_icon#[fg=$TC,bg=$G05] $download_speed_icon #{download_speed} $RS" +fi +if "$show_web_reachable"; then + RS=" #{web_reachable_status} $RS" +fi +if [[ $prefix_highlight_pos == 'R' || $prefix_highlight_pos == 'LR' ]]; then + RS="#{prefix_highlight}$RS" +fi +tmux_set status-right "$RS" + +# Window status +tmux_set window-status-format " #I:#W#F " +tmux_set window-status-current-format "#[fg=$BG,bg=$G06]$right_arrow_icon#[fg=$TC,bold] #I:#W#F #[fg=$G06,bg=$BG,nobold]$right_arrow_icon" + +# Window separator +tmux_set window-status-separator "" + +# Window status alignment +tmux_set status-justify centre + +# Current window status +tmux_set window-status-current-statys "fg=$TC,bg=$BG" + +# Pane border +tmux_set pane-border-style "fg=$G07,bg=default" + +# Active pane border +tmux_set pane-active-border-style "fg=$TC,bg=$BG" + +# Pane number indicator +tmux_set display-panes-colour "$G07" +tmux_set display-panes-active-colour "$TC" + +# Clock mode +tmux_set clock-mode-colour "$TC" +tmux_set clock-mode-style 24 + +# Message +tmux_set message-style "fg=$TC,bg=$BG" + +# Command message +tmux_set message-command-style "fg=$TC,bg=$BG" + +# Copy mode highlight +tmux_set mode-style "bg=$TC,fg=$FG" diff --git a/tmux/.config/tmux/plugins/tmux-sensible/.gitattributes b/tmux/.config/tmux/plugins/tmux-sensible/.gitattributes new file mode 100644 index 0000000..72149ed --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-sensible/.gitattributes @@ -0,0 +1,2 @@ +# Force text files to have unix eols, so Windows/Cygwin does not break them +*.* eol=lf diff --git a/tmux/.config/tmux/plugins/tmux-sensible/CHANGELOG.md b/tmux/.config/tmux/plugins/tmux-sensible/CHANGELOG.md new file mode 100644 index 0000000..68b980e --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-sensible/CHANGELOG.md @@ -0,0 +1,43 @@ +# Changelog + +### master +- remove `detach-on-destroy` +- do not set `aggressive-resize` on iTerm terminal +- disable `detach-on-destroy` + +### v3.0.0, 2015-06-24 +- remove 'almost sensible' feature + +### v2.3.0, 2015-06-24 +- update to support \*THE\* latest tmux version +- bugfix for `prefix + R` key binding +- fix for tmux 2.0 `default-terminal` option (thanks @kwbr) + +### v2.2.0, 2015-02-10 +- bugfix in `key_binding_not_set`: the regex is now properly detecting key + bindings with `-r` flag. +- enable `aggressive-resize` + +### v2.1.0, 2014-12-12 +- check before binding `prefix + prefix` (@m1foley) +- enable `focus-events` +- deprecate 'almost sensible' feature. The reason for this is to focus the + plugin on doing just one thing. + +### v2.0.0, 2014-10-03 +- bugfix: prevent exiting tmux if 'reattach-to-user-namespace' is not installed +- remove all mouse-related options +- introduce 'almost sensible' setting and options + +### v1.1.0, 2014-08-30 +- bugfix: determine the default shell from the $SHELL env var on OS X +- set `mode-mouse on` by default +- do not make any decision about the prefix, just enhance it +- update `README.md`. List options set in the plugin. +- do *not* set `mode-mouse on` by default because some users don't like it +- if a user changes default prefix but binds `C-b` to something else, do not + unbind `C-b` + +### v1.0.0, 2014-07-30 +- initial work on the plugin +- add readme diff --git a/tmux/.config/tmux/plugins/tmux-sensible/LICENSE.md b/tmux/.config/tmux/plugins/tmux-sensible/LICENSE.md new file mode 100644 index 0000000..78dd026 --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-sensible/LICENSE.md @@ -0,0 +1,19 @@ +Copyright (C) 2014 Bruno Sutic + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tmux/.config/tmux/plugins/tmux-sensible/README.md b/tmux/.config/tmux/plugins/tmux-sensible/README.md new file mode 100644 index 0000000..27d6cad --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-sensible/README.md @@ -0,0 +1,110 @@ +# Tmux sensible + +A set of tmux options that should be acceptable to everyone. + +Inspired by [vim-sensible](https://github.com/tpope/vim-sensible). + +Tested and working on Linux, OSX and Cygwin. + +### Principles + +- `tmux-sensible` options should be acceptable to **every** tmux user!
+ If any of the options bothers you, please open an issue and it will probably + be updated (or removed). +- if you think a new option should be added, feel free to open a pull request. +- **no overriding** of user defined settings.
+ Your existing `.tmux.conf` settings are respected and they won't be changed. + That way you can use `tmux-sensible` if you have a few specific options. + +### Goals + +- group standard tmux community options in one place +- remove clutter from your `.tmux.conf` +- educate new tmux users about basic options + +### Options + + # address vim mode switching delay (http://superuser.com/a/252717/65504) + set -s escape-time 0 + + # increase scrollback buffer size + set -g history-limit 50000 + + # tmux messages are displayed for 4 seconds + set -g display-time 4000 + + # refresh 'status-left' and 'status-right' more often + set -g status-interval 5 + + # set only on OS X where it's required + set -g default-command "reattach-to-user-namespace -l $SHELL" + + # upgrade $TERM + set -g default-terminal "screen-256color" + + # emacs key bindings in tmux command prompt (prefix + :) are better than + # vi keys, even for vim users + set -g status-keys emacs + + # focus events enabled for terminals that support them + set -g focus-events on + + # super useful when using "grouped sessions" and multi-monitor setup + setw -g aggressive-resize on + +### Key bindings + + # easier and faster switching between next/prev window + bind C-p previous-window + bind C-n next-window + +Above bindings enhance the default `prefix + p` and `prefix + n` bindings by +allowing you to hold `Ctrl` and repeat `a + p`/`a + n` (if your prefix is +`C-a`), which is a lot quicker. + + # source .tmux.conf as suggested in `man tmux` + bind R source-file '~/.tmux.conf' + +"Adaptable" key bindings that build upon your `prefix` value: + + # if prefix is 'C-a' + bind C-a send-prefix + bind a last-window + +If prefix is `C-b`, above keys will be `C-b` and `b`.
+If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea. + +### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended) + +Add plugin to the list of TPM plugins in `.tmux.conf`: + + set -g @plugin 'tmux-plugins/tmux-sensible' + +Hit `prefix + I` to fetch the plugin and source it. That's it! + +### Manual Installation + +Clone the repo: + + $ git clone https://github.com/tmux-plugins/tmux-sensible ~/clone/path + +Add this line to the bottom of `.tmux.conf`: + + run-shell ~/clone/path/sensible.tmux + +Reload TMUX environment with `$ tmux source-file ~/.tmux.conf`, and that's it. + +### Other goodies + +You might also find these useful: + +- [copycat](https://github.com/tmux-plugins/tmux-copycat) + improve tmux search and reduce mouse usage +- [pain control](https://github.com/tmux-plugins/tmux-pain-control) + useful standard bindings for controlling panes +- [resurrect](https://github.com/tmux-plugins/tmux-resurrect) + persists tmux environment across system restarts + +### License + +[MIT](LICENSE.md) diff --git a/tmux/.config/tmux/plugins/tmux-sensible/sensible.tmux b/tmux/.config/tmux/plugins/tmux-sensible/sensible.tmux new file mode 100755 index 0000000..f8ed6fe --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-sensible/sensible.tmux @@ -0,0 +1,168 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# used to match output from `tmux list-keys` +KEY_BINDING_REGEX="bind-key[[:space:]]\+\(-r[[:space:]]\+\)\?\(-T prefix[[:space:]]\+\)\?" + +is_osx() { + local platform=$(uname) + [ "$platform" == "Darwin" ] +} + +iterm_terminal() { + [[ "${TERM_PROGRAM}" =~ ^iTerm || "${LC_TERMINAL}" =~ ^iTerm ]] +} + +command_exists() { + local command="$1" + type "$command" >/dev/null 2>&1 +} + +# returns prefix key, e.g. 'C-a' +prefix() { + tmux show-option -gv prefix +} + +# if prefix is 'C-a', this function returns 'a' +prefix_without_ctrl() { + local prefix="$(prefix)" + echo "$prefix" | cut -d '-' -f2 +} + +option_value_not_changed() { + local option="$1" + local default_value="$2" + local option_value=$(tmux show-option -gv "$option") + [ "$option_value" == "$default_value" ] +} + +server_option_value_not_changed() { + local option="$1" + local default_value="$2" + local option_value=$(tmux show-option -sv "$option") + [ "$option_value" == "$default_value" ] +} + +key_binding_not_set() { + local key="${1//\\/\\\\}" + if $(tmux list-keys | grep -q "${KEY_BINDING_REGEX}${key}[[:space:]]"); then + return 1 + else + return 0 + fi +} + +key_binding_not_changed() { + local key="$1" + local default_value="$2" + if $(tmux list-keys | grep -q "${KEY_BINDING_REGEX}${key}[[:space:]]\+${default_value}"); then + # key still has the default binding + return 0 + else + return 1 + fi +} + +get_tmux_config() { + local tmux_config_xdg="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" + local tmux_config="$HOME/.tmux.conf" + + if [ -f "${tmux_config_xdg}" ]; then + echo "${tmux_config_xdg}" + else + echo ${tmux_config} + fi +} + +main() { + # OPTIONS + + # address vim mode switching delay (http://superuser.com/a/252717/65504) + if server_option_value_not_changed "escape-time" "500"; then + tmux set-option -s escape-time 0 + fi + + # increase scrollback buffer size + if option_value_not_changed "history-limit" "2000"; then + tmux set-option -g history-limit 50000 + fi + + # tmux messages are displayed for 4 seconds + if option_value_not_changed "display-time" "750"; then + tmux set-option -g display-time 4000 + fi + + # refresh 'status-left' and 'status-right' more often + if option_value_not_changed "status-interval" "15"; then + tmux set-option -g status-interval 5 + fi + + # required (only) on OS X + if is_osx && command_exists "reattach-to-user-namespace" && option_value_not_changed "default-command" ""; then + tmux set-option -g default-command "reattach-to-user-namespace -l $SHELL" + fi + + # upgrade $TERM, tmux 1.9 + if option_value_not_changed "default-terminal" "screen"; then + tmux set-option -g default-terminal "screen-256color" + fi + # upgrade $TERM, tmux 2.0+ + if server_option_value_not_changed "default-terminal" "screen"; then + tmux set-option -s default-terminal "screen-256color" + fi + + # emacs key bindings in tmux command prompt (prefix + :) are better than + # vi keys, even for vim users + tmux set-option -g status-keys emacs + + # focus events enabled for terminals that support them + tmux set-option -g focus-events on + + # super useful when using "grouped sessions" and multi-monitor setup + if ! iterm_terminal; then + tmux set-window-option -g aggressive-resize on + fi + + # DEFAULT KEY BINDINGS + + local prefix="$(prefix)" + local prefix_without_ctrl="$(prefix_without_ctrl)" + + # if C-b is not prefix + if [ $prefix != "C-b" ]; then + # unbind obsolete default binding + if key_binding_not_changed "C-b" "send-prefix"; then + tmux unbind-key C-b + fi + + # pressing `prefix + prefix` sends to the shell + if key_binding_not_set "$prefix"; then + tmux bind-key "$prefix" send-prefix + fi + fi + + # If Ctrl-a is prefix then `Ctrl-a + a` switches between alternate windows. + # Works for any prefix character. + if key_binding_not_set "$prefix_without_ctrl"; then + tmux bind-key "$prefix_without_ctrl" last-window + fi + + # easier switching between next/prev window + if key_binding_not_set "C-p"; then + tmux bind-key C-p previous-window + fi + if key_binding_not_set "C-n"; then + tmux bind-key C-n next-window + fi + + # source `.tmux.conf` file - as suggested in `man tmux` + if key_binding_not_set "R"; then + local tmux_config=$(get_tmux_config) + + tmux bind-key R run-shell " \ + tmux source-file ${tmux_config} > /dev/null; \ + tmux display-message 'Sourced ${tmux_config}!'" + fi +} +main diff --git a/tmux/.config/tmux/plugins/tpm/.gitattributes b/tmux/.config/tmux/plugins/tpm/.gitattributes new file mode 100644 index 0000000..2c9cb41 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/.gitattributes @@ -0,0 +1,9 @@ +# Force text files to have unix eols, so Windows/Cygwin does not break them +*.* eol=lf + +# These files are unfortunately not recognized as text files so +# explicitly listing them here +tpm eol=lf +bin/* eol=lf +bindings/* eol=lf +tests/* eol=lf diff --git a/tmux/.config/tmux/plugins/tpm/.gitignore b/tmux/.config/tmux/plugins/tpm/.gitignore new file mode 100644 index 0000000..2b72966 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/.gitignore @@ -0,0 +1,4 @@ +**/.vagrant/ +run_tests +tests/run_tests_in_isolation +tests/helpers/helpers.sh diff --git a/tmux/.config/tmux/plugins/tpm/.gitmodules b/tmux/.config/tmux/plugins/tpm/.gitmodules new file mode 100644 index 0000000..631ad7f --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/tmux-test"] + path = lib/tmux-test + url = https://github.com/tmux-plugins/tmux-test.git diff --git a/tmux/.config/tmux/plugins/tpm/.travis.yml b/tmux/.config/tmux/plugins/tpm/.travis.yml new file mode 100644 index 0000000..4cb339f --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/.travis.yml @@ -0,0 +1,19 @@ +# generic packages and tmux +before_install: + - sudo apt-get update + - sudo apt-get install -y git-core expect + - sudo apt-get install -y python-software-properties software-properties-common + - sudo apt-get install -y libevent-dev libncurses-dev + - git clone https://github.com/tmux/tmux.git + - cd tmux + - git checkout 2.0 + - sh autogen.sh + - ./configure && make && sudo make install + +install: + - git fetch --unshallow --recurse-submodules || git fetch --recurse-submodules + # manual `git clone` required for testing `tmux-test` plugin itself + - git clone https://github.com/tmux-plugins/tmux-test lib/tmux-test; true + - lib/tmux-test/setup + +script: ./tests/run_tests_in_isolation diff --git a/tmux/.config/tmux/plugins/tpm/CHANGELOG.md b/tmux/.config/tmux/plugins/tpm/CHANGELOG.md new file mode 100644 index 0000000..f1b43a4 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/CHANGELOG.md @@ -0,0 +1,83 @@ +# Changelog + +### master +- upgrade to new version of `tmux-test` +- bug: when using `emacs` copy mode, Enter does not quit screen after tpm + installation/update. Fix by making `Escape` the key for emacs mode. +- add a doc with troubleshooting instructions +- add `.gitattributes` file that forces linefeed characters (classic `\n`) as + line endings - helps with misconfigured git on windows/cygwin +- readme update: announce Cygwin support +- un-deprecate old plugin definition syntax: `set -g @tpm_plugins` + +### v3.0.0, 2015-08-03 +- refactor `shared_set_tpm_path_constant` function +- move all instructions to `docs/` dir +- add `bin/install_plugins` cli executable script +- improved test runner function +- switch to using [tmux-test](https://github.com/tmux-plugins/tmux-test) + framework +- add `bin/update_plugins` cli executable script +- refactor test `expect` scripts, make them simpler and ensure they properly + assert expectations +- refactor code that sets 'TMUX_PLUGIN_MANAGER_PATH' global env var +- stop using global variable for 'tpm path' +- support defining plugins via `set -g @plugin` in sourced files as well + +### v2.0.0, 2015-07-07 +- enable overriding default key bindings +- start using `C-c` to clear screen +- add uninstall/clean procedure and keybinding (prefix+alt+u) (@chilicuil) +- add new `set @plugin 'repo'` plugin definition syntax (@chilicuil) +- revert back to using `-g` flag in new plugin definition syntax +- permit leading whitespace with new plugin definition syntax (thanks @chilicuil) +- make sure `TMUX_PLUGIN_MANAGER_PATH` always has trailng slash +- ensure old/deprecated plugin syntax `set -g @tpm_plugins` works alongside new + `set -g @plugin` syntax + +### v1.2.2, 2015-02-08 +- set GIT_TERMINAL_PROMPT=0 when doing `git clone`, `pull` or `submodule update` + to ensure git does not prompt for username/password in any case + +### v1.2.1, 2014-11-21 +- change the way plugin name is expanded. It now uses the http username + and password by default, like this: `https://git::@github.com/`. This prevents + username and password prompt (and subsequently tmux install hanging) with old + git versions. Fixes #7. + +### v1.2.0, 2014-11-20 +- refactor tests so they can be used on travis +- add travis.yml, add travis badge to the readme + +### v1.1.0, 2014-11-19 +- if the plugin is not downloaded do not source it +- remove `PLUGINS.md`, an obsolete list of plugins +- update readme with instructions about uninstalling plugins +- tilde char and `$HOME` in `TMUX_SHARED_MANAGER_PATH` couldn't be used because + they are just plain strings. Fixing the problem by manually expanding them. +- bugfix: fragile `*.tmux` file globbing (@majutsushi) + +### v1.0.0, 2014-08-05 +- update readme because of github organization change to + [tmux-plugins](https://github.com/tmux-plugins) +- update tests to pass +- update README to suggest different first plugin +- update list of plugins in the README +- remove README 'about' section +- move key binding to the main file. Delete `key_binding.sh`. +- rename `display_message` -> `echo_message` +- installing plugins installs just new plugins. Already installed plugins aren't + updated. +- add 'update plugin' binding and functionality +- add test for updating a plugin + +### v0.0.2, 2014-07-17 +- run all *.tmux plugin files as executables +- fix all redirects to /dev/null +- fix bug: TPM shared path is created before sync (cloning plugins from github + is done) +- add test suite running in Vagrant +- add Tmux version check. `TPM` won't run if Tmux version is less than 1.9. + +### v0.0.1, 2014-05-21 +- get TPM up and running diff --git a/tmux/.config/tmux/plugins/tpm/HOW_TO_PLUGIN.md b/tmux/.config/tmux/plugins/tpm/HOW_TO_PLUGIN.md new file mode 100644 index 0000000..d98ac9d --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/HOW_TO_PLUGIN.md @@ -0,0 +1,2 @@ +Instructions moved to +[docs/how_to_create_plugin.md](docs/how_to_create_plugin.md). diff --git a/tmux/.config/tmux/plugins/tpm/LICENSE.md b/tmux/.config/tmux/plugins/tpm/LICENSE.md new file mode 100644 index 0000000..22c8801 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/LICENSE.md @@ -0,0 +1,20 @@ +MIT license +Copyright (C) 2014 Bruno Sutic + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tmux/.config/tmux/plugins/tpm/README.md b/tmux/.config/tmux/plugins/tpm/README.md new file mode 100644 index 0000000..4a8ecf9 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/README.md @@ -0,0 +1,101 @@ +# Tmux Plugin Manager + +[![Build Status](https://travis-ci.org/tmux-plugins/tpm.svg?branch=master)](https://travis-ci.org/tmux-plugins/tpm) + +Installs and loads `tmux` plugins. + +Tested and working on Linux, OSX, and Cygwin. + +See list of plugins [here](https://github.com/tmux-plugins/list). + +### Installation + +Requirements: `tmux` version 1.9 (or higher), `git`, `bash`. + +Clone TPM: + +```bash +$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +``` + +Put this at the bottom of `~/.tmux.conf` (`$XDG_CONFIG_HOME/tmux/tmux.conf` +works too): + +```bash +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' + +# Other examples: +# set -g @plugin 'github_username/plugin_name' +# set -g @plugin 'github_username/plugin_name#branch' +# set -g @plugin 'git@github.com:user/plugin' +# set -g @plugin 'git@bitbucket.com:user/plugin' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' +``` + +Reload TMUX environment so TPM is sourced: + +```bash +# type this in terminal if tmux is already running +$ tmux source ~/.tmux.conf +``` + +That's it! + +### Installing plugins + +1. Add new plugin to `~/.tmux.conf` with `set -g @plugin '...'` +2. Press `prefix` + I (capital i, as in **I**nstall) to fetch the plugin. + +You're good to go! The plugin was cloned to `~/.tmux/plugins/` dir and sourced. + +### Uninstalling plugins + +1. Remove (or comment out) plugin from the list. +2. Press `prefix` + alt + u (lowercase u as in **u**ninstall) to remove the plugin. + +All the plugins are installed to `~/.tmux/plugins/` so alternatively you can +find plugin directory there and remove it. + +### Key bindings + +`prefix` + I +- Installs new plugins from GitHub or any other git repository +- Refreshes TMUX environment + +`prefix` + U +- updates plugin(s) + +`prefix` + alt + u +- remove/uninstall plugins not on the plugin list + +### Docs + +- [Help, tpm not working](docs/tpm_not_working.md) - problem solutions + +More advanced features and instructions, regular users probably do not need +this: + +- [How to create a plugin](docs/how_to_create_plugin.md). It's easy. +- [Managing plugins via the command line](docs/managing_plugins_via_cmd_line.md) +- [Changing plugins install dir](docs/changing_plugins_install_dir.md) +- [Automatic TPM installation on a new machine](docs/automatic_tpm_installation.md) + +### Tests + +Tests for this project run on [Travis CI](https://travis-ci.org/tmux-plugins/tpm). + +When run locally, [vagrant](https://www.vagrantup.com/) is required. +Run tests with: + +```bash +# within project directory +$ ./run_tests +``` + +### License + +[MIT](LICENSE.md) diff --git a/tmux/.config/tmux/plugins/tpm/bin/clean_plugins b/tmux/.config/tmux/plugins/tpm/bin/clean_plugins new file mode 100755 index 0000000..b3e13bd --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/bin/clean_plugins @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Script intended for use via the command line. +# +# `.tmux.conf` needs to be set for TPM. Tmux has to be installed on the system, +# but does not need to be started in order to run this script. + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPTS_DIR="$CURRENT_DIR/../scripts" + +main() { + "$SCRIPTS_DIR/clean_plugins.sh" # has correct exit code +} +main diff --git a/tmux/.config/tmux/plugins/tpm/bin/install_plugins b/tmux/.config/tmux/plugins/tpm/bin/install_plugins new file mode 100755 index 0000000..1575279 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/bin/install_plugins @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Script intended for use via the command line. +# +# `.tmux.conf` needs to be set for TPM. Tmux has to be installed on the system, +# but does not need to be started in order to run this script. + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPTS_DIR="$CURRENT_DIR/../scripts" + +main() { + "$SCRIPTS_DIR/install_plugins.sh" # has correct exit code +} +main diff --git a/tmux/.config/tmux/plugins/tpm/bin/update_plugins b/tmux/.config/tmux/plugins/tpm/bin/update_plugins new file mode 100755 index 0000000..9ecb871 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/bin/update_plugins @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Script intended for use via the command line. +# +# `.tmux.conf` needs to be set for TPM. Tmux has to be installed on the system, +# but does not need to be started in order to run this script. + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPTS_DIR="$CURRENT_DIR/../scripts" +PROGRAM_NAME="$0" + +if [ $# -eq 0 ]; then + echo "usage:" + echo " $PROGRAM_NAME all update all plugins" + echo " $PROGRAM_NAME tmux-foo update plugin 'tmux-foo'" + echo " $PROGRAM_NAME tmux-bar tmux-baz update multiple plugins" + exit 1 +fi + +main() { + "$SCRIPTS_DIR/update_plugin.sh" --shell-echo "$*" # has correct exit code +} +main "$*" + diff --git a/tmux/.config/tmux/plugins/tpm/bindings/clean_plugins b/tmux/.config/tmux/plugins/tpm/bindings/clean_plugins new file mode 100755 index 0000000..3f312d2 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/bindings/clean_plugins @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Tmux key-binding script. +# Scripts intended to be used via the command line are in `bin/` directory. + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPTS_DIR="$CURRENT_DIR/../scripts" +HELPERS_DIR="$SCRIPTS_DIR/helpers" + +source "$HELPERS_DIR/tmux_echo_functions.sh" +source "$HELPERS_DIR/tmux_utils.sh" + +main() { + reload_tmux_environment + "$SCRIPTS_DIR/clean_plugins.sh" --tmux-echo >/dev/null 2>&1 + reload_tmux_environment + end_message +} +main diff --git a/tmux/.config/tmux/plugins/tpm/bindings/install_plugins b/tmux/.config/tmux/plugins/tpm/bindings/install_plugins new file mode 100755 index 0000000..e57e66c --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/bindings/install_plugins @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Tmux key-binding script. +# Scripts intended to be used via the command line are in `bin/` directory. + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPTS_DIR="$CURRENT_DIR/../scripts" +HELPERS_DIR="$SCRIPTS_DIR/helpers" + +source "$HELPERS_DIR/tmux_echo_functions.sh" +source "$HELPERS_DIR/tmux_utils.sh" + +main() { + reload_tmux_environment + "$SCRIPTS_DIR/install_plugins.sh" --tmux-echo >/dev/null 2>&1 + reload_tmux_environment + end_message +} +main diff --git a/tmux/.config/tmux/plugins/tpm/bindings/update_plugins b/tmux/.config/tmux/plugins/tpm/bindings/update_plugins new file mode 100755 index 0000000..31c82ff --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/bindings/update_plugins @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# Tmux key-binding script. +# Scripts intended to be used via the command line are in `bin/` directory. + +# This script: +# - shows a list of installed plugins +# - starts a prompt to enter the name of the plugin that will be updated + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPTS_DIR="$CURRENT_DIR/../scripts" +HELPERS_DIR="$SCRIPTS_DIR/helpers" + +source "$HELPERS_DIR/plugin_functions.sh" +source "$HELPERS_DIR/tmux_echo_functions.sh" +source "$HELPERS_DIR/tmux_utils.sh" + +display_plugin_update_list() { + local plugins="$(tpm_plugins_list_helper)" + tmux_echo "Installed plugins:" + tmux_echo "" + + for plugin in $plugins; do + # displaying only installed plugins + if plugin_already_installed "$plugin"; then + local plugin_name="$(plugin_name_helper "$plugin")" + tmux_echo " $plugin_name" + fi + done + + tmux_echo "" + tmux_echo "Type plugin name to update it." + tmux_echo "" + tmux_echo "- \"all\" - updates all plugins" + tmux_echo "- ENTER - cancels" +} + +update_plugin_prompt() { + tmux command-prompt -p 'plugin update:' " \ + send-keys C-c; \ + run-shell '$SCRIPTS_DIR/update_plugin_prompt_handler.sh %1'" +} + +main() { + reload_tmux_environment + display_plugin_update_list + update_plugin_prompt +} +main diff --git a/tmux/.config/tmux/plugins/tpm/docs/automatic_tpm_installation.md b/tmux/.config/tmux/plugins/tpm/docs/automatic_tpm_installation.md new file mode 100644 index 0000000..2495174 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/docs/automatic_tpm_installation.md @@ -0,0 +1,12 @@ +# Automatic tpm installation + +One of the first things we do on a new machine is cloning our dotfiles. Not everything comes with them though, so for example `tpm` most likely won't be installed. + +If you want to install `tpm` and plugins automatically when tmux is started, put the following snippet in `.tmux.conf` before the final `run '~/.tmux/plugins/tpm/tpm'`: + +``` +if "test ! -d ~/.tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" +``` + +This useful tip was submitted by @acr4 and narfman0. diff --git a/tmux/.config/tmux/plugins/tpm/docs/changing_plugins_install_dir.md b/tmux/.config/tmux/plugins/tpm/docs/changing_plugins_install_dir.md new file mode 100644 index 0000000..3af3d5f --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/docs/changing_plugins_install_dir.md @@ -0,0 +1,16 @@ +# Changing plugins install dir + +By default, TPM installs plugins in a subfolder named `plugins/` inside +`$XDG_CONFIG_HOME/tmux/` if a `tmux.conf` file was found at that location, or +inside `~/.tmux/` otherwise. + +You can change the install path by putting this in `.tmux.conf`: + + set-environment -g TMUX_PLUGIN_MANAGER_PATH '/some/other/path/' + +Tmux plugin manager initialization in `.tmux.conf` should also be updated: + + # initializes TMUX plugin manager in a new path + run /some/other/path/tpm/tpm + +Please make sure that the `run` line is at the very bottom of `.tmux.conf`. diff --git a/tmux/.config/tmux/plugins/tpm/docs/how_to_create_plugin.md b/tmux/.config/tmux/plugins/tpm/docs/how_to_create_plugin.md new file mode 100644 index 0000000..c0c7ad1 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/docs/how_to_create_plugin.md @@ -0,0 +1,108 @@ +# How to create Tmux plugins + +Creating a new plugin is easy. + +For demonstration purposes we'll create a simple plugin that lists all +installed TPM plugins. Yes, a plugin that lists plugins :) We'll bind that to +`prefix + T`. + +The source code for this example plugin can be found +[here](https://github.com/tmux-plugins/tmux-example-plugin). + +### 1. create a new git project + +TPM depends on git for downloading and updating plugins. + +To create a new git project: + + $ mkdir tmux_my_plugin + $ cd tmux_my_plugin + $ git init + +### 2. create a `*.tmux` plugin run file + +When it sources a plugin, TPM executes all `*.tmux` files in your plugins' +directory. That's how plugins are run. + +Create a plugin run file in plugin directory: + + $ touch my_plugin.tmux + $ chmod u+x my_plugin.tmux + +You can have more than one `*.tmux` file, and all will get executed. However, usually +you'll need just one. + +### 3. create a plugin key binding + +We want the behavior of the plugin to trigger when a user hits `prefix + T`. + +Key `T` is chosen because: + - it's "kind of" a mnemonic for `TPM` + - the key is not used by Tmux natively. Tmux man page, KEY BINDINGS section + contains a list of all the bindings Tmux uses. There's plenty of unused keys + and we don't want to override any of Tmux default key bindings. + +Open the plugin run file in your favorite text editor: + + $ vim my_plugin.tmux + # or + $ subl my_plugin.tmux + +Put the following content in the file: + + #!/usr/bin/env bash + + CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + tmux bind-key T run-shell "$CURRENT_DIR/scripts/tmux_list_plugins.sh" + +As you can see, plugin run file is a simple bash script that sets up the binding. + +When pressed, `prefix + T` will execute another shell script: +`tmux_list_plugins.sh`. That script should be in `scripts/` directory - +relative to the plugin run file. + + +### 4. listing plugins + +Now that we have the binding, let's create a script that's invoked with +`prefix + T`. + + $ mkdir scripts + $ touch scripts/tmux_list_plugins.sh + $ chmod u+x scripts/tmux_list_plugins.sh + +And here's the script content: + + #!/usr/bin/env bash + + # fetching the directory where plugins are installed + plugin_path="$(tmux show-env -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)" + + # listing installed plugins + ls -1 "$plugin_path" + +### 5. try it out + +To see if this works, execute the plugin run file: + + $ ./my_plugin.tmux + +That should set up the key binding. Now hit `prefix + T` and see if it works. + +### 6. publish the plugin + +When everything is ready, push the plugin to an online git repository, +preferably Github. + +Other users can install your plugin by just adding plugin git URL to the +`@plugin` list in their `.tmux.conf`. + +If the plugin is on Github, your users will be able to use the shorthand of +`github_username/repository`. + +### Conclusion + +Hopefully, that was easy. As you can see, it's mostly shell scripting. + +You can use other scripting languages (ruby, python etc) but plain old shell +is preferred because of portability. diff --git a/tmux/.config/tmux/plugins/tpm/docs/managing_plugins_via_cmd_line.md b/tmux/.config/tmux/plugins/tpm/docs/managing_plugins_via_cmd_line.md new file mode 100644 index 0000000..679188e --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/docs/managing_plugins_via_cmd_line.md @@ -0,0 +1,36 @@ +# Managing plugins via the command line + +Aside from tmux key bindings, TPM provides shell interface for managing plugins +via scripts located in [bin/](../bin/) directory. + +Tmux does not need to be started in order to run scripts (but it's okay if it +is). If you [changed tpm install dir](../docs/changing_plugins_install_dir.md) +in `.tmux.conf` that should work fine too. + +Prerequisites: + +- tmux installed on the system (doh) +- `.tmux.conf` set up for TPM + +### Installing plugins + +As usual, plugins need to be specified in `.tmux.conf`. Run the following +command to install plugins: + + ~/.tmux/plugins/tpm/bin/install_plugins + +### Updating plugins + +To update all installed plugins: + + ~/.tmux/plugins/tpm/bin/update_plugins all + +or update a single plugin: + + ~/.tmux/plugins/tpm/bin/update_plugins tmux-sensible + +### Removing plugins + +To remove plugins not on the plugin list: + + ~/.tmux/plugins/tpm/bin/clean_plugins diff --git a/tmux/.config/tmux/plugins/tpm/docs/tpm_not_working.md b/tmux/.config/tmux/plugins/tpm/docs/tpm_not_working.md new file mode 100644 index 0000000..44b76b7 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/docs/tpm_not_working.md @@ -0,0 +1,96 @@ +# Help, tpm not working! + +Here's the list of issues users had with `tpm`: + +
+ +> Nothing works. `tpm` key bindings `prefix + I`, `prefix + U` not even + defined. + +Related [issue #22](https://github.com/tmux-plugins/tpm/issues/22) + +- Do you have required `tmux` version to run `tpm`?
+ Check `tmux` version with `$ tmux -V` command and make sure it's higher or + equal to the required version for `tpm` as stated in the readme. + +- ZSH tmux plugin might be causing issues.
+ If you have it installed, try disabling it and see if `tpm` works then. + +
+ +> Help, I'm using custom config file with `tmux -f /path/to/my_tmux.conf` +to start Tmux and for some reason plugins aren't loaded!? + +Related [issue #57](https://github.com/tmux-plugins/tpm/issues/57) + +`tpm` has a known issue when using custom config file with `-f` option. +The solution is to use alternative plugin definition syntax. Here are the steps +to make it work: + +1. remove all `set -g @plugin` lines from tmux config file +2. in the config file define the plugins in the following way: + + # List of plugins + set -g @tpm_plugins ' \ + tmux-plugins/tpm \ + tmux-plugins/tmux-sensible \ + tmux-plugins/tmux-resurrect \ + ' + + # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) + run '~/.tmux/plugins/tpm/tpm' + +3. Reload TMUX environment so TPM is sourced: `$ tmux source /path/to/my_tmux.conf` + +The plugins should now be working. + +
+ +> Weird sequence of characters show up when installing or updating plugins + +Related: [issue #25](https://github.com/tmux-plugins/tpm/issues/25) + +- This could be caused by [tmuxline.vim](https://github.com/edkolev/tmuxline.vim) + plugin. Uninstall it and see if things work. + +
+ +> "failed to connect to server" error when sourcing .tmux.conf + +Related: [issue #48](https://github.com/tmux-plugins/tpm/issues/48) + +- Make sure `tmux source ~/.tmux.conf` command is ran from inside `tmux`. + +
+ +> tpm not working: '~/.tmux/plugins/tpm/tpm' returned 2 (Windows / Cygwin) + +Related: [issue #81](https://github.com/tmux-plugins/tpm/issues/81) + +This issue is most likely caused by Windows line endings. For example, if you +have git's `core.autocrlf` option set to `true`, git will automatically convert +all the files to Windows line endings which might cause a problem. + +The solution is to convert all line ending to Unix newline characters. This +command handles that for all files under `.tmux/` dir (skips `.git` +subdirectories): + +```bash +find ~/.tmux -type d -name '.git*' -prune -o -type f -print0 | xargs -0 dos2unix +``` + +
+ +> '~/.tmux/plugins/tpm/tpm' returned 127 (on macOS, w/ tmux installed using brew) + +Related: [issue #67](https://github.com/tmux-plugins/tpm/issues/67) + +This problem is because tmux's `run-shell` command runs a shell which doesn't read from user configs, thus tmux installed in `/usr/local/bin` will not be found. + +The solution is to insert the following line: + +``` +set-environment -g PATH "/usr/local/bin:/bin:/usr/bin" +``` + +before any `run-shell`/`run` commands in `~/.tmux.conf`. diff --git a/tmux/.config/tmux/plugins/tpm/scripts/check_tmux_version.sh b/tmux/.config/tmux/plugins/tpm/scripts/check_tmux_version.sh new file mode 100755 index 0000000..4b286af --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/check_tmux_version.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +VERSION="$1" +UNSUPPORTED_MSG="$2" + +get_tmux_option() { + local option=$1 + local default_value=$2 + local option_value=$(tmux show-option -gqv "$option") + if [ -z "$option_value" ]; then + echo "$default_value" + else + echo "$option_value" + fi +} + +# Ensures a message is displayed for 5 seconds in tmux prompt. +# Does not override the 'display-time' tmux option. +display_message() { + local message="$1" + + # display_duration defaults to 5 seconds, if not passed as an argument + if [ "$#" -eq 2 ]; then + local display_duration="$2" + else + local display_duration="5000" + fi + + # saves user-set 'display-time' option + local saved_display_time=$(get_tmux_option "display-time" "750") + + # sets message display time to 5 seconds + tmux set-option -gq display-time "$display_duration" + + # displays message + tmux display-message "$message" + + # restores original 'display-time' value + tmux set-option -gq display-time "$saved_display_time" +} + +# this is used to get "clean" integer version number. Examples: +# `tmux 1.9` => `19` +# `1.9a` => `19` +get_digits_from_string() { + local string="$1" + local only_digits="$(echo "$string" | tr -dC '[:digit:]')" + echo "$only_digits" +} + +tmux_version_int() { + local tmux_version_string=$(tmux -V) + echo "$(get_digits_from_string "$tmux_version_string")" +} + +unsupported_version_message() { + if [ -n "$UNSUPPORTED_MSG" ]; then + echo "$UNSUPPORTED_MSG" + else + echo "Error, Tmux version unsupported! Please install Tmux version $VERSION or greater!" + fi +} + +exit_if_unsupported_version() { + local current_version="$1" + local supported_version="$2" + if [ "$current_version" -lt "$supported_version" ]; then + display_message "$(unsupported_version_message)" + exit 1 + fi +} + +main() { + local supported_version_int="$(get_digits_from_string "$VERSION")" + local current_version_int="$(tmux_version_int)" + exit_if_unsupported_version "$current_version_int" "$supported_version_int" +} +main diff --git a/tmux/.config/tmux/plugins/tpm/scripts/clean_plugins.sh b/tmux/.config/tmux/plugins/tpm/scripts/clean_plugins.sh new file mode 100755 index 0000000..e77fade --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/clean_plugins.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +HELPERS_DIR="$CURRENT_DIR/helpers" + +source "$HELPERS_DIR/plugin_functions.sh" +source "$HELPERS_DIR/utility.sh" + +if [ "$1" == "--tmux-echo" ]; then # tmux-specific echo functions + source "$HELPERS_DIR/tmux_echo_functions.sh" +else # shell output functions + source "$HELPERS_DIR/shell_echo_functions.sh" +fi + +clean_plugins() { + local plugins plugin plugin_directory + plugins="$(tpm_plugins_list_helper)" + + for plugin_directory in "$(tpm_path)"/*; do + [ -d "${plugin_directory}" ] || continue + plugin="$(plugin_name_helper "${plugin_directory}")" + case "${plugins}" in + *"${plugin}"*) : ;; + *) + [ "${plugin}" = "tpm" ] && continue + echo_ok "Removing \"$plugin\"" + rm -rf "${plugin_directory}" >/dev/null 2>&1 + [ -d "${plugin_directory}" ] && + echo_err " \"$plugin\" clean fail" || + echo_ok " \"$plugin\" clean success" + ;; + esac + done +} + +main() { + ensure_tpm_path_exists + clean_plugins + exit_value_helper +} +main diff --git a/tmux/.config/tmux/plugins/tpm/scripts/helpers/plugin_functions.sh b/tmux/.config/tmux/plugins/tpm/scripts/helpers/plugin_functions.sh new file mode 100644 index 0000000..10fb171 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/helpers/plugin_functions.sh @@ -0,0 +1,104 @@ +# using @tpm_plugins is now deprecated in favor of using @plugin syntax +tpm_plugins_variable_name="@tpm_plugins" + +# manually expanding tilde char or `$HOME` variable. +_manual_expansion() { + local path="$1" + local expanded_tilde="${path/#\~/$HOME}" + echo "${expanded_tilde/#\$HOME/$HOME}" +} + +_tpm_path() { + local string_path="$(tmux start-server\; show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)/" + _manual_expansion "$string_path" +} + +_CACHED_TPM_PATH="$(_tpm_path)" + +# Get the absolute path to the users configuration file of TMux. +# This includes a prioritized search on different locations. +# +_get_user_tmux_conf() { + # Define the different possible locations. + xdg_location="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" + default_location="$HOME/.tmux.conf" + + # Search for the correct configuration file by priority. + if [ -f "$xdg_location" ]; then + echo "$xdg_location" + + else + echo "$default_location" + fi +} + +_tmux_conf_contents() { + user_config=$(_get_user_tmux_conf) + cat /etc/tmux.conf "$user_config" 2>/dev/null + if [ "$1" == "full" ]; then # also output content from sourced files + local file + for file in $(_sourced_files); do + cat $(_manual_expansion "$file") 2>/dev/null + done + fi +} + +# return files sourced from tmux config files +_sourced_files() { + _tmux_conf_contents | + sed -E -n -e "s/^[[:space:]]*source(-file)?[[:space:]]+(-q+[[:space:]]+)?['\"]?([^'\"]+)['\"]?/\3/p" +} + +# Want to be able to abort in certain cases +trap "exit 1" TERM +export TOP_PID=$$ + +_fatal_error_abort() { + echo >&2 "Aborting." + kill -s TERM $TOP_PID +} + +# PUBLIC FUNCTIONS BELOW + +tpm_path() { + if [ "$_CACHED_TPM_PATH" == "/" ]; then + echo >&2 "FATAL: Tmux Plugin Manager not configured in tmux.conf" + _fatal_error_abort + fi + echo "$_CACHED_TPM_PATH" +} + +tpm_plugins_list_helper() { + # lists plugins from @tpm_plugins option + echo "$(tmux start-server\; show-option -gqv "$tpm_plugins_variable_name")" + + # read set -g @plugin "tmux-plugins/tmux-example-plugin" entries + _tmux_conf_contents "full" | + awk '/^[ \t]*set(-option)? +-g +@plugin/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $4 }' +} + +# Allowed plugin name formats: +# 1. "git://github.com/user/plugin_name.git" +# 2. "user/plugin_name" +plugin_name_helper() { + local plugin="$1" + # get only the part after the last slash, e.g. "plugin_name.git" + local plugin_basename="$(basename "$plugin")" + # remove ".git" extension (if it exists) to get only "plugin_name" + local plugin_name="${plugin_basename%.git}" + echo "$plugin_name" +} + +plugin_path_helper() { + local plugin="$1" + local plugin_name="$(plugin_name_helper "$plugin")" + echo "$(tpm_path)${plugin_name}/" +} + +plugin_already_installed() { + local plugin="$1" + local plugin_path="$(plugin_path_helper "$plugin")" + [ -d "$plugin_path" ] && + cd "$plugin_path" && + git remote >/dev/null 2>&1 +} diff --git a/tmux/.config/tmux/plugins/tpm/scripts/helpers/shell_echo_functions.sh b/tmux/.config/tmux/plugins/tpm/scripts/helpers/shell_echo_functions.sh new file mode 100644 index 0000000..4f21c04 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/helpers/shell_echo_functions.sh @@ -0,0 +1,7 @@ +echo_ok() { + echo "$*" +} + +echo_err() { + fail_helper "$*" +} diff --git a/tmux/.config/tmux/plugins/tpm/scripts/helpers/tmux_echo_functions.sh b/tmux/.config/tmux/plugins/tpm/scripts/helpers/tmux_echo_functions.sh new file mode 100644 index 0000000..3a2aba2 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/helpers/tmux_echo_functions.sh @@ -0,0 +1,28 @@ +_has_emacs_mode_keys() { + $(tmux show -gw mode-keys | grep -q emacs) +} + +tmux_echo() { + local message="$1" + tmux run-shell "echo '$message'" +} + +echo_ok() { + tmux_echo "$*" +} + +echo_err() { + tmux_echo "$*" +} + +end_message() { + if _has_emacs_mode_keys; then + local continue_key="ESCAPE" + else + local continue_key="ENTER" + fi + tmux_echo "" + tmux_echo "TMUX environment reloaded." + tmux_echo "" + tmux_echo "Done, press $continue_key to continue." +} diff --git a/tmux/.config/tmux/plugins/tpm/scripts/helpers/tmux_utils.sh b/tmux/.config/tmux/plugins/tpm/scripts/helpers/tmux_utils.sh new file mode 100644 index 0000000..fa30c48 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/helpers/tmux_utils.sh @@ -0,0 +1,6 @@ +HELPERS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source "$HELPERS_DIR/plugin_functions.sh" + +reload_tmux_environment() { + tmux source-file $(_get_user_tmux_conf) >/dev/null 2>&1 +} diff --git a/tmux/.config/tmux/plugins/tpm/scripts/helpers/utility.sh b/tmux/.config/tmux/plugins/tpm/scripts/helpers/utility.sh new file mode 100644 index 0000000..f556286 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/helpers/utility.sh @@ -0,0 +1,17 @@ +ensure_tpm_path_exists() { + mkdir -p "$(tpm_path)" +} + +fail_helper() { + local message="$1" + echo "$message" >&2 + FAIL="true" +} + +exit_value_helper() { + if [ "$FAIL" == "true" ]; then + exit 1 + else + exit 0 + fi +} diff --git a/tmux/.config/tmux/plugins/tpm/scripts/install_plugins.sh b/tmux/.config/tmux/plugins/tpm/scripts/install_plugins.sh new file mode 100755 index 0000000..ce34bf5 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/install_plugins.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +HELPERS_DIR="$CURRENT_DIR/helpers" + +source "$HELPERS_DIR/plugin_functions.sh" +source "$HELPERS_DIR/utility.sh" + +if [ "$1" == "--tmux-echo" ]; then # tmux-specific echo functions + source "$HELPERS_DIR/tmux_echo_functions.sh" +else # shell output functions + source "$HELPERS_DIR/shell_echo_functions.sh" +fi + +clone() { + local plugin="$1" + local branch="$2" + if [ -n "$branch" ]; then + cd "$(tpm_path)" && + GIT_TERMINAL_PROMPT=0 git clone -b "$branch" --single-branch --recursive "$plugin" >/dev/null 2>&1 + else + cd "$(tpm_path)" && + GIT_TERMINAL_PROMPT=0 git clone --single-branch --recursive "$plugin" >/dev/null 2>&1 + fi +} + +# tries cloning: +# 1. plugin name directly - works if it's a valid git url +# 2. expands the plugin name to point to a github repo and tries cloning again +clone_plugin() { + local plugin="$1" + local branch="$2" + clone "$plugin" "$branch" || + clone "https://git::@github.com/$plugin" "$branch" +} + +# clone plugin and produce output +install_plugin() { + local plugin="$1" + local branch="$2" + local plugin_name="$(plugin_name_helper "$plugin")" + + if plugin_already_installed "$plugin"; then + echo_ok "Already installed \"$plugin_name\"" + else + echo_ok "Installing \"$plugin_name\"" + clone_plugin "$plugin" "$branch" && + echo_ok " \"$plugin_name\" download success" || + echo_err " \"$plugin_name\" download fail" + fi +} + +install_plugins() { + local plugins="$(tpm_plugins_list_helper)" + for plugin in $plugins; do + IFS='#' read -ra plugin <<< "$plugin" + install_plugin "${plugin[0]}" "${plugin[1]}" + done +} + +verify_tpm_path_permissions() { + local path="$(tpm_path)" + # check the write permission flag for all users to ensure + # that we have proper access + [ -w "$path" ] || + echo_err "$path is not writable!" +} + +main() { + ensure_tpm_path_exists + verify_tpm_path_permissions + install_plugins + exit_value_helper +} +main diff --git a/tmux/.config/tmux/plugins/tpm/scripts/source_plugins.sh b/tmux/.config/tmux/plugins/tpm/scripts/source_plugins.sh new file mode 100755 index 0000000..87b5c0c --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/source_plugins.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +HELPERS_DIR="$CURRENT_DIR/helpers" + +source "$HELPERS_DIR/plugin_functions.sh" + +plugin_dir_exists() { + [ -d "$1" ] +} + +# Runs all *.tmux files from the plugin directory. +# Files are ran as executables. +# No errors if the plugin dir does not exist. +silently_source_all_tmux_files() { + local plugin_path="$1" + local plugin_tmux_files="$plugin_path*.tmux" + if plugin_dir_exists "$plugin_path"; then + for tmux_file in $plugin_tmux_files; do + # if the glob didn't find any files this will be the + # unexpanded glob which obviously doesn't exist + [ -f "$tmux_file" ] || continue + # runs *.tmux file as an executable + $tmux_file >/dev/null 2>&1 + done + fi +} + +source_plugins() { + local plugin plugin_path + local plugins="$(tpm_plugins_list_helper)" + for plugin in $plugins; do + IFS='#' read -ra plugin <<< "$plugin" + plugin_path="$(plugin_path_helper "${plugin[0]}")" + silently_source_all_tmux_files "$plugin_path" + done +} + +main() { + source_plugins +} +main diff --git a/tmux/.config/tmux/plugins/tpm/scripts/update_plugin.sh b/tmux/.config/tmux/plugins/tpm/scripts/update_plugin.sh new file mode 100755 index 0000000..ba1d22d --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/update_plugin.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +# this script handles core logic of updating plugins + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +HELPERS_DIR="$CURRENT_DIR/helpers" + +source "$HELPERS_DIR/plugin_functions.sh" +source "$HELPERS_DIR/utility.sh" + +if [ "$1" == "--tmux-echo" ]; then # tmux-specific echo functions + source "$HELPERS_DIR/tmux_echo_functions.sh" +else # shell output functions + source "$HELPERS_DIR/shell_echo_functions.sh" +fi + +# from now on ignore first script argument +shift + +pull_changes() { + local plugin="$1" + local plugin_path="$(plugin_path_helper "$plugin")" + cd "$plugin_path" && + GIT_TERMINAL_PROMPT=0 git pull && + GIT_TERMINAL_PROMPT=0 git submodule update --init --recursive +} + +update() { + local plugin="$1" + $(pull_changes "$plugin" > /dev/null 2>&1) && + echo_ok " \"$plugin\" update success" || + echo_err " \"$plugin\" update fail" +} + +update_all() { + echo_ok "Updating all plugins!" + echo_ok "" + local plugins="$(tpm_plugins_list_helper)" + for plugin in $plugins; do + IFS='#' read -ra plugin <<< "$plugin" + local plugin_name="$(plugin_name_helper "${plugin[0]}")" + # updating only installed plugins + if plugin_already_installed "$plugin_name"; then + update "$plugin_name" & + fi + done + wait +} + +update_plugins() { + local plugins="$*" + for plugin in $plugins; do + IFS='#' read -ra plugin <<< "$plugin" + local plugin_name="$(plugin_name_helper "${plugin[0]}")" + if plugin_already_installed "$plugin_name"; then + update "$plugin_name" & + else + echo_err "$plugin_name not installed!" & + fi + done + wait +} + +main() { + ensure_tpm_path_exists + if [ "$1" == "all" ]; then + update_all + else + update_plugins "$*" + fi + exit_value_helper +} +main "$*" diff --git a/tmux/.config/tmux/plugins/tpm/scripts/update_plugin_prompt_handler.sh b/tmux/.config/tmux/plugins/tpm/scripts/update_plugin_prompt_handler.sh new file mode 100755 index 0000000..06823d4 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/update_plugin_prompt_handler.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +HELPERS_DIR="$CURRENT_DIR/helpers" + +if [ $# -eq 0 ]; then + exit 0 +fi + +source "$HELPERS_DIR/tmux_echo_functions.sh" +source "$HELPERS_DIR/tmux_utils.sh" + +main() { + "$CURRENT_DIR/update_plugin.sh" --tmux-echo "$*" + reload_tmux_environment + end_message +} +main "$*" diff --git a/tmux/.config/tmux/plugins/tpm/scripts/variables.sh b/tmux/.config/tmux/plugins/tpm/scripts/variables.sh new file mode 100644 index 0000000..b5677f6 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/scripts/variables.sh @@ -0,0 +1,13 @@ +install_key_option="@tpm-install" +default_install_key="I" + +update_key_option="@tpm-update" +default_update_key="U" + +clean_key_option="@tpm-clean" +default_clean_key="M-u" + +SUPPORTED_TMUX_VERSION="1.9" + +DEFAULT_TPM_ENV_VAR_NAME="TMUX_PLUGIN_MANAGER_PATH" +DEFAULT_TPM_PATH="$HOME/.tmux/plugins/" diff --git a/tmux/.config/tmux/plugins/tpm/tests/expect_failed_plugin_download b/tmux/.config/tmux/plugins/tpm/tests/expect_failed_plugin_download new file mode 100755 index 0000000..204cf6b --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/expect_failed_plugin_download @@ -0,0 +1,36 @@ +#!/usr/bin/env expect + +# disables script output +log_user 0 + +spawn tmux + +# Waiting for tmux to attach. If this is not done, next command, `send` will +# not work properly. +sleep 1 + +# this is tmux prefix + I +send "I" + +# cloning might take a while +set timeout 20 + +expect_after { + timeout { exit 1 } +} + +expect { + "Installing \"non-existing-plugin\"" +} + +expect { + "\"non-existing-plugin\" download fail" +} + +expect { + "Done, press ENTER to continue" { + exit 0 + } +} + +exit 1 diff --git a/tmux/.config/tmux/plugins/tpm/tests/expect_successful_clean_plugins b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_clean_plugins new file mode 100755 index 0000000..edfc594 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_clean_plugins @@ -0,0 +1,35 @@ +#!/usr/bin/env expect + +# disables script output +log_user 0 + +spawn tmux + +# Waiting for tmux to attach. If this is not done, next command, `send` will +# not work properly. +sleep 1 + +# this is tmux prefix + alt + u +send "u" + +set timeout 5 + +expect_after { + timeout { exit 1 } +} + +expect { + "Removing \"tmux-example-plugin\"" +} + +expect { + "\"tmux-example-plugin\" clean success" +} + +expect { + "Done, press ENTER to continue." { + exit 0 + } +} + +exit 1 diff --git a/tmux/.config/tmux/plugins/tpm/tests/expect_successful_multiple_plugins_download b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_multiple_plugins_download new file mode 100755 index 0000000..01060af --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_multiple_plugins_download @@ -0,0 +1,44 @@ +#!/usr/bin/env expect + +# disables script output +log_user 0 + +spawn tmux + +# Waiting for tmux to attach. If this is not done, next command, `send` will +# not work properly. +sleep 1 + +# this is tmux prefix + I +send "I" + +# cloning might take a while +set timeout 15 + +expect_after { + timeout { exit 1 } +} + +expect { + "Installing \"tmux-example-plugin\"" +} + +expect { + "\"tmux-example-plugin\" download success" +} + +expect { + "Installing \"tmux-copycat\"" +} + +expect { + "\"tmux-copycat\" download success" +} + +expect { + "Done, press ENTER to continue." { + exit 0 + } +} + +exit 1 diff --git a/tmux/.config/tmux/plugins/tpm/tests/expect_successful_plugin_download b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_plugin_download new file mode 100755 index 0000000..3d5a826 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_plugin_download @@ -0,0 +1,50 @@ +#!/usr/bin/env expect + +# disables script output +log_user 0 + +spawn tmux + +# Waiting for tmux to attach. If this is not done, next command, `send` will +# not work properly. +sleep 1 + +# this is tmux prefix + I +send "I" + +# cloning might take a while +set timeout 15 + +expect_after { + timeout { exit 1 } +} + +expect { + "Installing \"tmux-example-plugin\"" +} + +expect { + "\"tmux-example-plugin\" download success" +} + +expect { + "Done, press ENTER to continue" { + send " " + } +} + +sleep 1 +# this is tmux prefix + I +send "I" + +expect { + "Already installed \"tmux-example-plugin\"" +} + +expect { + "Done, press ENTER to continue" { + exit 0 + } +} + +exit 1 diff --git a/tmux/.config/tmux/plugins/tpm/tests/expect_successful_update_of_a_single_plugin b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_update_of_a_single_plugin new file mode 100755 index 0000000..63375b4 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_update_of_a_single_plugin @@ -0,0 +1,55 @@ +#!/usr/bin/env expect + +# disables script output +log_user 0 + +spawn tmux + +# Waiting for tmux to attach. If this is not done, next command, `send` will +# not work properly. +sleep 1 + +# this is tmux prefix + U +send "U" + +set timeout 15 + +expect_after { + timeout { exit 1 } +} + +expect { + "Installed plugins" +} + +expect { + "tmux-example-plugin" +} + +expect { + "\"all\" - updates all plugins" +} + +expect { + "ENTER - cancels" +} + +# wait for tmux to display prompt before sending characters +sleep 1 +send "tmux-example-plugin\r" + +expect { + "Updating \"tmux-example-plugin\"" +} + +expect { + "\"tmux-example-plugin\" update success" +} + +expect { + "Done, press ENTER to continue." { + exit 0 + } +} + +exit 1 diff --git a/tmux/.config/tmux/plugins/tpm/tests/expect_successful_update_of_all_plugins b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_update_of_all_plugins new file mode 100755 index 0000000..b67b09c --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/expect_successful_update_of_all_plugins @@ -0,0 +1,59 @@ +#!/usr/bin/env expect + +# disables script output +log_user 0 + +spawn tmux + +# Waiting for tmux to attach. If this is not done, next command, `send` will +# not work properly. +sleep 1 + +# this is tmux prefix + U +send "U" + +set timeout 5 + +expect_after { + timeout { exit 1 } +} + +expect { + "Installed plugins" +} + +expect { + "tmux-example-plugin" +} + +expect { + "\"all\" - updates all plugins" +} + +expect { + "ENTER - cancels" +} + +# wait for tmux to display prompt before sending characters +sleep 1 +send "all\r" + +expect { + "Updating all plugins!" +} + +expect { + "Updating \"tmux-example-plugin\"" +} + +expect { + "\"tmux-example-plugin\" update success" +} + +expect { + "Done, press ENTER to continue." { + exit 0 + } +} + +exit 1 diff --git a/tmux/.config/tmux/plugins/tpm/tests/helpers/tpm.sh b/tmux/.config/tmux/plugins/tpm/tests/helpers/tpm.sh new file mode 100644 index 0000000..8521142 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/helpers/tpm.sh @@ -0,0 +1,13 @@ +check_dir_exists_helper() { + [ -d "$1" ] +} + +# runs the scripts and asserts it has the correct output and exit code +script_run_helper() { + local script="$1" + local expected_output="$2" + local expected_exit_code="${3:-0}" + $script 2>&1 | + grep "$expected_output" >/dev/null 2>&1 && # grep -q flag quits the script early + [ "${PIPESTATUS[0]}" -eq "$expected_exit_code" ] +} diff --git a/tmux/.config/tmux/plugins/tpm/tests/test_plugin_clean.sh b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_clean.sh new file mode 100755 index 0000000..50299b3 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_clean.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +TPM_DIR="$PWD" +PLUGINS_DIR="$HOME/.tmux/plugins" + +source "$CURRENT_DIR/helpers/helpers.sh" +source "$CURRENT_DIR/helpers/tpm.sh" + +manually_install_the_plugin() { + rm -rf "$PLUGINS_DIR" + mkdir -p "$PLUGINS_DIR" + cd "$PLUGINS_DIR" + git clone --quiet https://github.com/tmux-plugins/tmux-example-plugin +} + +# TMUX KEY-BINDING TESTS + +test_plugin_uninstallation_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + run-shell "$TPM_DIR/tpm" + HERE + + manually_install_the_plugin + + "$CURRENT_DIR/expect_successful_clean_plugins" || + fail_helper "[key-binding] clean fails" + + teardown_helper +} + +# SCRIPT TESTS + +test_plugin_uninstallation_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + run-shell "$TPM_DIR/tpm" + HERE + + manually_install_the_plugin + + script_run_helper "$TPM_DIR/bin/clean_plugins" '"tmux-example-plugin" clean success' || + fail_helper "[script] plugin cleaning fails" + + teardown_helper +} + +test_unsuccessful_plugin_uninstallation_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + run-shell "$TPM_DIR/tpm" + HERE + + manually_install_the_plugin + chmod 000 "$PLUGINS_DIR/tmux-example-plugin" # disable directory deletion + + local expected_exit_code=1 + script_run_helper "$TPM_DIR/bin/clean_plugins" '"tmux-example-plugin" clean fail' "$expected_exit_code" || + fail_helper "[script] unsuccessful plugin cleaning doesn't fail" + + chmod 755 "$PLUGINS_DIR/tmux-example-plugin" # enable directory deletion + + teardown_helper +} + +run_tests diff --git a/tmux/.config/tmux/plugins/tpm/tests/test_plugin_installation.sh b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_installation.sh new file mode 100755 index 0000000..13e8a04 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_installation.sh @@ -0,0 +1,284 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PLUGINS_DIR="$HOME/.tmux/plugins" +TPM_DIR="$PWD" + +CUSTOM_PLUGINS_DIR="$HOME/foo/plugins" +ADDITIONAL_CONFIG_FILE_1="$HOME/.tmux/additional_config_file_1" +ADDITIONAL_CONFIG_FILE_2="$HOME/.tmux/additional_config_file_2" + +source "$CURRENT_DIR/helpers/helpers.sh" +source "$CURRENT_DIR/helpers/tpm.sh" + +# TMUX KEY-BINDING TESTS + +test_plugin_installation_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + "$CURRENT_DIR/expect_successful_plugin_download" || + fail_helper "[key-binding] plugin installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[key-binding] plugin download fails" + + teardown_helper +} + +test_plugin_installation_via_tmux_key_binding_set_option() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set-option -g @plugin "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + "$CURRENT_DIR/expect_successful_plugin_download" || + fail_helper "[key-binding][set-option] plugin installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[key-binding][set-option] plugin download fails" + + teardown_helper +} + +test_plugin_installation_custom_dir_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set-environment -g TMUX_PLUGIN_MANAGER_PATH '$CUSTOM_PLUGINS_DIR' + + set -g @plugin "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + "$CURRENT_DIR/expect_successful_plugin_download" || + fail_helper "[key-binding][custom dir] plugin installation fails" + + check_dir_exists_helper "$CUSTOM_PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[key-binding][custom dir] plugin download fails" + + teardown_helper + rm -rf "$CUSTOM_PLUGINS_DIR" +} + +test_non_existing_plugin_installation_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "tmux-plugins/non-existing-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + "$CURRENT_DIR/expect_failed_plugin_download" || + fail_helper "[key-binding] non existing plugin installation doesn't fail" + + teardown_helper +} + +test_multiple_plugins_installation_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "tmux-plugins/tmux-example-plugin" + \ \ set -g @plugin 'tmux-plugins/tmux-copycat' + run-shell "$TPM_DIR/tpm" + HERE + + "$CURRENT_DIR/expect_successful_multiple_plugins_download" || + fail_helper "[key-binding] multiple plugins installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[key-binding] plugin download fails (tmux-example-plugin)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || + fail_helper "[key-binding] plugin download fails (tmux-copycat)" + + teardown_helper +} + +test_plugins_installation_from_sourced_file_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + source '$ADDITIONAL_CONFIG_FILE_1' + set -g @plugin 'tmux-plugins/tmux-example-plugin' + run-shell "$TPM_DIR/tpm" + HERE + + mkdir ~/.tmux + echo "set -g @plugin 'tmux-plugins/tmux-copycat'" > "$ADDITIONAL_CONFIG_FILE_1" + + "$CURRENT_DIR/expect_successful_multiple_plugins_download" || + fail_helper "[key-binding][sourced file] plugins installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[key-binding][sourced file] plugin download fails (tmux-example-plugin)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || + fail_helper "[key-binding][sourced file] plugin download fails (tmux-copycat)" + + teardown_helper +} + +test_plugins_installation_from_multiple_sourced_files_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + \ \ source '$ADDITIONAL_CONFIG_FILE_1' + source-file '$ADDITIONAL_CONFIG_FILE_2' + run-shell "$TPM_DIR/tpm" + HERE + + mkdir ~/.tmux + echo "set -g @plugin 'tmux-plugins/tmux-example-plugin'" > "$ADDITIONAL_CONFIG_FILE_1" + echo " set -g @plugin 'tmux-plugins/tmux-copycat'" > "$ADDITIONAL_CONFIG_FILE_2" + + "$CURRENT_DIR/expect_successful_multiple_plugins_download" || + fail_helper "[key-binding][multiple sourced files] plugins installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[key-binding][multiple sourced files] plugin download fails (tmux-example-plugin)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || + fail_helper "[key-binding][multiple sourced files] plugin download fails (tmux-copycat)" + + teardown_helper +} + +# SCRIPT TESTS + +test_plugin_installation_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || + fail_helper "[script] plugin installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[script] plugin download fails" + + script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-example-plugin"' || + fail_helper "[script] plugin already installed message fail" + + teardown_helper +} + +test_plugin_installation_custom_dir_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set-environment -g TMUX_PLUGIN_MANAGER_PATH '$CUSTOM_PLUGINS_DIR' + + set -g @plugin "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || + fail_helper "[script][custom dir] plugin installation fails" + + check_dir_exists_helper "$CUSTOM_PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[script][custom dir] plugin download fails" + + script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-example-plugin"' || + fail_helper "[script][custom dir] plugin already installed message fail" + + teardown_helper + rm -rf "$CUSTOM_PLUGINS_DIR" +} + +test_non_existing_plugin_installation_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "tmux-plugins/non-existing-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + local expected_exit_code=1 + script_run_helper "$TPM_DIR/bin/install_plugins" '"non-existing-plugin" download fail' "$expected_exit_code" || + fail_helper "[script] non existing plugin installation doesn't fail" + + teardown_helper +} + +test_multiple_plugins_installation_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "tmux-plugins/tmux-example-plugin" + \ \ set -g @plugin 'tmux-plugins/tmux-copycat' + run-shell "$TPM_DIR/tpm" + HERE + + script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || + fail_helper "[script] multiple plugins installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[script] plugin download fails (tmux-example-plugin)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || + fail_helper "[script] plugin download fails (tmux-copycat)" + + script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-copycat"' || + fail_helper "[script] multiple plugins already installed message fail" + + teardown_helper +} + +test_plugins_installation_from_sourced_file_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + source '$ADDITIONAL_CONFIG_FILE_1' + set -g @plugin 'tmux-plugins/tmux-example-plugin' + run-shell "$TPM_DIR/tpm" + HERE + + mkdir ~/.tmux + echo "set -g @plugin 'tmux-plugins/tmux-copycat'" > "$ADDITIONAL_CONFIG_FILE_1" + + script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-copycat" download success' || + fail_helper "[script][sourced file] plugins installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[script][sourced file] plugin download fails (tmux-example-plugin)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || + fail_helper "[script][sourced file] plugin download fails (tmux-copycat)" + + script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-copycat"' || + fail_helper "[script][sourced file] plugins already installed message fail" + + teardown_helper +} + +test_plugins_installation_from_multiple_sourced_files_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + \ \ source '$ADDITIONAL_CONFIG_FILE_1' + source-file '$ADDITIONAL_CONFIG_FILE_2' + set -g @plugin 'tmux-plugins/tmux-example-plugin' + run-shell "$TPM_DIR/tpm" + HERE + + mkdir ~/.tmux + echo " set -g @plugin 'tmux-plugins/tmux-copycat'" > "$ADDITIONAL_CONFIG_FILE_1" + echo "set -g @plugin 'tmux-plugins/tmux-sensible'" > "$ADDITIONAL_CONFIG_FILE_2" + + script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-sensible" download success' || + fail_helper "[script][multiple sourced files] plugins installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[script][multiple sourced files] plugin download fails (tmux-example-plugin)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || + fail_helper "[script][multiple sourced files] plugin download fails (tmux-copycat)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-sensible/" || + fail_helper "[script][multiple sourced files] plugin download fails (tmux-sensible)" + + script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-sensible"' || + fail_helper "[script][multiple sourced files] plugins already installed message fail" + + teardown_helper +} + +run_tests diff --git a/tmux/.config/tmux/plugins/tpm/tests/test_plugin_installation_legacy.sh b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_installation_legacy.sh new file mode 100755 index 0000000..bebfc3f --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_installation_legacy.sh @@ -0,0 +1,100 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PLUGINS_DIR="$HOME/.tmux/plugins" +TPM_DIR="$PWD" + +source "$CURRENT_DIR/helpers/helpers.sh" +source "$CURRENT_DIR/helpers/tpm.sh" + +# TMUX KEY-BINDING TESTS + +test_plugin_installation_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @tpm_plugins "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + # opens tmux and test it with `expect` + $CURRENT_DIR/expect_successful_plugin_download || + fail_helper "[key-binding] plugin installation fails" + + # check plugin dir exists after download + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[key-binding] plugin download fails" + + teardown_helper +} + +test_legacy_and_new_syntax_for_plugin_installation_work_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @tpm_plugins " \ + tmux-plugins/tmux-example-plugin \ + " + set -g @plugin 'tmux-plugins/tmux-copycat' + run-shell "$TPM_DIR/tpm" + HERE + + # opens tmux and test it with `expect` + "$CURRENT_DIR"/expect_successful_multiple_plugins_download || + fail_helper "[key-binding] multiple plugins installation fails" + + # check plugin dir exists after download + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[key-binding] plugin download fails (tmux-example-plugin)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || + fail_helper "[key-binding] plugin download fails (tmux-copycat)" + + teardown_helper +} + +# SCRIPT TESTS + +test_plugin_installation_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @tpm_plugins "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || + fail_helper "[script] plugin installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[script] plugin download fails" + + script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-example-plugin"' || + fail_helper "[script] plugin already installed message fail" + + teardown_helper +} + +test_legacy_and_new_syntax_for_plugin_installation_work_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @tpm_plugins " \ + tmux-plugins/tmux-example-plugin \ + " + set -g @plugin 'tmux-plugins/tmux-copycat' + run-shell "$TPM_DIR/tpm" + HERE + + script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || + fail_helper "[script] multiple plugin installation fails" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || + fail_helper "[script] plugin download fails (tmux-example-plugin)" + + check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || + fail_helper "[script] plugin download fails (tmux-copycat)" + + script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-copycat"' || + fail_helper "[script] multiple plugins already installed message fail" + + teardown_helper +} + +run_tests diff --git a/tmux/.config/tmux/plugins/tpm/tests/test_plugin_sourcing.sh b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_sourcing.sh new file mode 100755 index 0000000..4a777a9 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_sourcing.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +TPM_DIR="$PWD" +PLUGINS_DIR="$HOME/.tmux/plugins" + +CUSTOM_PLUGINS_DIR="$HOME/foo/plugins" + +source "$CURRENT_DIR/helpers/helpers.sh" +source "$CURRENT_DIR/helpers/tpm.sh" + +check_binding_defined() { + local binding="$1" + tmux list-keys | grep -q "$binding" +} + +create_test_plugin_helper() { + local plugin_path="$PLUGINS_DIR/tmux_test_plugin/" + rm -rf "$plugin_path" + mkdir -p "$plugin_path" + + while read line; do + echo "$line" >> "$plugin_path/test_plugin.tmux" + done + chmod +x "$plugin_path/test_plugin.tmux" +} + +check_tpm_path() { + local correct_tpm_path="$1" + local tpm_path="$(tmux start-server\; show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)" + [ "$correct_tpm_path" == "$tpm_path" ] +} + +test_plugin_sourcing() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "doesnt_matter/tmux_test_plugin" + run-shell "$TPM_DIR/tpm" + HERE + + # manually creates a local tmux plugin + create_test_plugin_helper <<- HERE + tmux bind-key R run-shell foo_command + HERE + + tmux new-session -d # tmux starts detached + check_binding_defined "R run-shell foo_command" || + fail_helper "Plugin sourcing fails" + + teardown_helper +} + +test_default_tpm_path() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + run-shell "$TPM_DIR/tpm" + HERE + + check_tpm_path "${PLUGINS_DIR}/" || + fail_helper "Default TPM path not correct" + + teardown_helper +} + +test_custom_tpm_path() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set-environment -g TMUX_PLUGIN_MANAGER_PATH '$CUSTOM_PLUGINS_DIR' + run-shell "$TPM_DIR/tpm" + HERE + + check_tpm_path "$CUSTOM_PLUGINS_DIR" || + fail_helper "Custom TPM path not correct" + + teardown_helper +} + +run_tests diff --git a/tmux/.config/tmux/plugins/tpm/tests/test_plugin_update.sh b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_update.sh new file mode 100755 index 0000000..90f92a8 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tests/test_plugin_update.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +TPM_DIR="$PWD" +PLUGINS_DIR="$HOME/.tmux/plugins" + +source "$CURRENT_DIR/helpers/helpers.sh" +source "$CURRENT_DIR/helpers/tpm.sh" + +manually_install_the_plugin() { + mkdir -p "$PLUGINS_DIR" + cd "$PLUGINS_DIR" + git clone --quiet https://github.com/tmux-plugins/tmux-example-plugin +} + +# TMUX KEY-BINDING TESTS + +test_plugin_update_via_tmux_key_binding() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + manually_install_the_plugin + + "$CURRENT_DIR/expect_successful_update_of_all_plugins" || + fail_helper "[key-binding] 'update all plugins' fails" + + "$CURRENT_DIR/expect_successful_update_of_a_single_plugin" || + fail_helper "[key-binding] 'update single plugin' fails" + + teardown_helper +} + +# SCRIPT TESTS + +test_plugin_update_via_script() { + set_tmux_conf_helper <<- HERE + set -g mode-keys vi + set -g @plugin "tmux-plugins/tmux-example-plugin" + run-shell "$TPM_DIR/tpm" + HERE + + manually_install_the_plugin + + local expected_exit_code=1 + script_run_helper "$TPM_DIR/bin/update_plugins" 'usage' "$expected_exit_code" || + fail_helper "[script] running update plugins without args should fail" + + script_run_helper "$TPM_DIR/bin/update_plugins tmux-example-plugin" '"tmux-example-plugin" update success' || + fail_helper "[script] plugin update fails" + + script_run_helper "$TPM_DIR/bin/update_plugins all" '"tmux-example-plugin" update success' || + fail_helper "[script] update all plugins fails" + + teardown_helper +} + +run_tests diff --git a/tmux/.config/tmux/plugins/tpm/tpm b/tmux/.config/tmux/plugins/tpm/tpm new file mode 100755 index 0000000..d6cb9a7 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm/tpm @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BINDINGS_DIR="$CURRENT_DIR/bindings" +SCRIPTS_DIR="$CURRENT_DIR/scripts" + +source "$SCRIPTS_DIR/variables.sh" + +get_tmux_option() { + local option="$1" + local default_value="$2" + local option_value="$(tmux show-option -gqv "$option")" + if [ -z "$option_value" ]; then + echo "$default_value" + else + echo "$option_value" + fi +} + +tpm_path_set() { + tmux show-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" >/dev/null 2>&1 +} + +# Check if configuration file exists at an XDG-compatible location, if so use +# that directory for TMUX_PLUGIN_MANAGER_PATH. Otherwise use $DEFAULT_TPM_PATH. +set_default_tpm_path() { + local xdg_tmux_path="${XDG_CONFIG_HOME:-$HOME/.config}/tmux" + local tpm_path="$DEFAULT_TPM_PATH" + + if [ -f "$xdg_tmux_path/tmux.conf" ]; then + tpm_path="$xdg_tmux_path/plugins/" + fi + + tmux set-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" "$tpm_path" +} + +# Ensures TMUX_PLUGIN_MANAGER_PATH global env variable is set. +# +# Put this in `.tmux.conf` to override the default: +# `set-environment -g TMUX_PLUGIN_MANAGER_PATH "/some/other/path/"` +set_tpm_path() { + if ! tpm_path_set; then + set_default_tpm_path + fi +} + +# 1. Fetches plugin names from `@plugin` variables +# 2. Creates full plugin path +# 3. Sources all *.tmux files from each of the plugin directories +# - no errors raised if directory does not exist +# Files are sourced as tmux config files, not as shell scripts! +source_plugins() { + "$SCRIPTS_DIR/source_plugins.sh" >/dev/null 2>&1 +} + +# prefix + I - downloads TPM plugins and reloads TMUX environment +# prefix + U - updates a plugin (or all of them) and reloads TMUX environment +# prefix + alt + u - remove unused TPM plugins and reloads TMUX environment +set_tpm_key_bindings() { + local install_key="$(get_tmux_option "$install_key_option" "$default_install_key")" + tmux bind-key "$install_key" run-shell "$BINDINGS_DIR/install_plugins" + + local update_key="$(get_tmux_option "$update_key_option" "$default_update_key")" + tmux bind-key "$update_key" run-shell "$BINDINGS_DIR/update_plugins" + + local clean_key="$(get_tmux_option "$clean_key_option" "$default_clean_key")" + tmux bind-key "$clean_key" run-shell "$BINDINGS_DIR/clean_plugins" +} + +supported_tmux_version_ok() { + "$SCRIPTS_DIR/check_tmux_version.sh" "$SUPPORTED_TMUX_VERSION" +} + +main() { + if supported_tmux_version_ok; then + set_tpm_path + set_tpm_key_bindings + source_plugins + fi +} +main diff --git a/tmux/.config/tmux/plugins/vim-tmux-navigator/.gitignore b/tmux/.config/tmux/plugins/vim-tmux-navigator/.gitignore new file mode 100644 index 0000000..eee0dd8 --- /dev/null +++ b/tmux/.config/tmux/plugins/vim-tmux-navigator/.gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/tmux/.config/tmux/plugins/vim-tmux-navigator/License.md b/tmux/.config/tmux/plugins/vim-tmux-navigator/License.md new file mode 100644 index 0000000..c895796 --- /dev/null +++ b/tmux/.config/tmux/plugins/vim-tmux-navigator/License.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Chris Toomey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tmux/.config/tmux/plugins/vim-tmux-navigator/README.md b/tmux/.config/tmux/plugins/vim-tmux-navigator/README.md new file mode 100644 index 0000000..8db7b75 --- /dev/null +++ b/tmux/.config/tmux/plugins/vim-tmux-navigator/README.md @@ -0,0 +1,461 @@ +Vim Tmux Navigator +================== + +This plugin is a repackaging of [Mislav Marohnić's](https://mislav.net/) tmux-navigator +configuration described in [this gist][]. When combined with a set of tmux +key bindings, the plugin will allow you to navigate seamlessly between +vim and tmux splits using a consistent set of hotkeys. + +**NOTE**: This requires tmux v1.8 or higher. + +Usage +----- + +This plugin provides the following mappings which allow you to move between +Vim panes and tmux splits seamlessly. + +- `` => Left +- `` => Down +- `` => Up +- `` => Right +- `` => Previous split + +**Note** - you don't need to use your tmux `prefix` key sequence before using +the mappings. + +If you want to use alternate key mappings, see the [configuration section +below][]. + +Installation +------------ + +### Vim + +If you don't have a preferred installation method, I recommend using [Vundle][]. +Assuming you have Vundle installed and configured, the following steps will +install the plugin: + +Add the following line to your `~/.vimrc` file + +``` vim +Plugin 'christoomey/vim-tmux-navigator' +``` + +Then run + +``` +:PluginInstall +``` + +If you are using Vim 8+, you don't need any plugin manager. Simply clone this repository inside `~/.vim/pack/plugin/start/` directory and restart Vim. + +``` +git clone git@github.com:christoomey/vim-tmux-navigator.git ~/.vim/pack/plugins/start/vim-tmux-navigator +``` + +### lazy.nvim + +If you are using [lazy.nvim](https://github.com/folke/lazy.nvim). Add the following plugin to your configuration. + +```lua +{ + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, +} +``` + +Then, restart Neovim and lazy.nvim will automatically install the plugin and configure the keybindings. + +### tmux + +To configure the tmux side of this customization there are two options: + +#### Add a snippet + +Add the following to your `~/.tmux.conf` file: + +``` tmux +# Smart pane switching with awareness of Vim splits. +# See: https://github.com/christoomey/vim-tmux-navigator +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'" +bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' +tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' +if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" +if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + +bind-key -T copy-mode-vi 'C-h' select-pane -L +bind-key -T copy-mode-vi 'C-j' select-pane -D +bind-key -T copy-mode-vi 'C-k' select-pane -U +bind-key -T copy-mode-vi 'C-l' select-pane -R +bind-key -T copy-mode-vi 'C-\' select-pane -l +``` + +#### TPM + +If you'd prefer, you can use the Tmux Plugin Manager ([TPM][]) instead of +copying the snippet. +When using TPM, add the following lines to your ~/.tmux.conf: + +``` tmux +set -g @plugin 'christoomey/vim-tmux-navigator' +run '~/.tmux/plugins/tpm/tpm' +``` + +Thanks to Christopher Sexton who provided the updated tmux configuration in +[this blog post][]. + +Configuration +------------- + +### Custom Key Bindings + +If you don't want the plugin to create any mappings, you can use the five +provided functions to define your own custom maps. You will need to define +custom mappings in your `~/.vimrc` as well as update the bindings in tmux to +match. + +#### Vim + +Add the following to your `~/.vimrc` to define your custom maps: + +``` vim +let g:tmux_navigator_no_mappings = 1 + +noremap {Left-Mapping} :TmuxNavigateLeft +noremap {Down-Mapping} :TmuxNavigateDown +noremap {Up-Mapping} :TmuxNavigateUp +noremap {Right-Mapping} :TmuxNavigateRight +noremap {Previous-Mapping} :TmuxNavigatePrevious +``` + +*Note* Each instance of `{Left-Mapping}` or `{Down-Mapping}` must be replaced +in the above code with the desired mapping. Ie, the mapping for `` => +Left would be created with `noremap :TmuxNavigateLeft`. + +##### Autosave on leave + +You can configure the plugin to write the current buffer, or all buffers, when +navigating from Vim to tmux. This functionality is exposed via the +`g:tmux_navigator_save_on_switch` variable, which can have either of the +following values: + +Value | Behavior +------ | ------ +1 | `:update` (write the current buffer, but only if changed) +2 | `:wall` (write all buffers) + +To enable this, add the following (with the desired value) to your ~/.vimrc: + +```vim +" Write all buffers before navigating from Vim to tmux pane +let g:tmux_navigator_save_on_switch = 2 +``` + +##### Disable While Zoomed + +By default, if you zoom the tmux pane running Vim and then attempt to navigate +"past" the edge of the Vim session, tmux will unzoom the pane. This is the +default tmux behavior, but may be confusing if you've become accustomed to +navigation "wrapping" around the sides due to this plugin. + +We provide an option, `g:tmux_navigator_disable_when_zoomed`, which can be used +to disable this unzooming behavior, keeping all navigation within Vim until the +tmux pane is explicitly unzoomed. + +To disable navigation when zoomed, add the following to your ~/.vimrc: + +```vim +" Disable tmux navigator when zooming the Vim pane +let g:tmux_navigator_disable_when_zoomed = 1 +``` + +##### Preserve Zoom + +As noted above, navigating from a Vim pane to another tmux pane normally causes +the window to be unzoomed. Some users may prefer the behavior of tmux's `-Z` +option to `select-pane`, which keeps the window zoomed if it was zoomed. To +enable this behavior, set the `g:tmux_navigator_preserve_zoom` option to `1`: + +```vim +" If the tmux window is zoomed, keep it zoomed when moving from Vim to another pane +let g:tmux_navigator_preserve_zoom = 1 +``` + +Naturally, if `g:tmux_navigator_disable_when_zoomed` is enabled, this option +will have no effect. + +#### Tmux + +Alter each of the five lines of the tmux configuration listed above to use your +custom mappings. **Note** each line contains two references to the desired +mapping. + +### Additional Customization + +#### Ignoring programs that use Ctrl+hjkl movement + +In interactive programs such as FZF, Ctrl+hjkl can be used instead of the arrow keys to move the selection up and down. If vim-tmux-navigator is getting in your way trying to change the active window instead, you can make it be ignored and work as if this plugin were not enabled. Just modify the `is_vim` variable(that you have either on the snipped you pasted on `~/.tmux.conf` or on the `vim-tmux-navigator.tmux` file). For example, to add the program `foobar`: + +```diff +- is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'" ++ is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf|foobar)(diff)?$'" +``` + +#### Restoring Clear Screen (C-l) + +The default key bindings include `` which is the readline key binding +for clearing the screen. The following binding can be added to your `~/.tmux.conf` file to provide an alternate mapping to `clear-screen`. + +``` tmux +bind C-l send-keys 'C-l' +``` + +With this enabled you can use ` C-l` to clear the screen. + +Thanks to [Brian Hogan][] for the tip on how to re-map the clear screen binding. + +#### Restoring SIGQUIT (C-\\) + +The default key bindings also include `` which is the default method of +sending SIGQUIT to a foreground process. Similar to "Clear Screen" above, a key +binding can be created to replicate SIGQUIT in the prefix table. + +``` tmux +bind C-\\ send-keys 'C-\' +``` + +Alternatively, you can exclude the previous pane key binding from your `~/.tmux.conf`. If using TPM, the following line can be used to unbind the previous pane binding set by the plugin. + +``` tmux +unbind -n C-\\ +``` + +#### Disable Wrapping + +By default, if you try to move past the edge of the screen, tmux/vim will +"wrap" around to the opposite side. To disable this, you'll need to +configure both tmux and vim: + +For vim, you only need to enable this option: +```vim +let g:tmux_navigator_no_wrap = 1 +``` + +Tmux doesn't have an option, so whatever key bindings you have need to be set +to conditionally wrap based on position on screen: + +```tmux +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'" +bind-key -n 'C-h' if-shell "$is_vim" { send-keys C-h } { if-shell -F '#{pane_at_left}' {} { select-pane -L } } +bind-key -n 'C-j' if-shell "$is_vim" { send-keys C-j } { if-shell -F '#{pane_at_bottom}' {} { select-pane -D } } +bind-key -n 'C-k' if-shell "$is_vim" { send-keys C-k } { if-shell -F '#{pane_at_top}' {} { select-pane -U } } +bind-key -n 'C-l' if-shell "$is_vim" { send-keys C-l } { if-shell -F '#{pane_at_right}' {} { select-pane -R } } + +bind-key -T copy-mode-vi 'C-h' if-shell -F '#{pane_at_left}' {} { select-pane -L } +bind-key -T copy-mode-vi 'C-j' if-shell -F '#{pane_at_bottom}' {} { select-pane -D } +bind-key -T copy-mode-vi 'C-k' if-shell -F '#{pane_at_top}' {} { select-pane -U } +bind-key -T copy-mode-vi 'C-l' if-shell -F '#{pane_at_right}' {} { select-pane -R } +``` + +#### Nesting +If you like to nest your tmux sessions, this plugin is not going to work +properly. It probably never will, as it would require detecting when Tmux would +wrap from one outermost pane to another and propagating that to the outer +session. + +By default this plugin works on the outermost tmux session and the vim +sessions it contains, but you can customize the behaviour by adding more +commands to the expression used by the grep command. + +When nesting tmux sessions via ssh or mosh, you could extend it to look like +`'(^|\/)g?(view|vim|ssh|mosh?)(diff)?$'`, which makes this plugin work within +the innermost tmux session and the vim sessions within that one. This works +better than the default behaviour if you use the outer Tmux sessions as relays +to different hosts and have all instances of vim on remote hosts. + +Similarly, if you like to nest tmux locally, add `|tmux` to the expression. + +This behaviour means that you can't leave the innermost session with Ctrl-hjkl +directly. These following fallback mappings can be targeted to the right Tmux +session by escaping the prefix (Tmux' `send-prefix` command). + +``` tmux +bind -r C-h run "tmux select-pane -L" +bind -r C-j run "tmux select-pane -D" +bind -r C-k run "tmux select-pane -U" +bind -r C-l run "tmux select-pane -R" +bind -r C-\ run "tmux select-pane -l" +``` + +Another workaround is to configure tmux on the outer machine to send keys to +the inner tmux session: + +``` +bind-key -n 'M-h' 'send-keys c-h' +bind-key -n 'M-j' 'send-keys c-j' +bind-key -n 'M-k' 'send-keys c-k' +bind-key -n 'M-l' 'send-keys c-l' +``` + +Here we bind "meta" key (aka "alt" or "option" key) combinations for each of +the four directions and send those along to the innermost session via +`send-keys`. You use the normal `C-h,j,k,l` while in the outermost session and +the alternative bindings to navigate the innermost session. Note that if you +use the example above on a Mac, you may need to configure your terminal app to +get the option key to work like a normal meta key. Consult your terminal app's +manual for details. + +A third possible solution is to manually prevent the outermost tmux session +from intercepting the navigation keystrokes by disabling the prefix table: + +``` +set -g pane-active-border-style 'fg=#000000,bg=#ffff00' +bind -T root F12 \ + set prefix None \;\ + set key-table off \;\ + if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ + set -g pane-active-border-style 'fg=#000000,bg=#00ff00' + refresh-client -S \;\ + +bind -T off F12 \ + set -u prefix \;\ + set -u key-table \;\ + set -g pane-active-border-style 'fg=#000000,bg=#ffff00' + refresh-client -S +``` + +This code, added to the machine running the outermost tmux session, toggles the +outermost prefix table on and off with the `F12` key. When off, the active +pane's border changes to green to indicate that the inner session receives +navigation keystrokes. When toggled back on, the border returns to yellow and +normal operation resumes and the outermost responds to the nav keystrokes. + +The code example above also toggles the prefix key (ctrl-b by default) for the +outer session so that same prefix can be temporarily used on the inner session +instead of having to use a different prefix (ctrl-a by default) which you may +find convenient. If not, simply remove the lines that set/unset the prefix key +from the code example above. + + +Troubleshooting +--------------- + +### Vim -> Tmux doesn't work! + +This is likely due to conflicting key mappings in your `~/.vimrc`. You can use +the following search pattern to find conflicting mappings +`\v(nore)?map\s+\`. Any matching lines should be deleted or +altered to avoid conflicting with the mappings from the plugin. + +Another option is that the pattern matching included in the `.tmux.conf` is +not recognizing that Vim is active. To check that tmux is properly recognizing +Vim, use the provided Vim command `:TmuxNavigatorProcessList`. The output of +that command should be a list like: + +``` +Ss -zsh +S+ vim +S+ tmux +``` + +If you encounter a different output please [open an issue][] with as much info +about your OS, Vim version, and tmux version as possible. + +[open an issue]: https://github.com/christoomey/vim-tmux-navigator/issues/new + +### Tmux Can't Tell if Vim Is Active + +This functionality requires tmux version 1.8 or higher. You can check your +version to confirm with this shell command: + +``` bash +tmux -V # should return 'tmux 1.8' +``` + +### Switching out of Vim Is Slow + +If you find that navigation within Vim (from split to split) is fine, but Vim +to a non-Vim tmux pane is delayed, it might be due to a slow shell startup. +Consider moving code from your shell's non-interactive rc file (e.g., +`~/.zshenv`) into the interactive startup file (e.g., `~/.zshrc`) as Vim only +sources the non-interactive config. + +### It doesn't work in Vim's `terminal` mode + +Terminal mode is currently unsupported as adding this plugin's mappings there +causes conflict with movement mappings for FZF (it also uses terminal mode). +There's a conversation about this in https://github.com/christoomey/vim-tmux-navigator/pull/172 + +### It Doesn't Work in tmate + +[tmate][] is a tmux fork that aids in setting up remote pair programming +sessions. It is designed to run alongside tmux without issue, but occasionally +there are hiccups. Specifically, if the versions of tmux and tmate don't match, +you can have issues. See [this +issue](https://github.com/christoomey/vim-tmux-navigator/issues/27) for more +detail. + +[tmate]: http://tmate.io/ + +### Switching between host panes doesn't work when docker is running + +Images built from minimalist OSes may not have the `ps` command or have a +simpler version of the command that is not compatible with this plugin. +Try installing the `procps` package using the appropriate package manager +command. For Alpine, you would do `apk add procps`. + +If this doesn't solve your problem, you can also try the following: + +Replace the `is_vim` variable in your `~/.tmux.conf` file with: +```tmux +if-shell '[ -f /.dockerenv ]' \ + "is_vim=\"ps -o state=,comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?)(diff)?$'\"" + # Filter out docker instances of nvim from the host system to prevent + # host from thinking nvim is running in a pseudoterminal when its not. + "is_vim=\"ps -o state=,comm=,cgroup= -t '#{pane_tty}' \ + | grep -ivE '^.+ +.+ +.+\\/docker\\/.+$' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?)(diff)? +'\"" +``` + +Details: The output of the ps command on the host system includes processes +running within containers, but containers have their own instances of +/dev/pts/\*. vim-tmux-navigator relies on /dev/pts/\* to determine if vim is +running, so if vim is running in say /dev/pts/ in a container and there is a +tmux pane (not running vim) in /dev/pts/ on the host system, then without +the patch above vim-tmux-navigator will think vim is running when its not. + +### It Still Doesn't Work!!! + +The tmux configuration uses an inlined grep pattern match to help determine if +the current pane is running Vim. If you run into any issues with the navigation +not happening as expected, you can try using [Mislav's original external +script][] which has a more robust check. + +[Brian Hogan]: https://twitter.com/bphogan +[Mislav's original external script]: https://github.com/mislav/dotfiles/blob/master/bin/tmux-vim-select-pane +[Vundle]: https://github.com/gmarik/vundle +[TPM]: https://github.com/tmux-plugins/tpm +[configuration section below]: #custom-key-bindings +[this blog post]: http://www.codeography.com/2013/06/19/navigating-vim-and-tmux-splits +[this gist]: https://gist.github.com/mislav/5189704 diff --git a/tmux/.config/tmux/plugins/vim-tmux-navigator/doc/tmux-navigator.txt b/tmux/.config/tmux/plugins/vim-tmux-navigator/doc/tmux-navigator.txt new file mode 100644 index 0000000..6cc6fdf --- /dev/null +++ b/tmux/.config/tmux/plugins/vim-tmux-navigator/doc/tmux-navigator.txt @@ -0,0 +1,39 @@ +*tmux-navigator.txt* Plugin to allow seamless navigation between tmux and vim + +============================================================================== +CONTENTS *tmux-navigator-contents* + + +============================================================================== +INTRODUCTION *tmux-navigator* + +Vim-tmux-navigator is a little plugin which enables seamless navigation +between tmux panes and vim splits. This plugin is a repackaging of Mislav +Marohinc's tmux=navigator configuration. When combined with a set of tmux key +bindings, the plugin will allow you to navigate seamlessly between vim and +tmux splits using a consistent set of hotkeys. + +NOTE: This requires tmux v1.8 or higher. + +============================================================================== +CONFIGURATION *tmux-navigator-configuration* + +* Activate autoupdate on exit + let g:tmux_navigator_save_on_switch = 1 + +* Disable vim->tmux navigation when the Vim pane is zoomed in tmux + let g:tmux_navigator_disable_when_zoomed = 1 + +* If the Vim pane is zoomed, stay zoomed when moving to another tmux pane + let g:tmux_navigator_preserve_zoom = 1 + +* Custom Key Bindings + let g:tmux_navigator_no_mappings = 1 + + noremap {Left-mapping} :TmuxNavigateLeft + noremap {Down-Mapping} :TmuxNavigateDown + noremap {Up-Mapping} :TmuxNavigateUp + noremap {Right-Mapping} :TmuxNavigateRight + noremap {Previous-Mapping} :TmuxNavigatePrevious + + vim:tw=78:ts=8:ft=help:norl: diff --git a/tmux/.config/tmux/plugins/vim-tmux-navigator/pattern-check b/tmux/.config/tmux/plugins/vim-tmux-navigator/pattern-check new file mode 100644 index 0000000..a7dd59f --- /dev/null +++ b/tmux/.config/tmux/plugins/vim-tmux-navigator/pattern-check @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# Collection of various test strings that could be the output of the tmux +# 'pane_current_comamnd' message. Included as regression test for updates to +# the inline grep pattern used in the `.tmux.conf` configuration + +set -e + +RED=$(tput setaf 1) +GREEN=$(tput setaf 2) +YELLOW=$(tput setaf 3) +NORMAL=$(tput sgr0) + +vim_pattern='(^|\/)g?(view|l?n?vim?x?|fzf)(diff)?$' +match_tests=(vim Vim VIM vimdiff lvim /usr/local/bin/vim vi gvim view gview nvim vimx fzf) +no_match_tests=( /Users/christoomey/.vim/thing /usr/local/bin/start-vim ) + +display_matches() { + for process_name in "$@"; do + printf "%s %s\n" "$(matches_vim_pattern $process_name)" "$process_name" + done +} + +matches_vim_pattern() { + if echo "$1" | grep -iqE "$vim_pattern"; then + echo "${GREEN}match${NORMAL}" + else + echo "${RED}fail${NORMAL}" + fi +} + +main() { + echo "Testing against pattern: ${YELLOW}$vim_pattern${NORMAL}\n" + + echo "These should all ${GREEN}match${NORMAL}\n----------------------" + display_matches "${match_tests[@]}" + + echo "\nThese should all ${RED}fail${NORMAL}\n---------------------" + display_matches "${no_match_tests[@]}" +} + +main diff --git a/tmux/.config/tmux/plugins/vim-tmux-navigator/plugin/tmux_navigator.vim b/tmux/.config/tmux/plugins/vim-tmux-navigator/plugin/tmux_navigator.vim new file mode 100644 index 0000000..0b9bb60 --- /dev/null +++ b/tmux/.config/tmux/plugins/vim-tmux-navigator/plugin/tmux_navigator.vim @@ -0,0 +1,140 @@ +" Maps to switch vim splits in the given direction. If there are +" no more windows in that direction, forwards the operation to tmux. +" Additionally, toggles between last active vim splits/tmux panes. + +if exists("g:loaded_tmux_navigator") || &cp || v:version < 700 + finish +endif +let g:loaded_tmux_navigator = 1 + +function! s:VimNavigate(direction) + try + execute 'wincmd ' . a:direction + catch + echohl ErrorMsg | echo 'E11: Invalid in command-line window; executes, CTRL-C quits: wincmd k' | echohl None + endtry +endfunction + +if !get(g:, 'tmux_navigator_no_mappings', 0) + noremap :TmuxNavigateLeft + noremap :TmuxNavigateDown + noremap :TmuxNavigateUp + noremap :TmuxNavigateRight + noremap :TmuxNavigatePrevious +endif + +if empty($TMUX) + command! TmuxNavigateLeft call s:VimNavigate('h') + command! TmuxNavigateDown call s:VimNavigate('j') + command! TmuxNavigateUp call s:VimNavigate('k') + command! TmuxNavigateRight call s:VimNavigate('l') + command! TmuxNavigatePrevious call s:VimNavigate('p') + finish +endif + +command! TmuxNavigateLeft call s:TmuxAwareNavigate('h') +command! TmuxNavigateDown call s:TmuxAwareNavigate('j') +command! TmuxNavigateUp call s:TmuxAwareNavigate('k') +command! TmuxNavigateRight call s:TmuxAwareNavigate('l') +command! TmuxNavigatePrevious call s:TmuxAwareNavigate('p') + +if !exists("g:tmux_navigator_save_on_switch") + let g:tmux_navigator_save_on_switch = 0 +endif + +if !exists("g:tmux_navigator_disable_when_zoomed") + let g:tmux_navigator_disable_when_zoomed = 0 +endif + +if !exists("g:tmux_navigator_preserve_zoom") + let g:tmux_navigator_preserve_zoom = 0 +endif + +if !exists("g:tmux_navigator_no_wrap") + let g:tmux_navigator_no_wrap = 0 +endif + +let s:pane_position_from_direction = {'h': 'left', 'j': 'bottom', 'k': 'top', 'l': 'right'} + +function! s:TmuxOrTmateExecutable() + return (match($TMUX, 'tmate') != -1 ? 'tmate' : 'tmux') +endfunction + +function! s:TmuxVimPaneIsZoomed() + return s:TmuxCommand("display-message -p '#{window_zoomed_flag}'") == 1 +endfunction + +function! s:TmuxSocket() + " The socket path is the first value in the comma-separated list of $TMUX. + return split($TMUX, ',')[0] +endfunction + +function! s:TmuxCommand(args) + let cmd = s:TmuxOrTmateExecutable() . ' -S ' . s:TmuxSocket() . ' ' . a:args + let l:x=&shellcmdflag + let &shellcmdflag='-c' + let retval=system(cmd) + let &shellcmdflag=l:x + return retval +endfunction + +function! s:TmuxNavigatorProcessList() + echo s:TmuxCommand("run-shell 'ps -o state= -o comm= -t ''''#{pane_tty}'''''") +endfunction +command! TmuxNavigatorProcessList call s:TmuxNavigatorProcessList() + +let s:tmux_is_last_pane = 0 +augroup tmux_navigator + au! + autocmd WinEnter * let s:tmux_is_last_pane = 0 +augroup END + +function! s:NeedsVitalityRedraw() + return exists('g:loaded_vitality') && v:version < 704 && !has("patch481") +endfunction + +function! s:ShouldForwardNavigationBackToTmux(tmux_last_pane, at_tab_page_edge) + if g:tmux_navigator_disable_when_zoomed && s:TmuxVimPaneIsZoomed() + return 0 + endif + return a:tmux_last_pane || a:at_tab_page_edge +endfunction + +function! s:TmuxAwareNavigate(direction) + let nr = winnr() + let tmux_last_pane = (a:direction == 'p' && s:tmux_is_last_pane) + if !tmux_last_pane + call s:VimNavigate(a:direction) + endif + let at_tab_page_edge = (nr == winnr()) + " Forward the switch panes command to tmux if: + " a) we're toggling between the last tmux pane; + " b) we tried switching windows in vim but it didn't have effect. + if s:ShouldForwardNavigationBackToTmux(tmux_last_pane, at_tab_page_edge) + if g:tmux_navigator_save_on_switch == 1 + try + update " save the active buffer. See :help update + catch /^Vim\%((\a\+)\)\=:E32/ " catches the no file name error + endtry + elseif g:tmux_navigator_save_on_switch == 2 + try + wall " save all the buffers. See :help wall + catch /^Vim\%((\a\+)\)\=:E141/ " catches the no file name error + endtry + endif + let args = 'select-pane -t ' . shellescape($TMUX_PANE) . ' -' . tr(a:direction, 'phjkl', 'lLDUR') + if g:tmux_navigator_preserve_zoom == 1 + let l:args .= ' -Z' + endif + if g:tmux_navigator_no_wrap == 1 + let args = 'if -F "#{pane_at_' . s:pane_position_from_direction[a:direction] . '}" "" "' . args . '"' + endif + silent call s:TmuxCommand(args) + if s:NeedsVitalityRedraw() + redraw! + endif + let s:tmux_is_last_pane = 1 + else + let s:tmux_is_last_pane = 0 + endif +endfunction diff --git a/tmux/.config/tmux/plugins/vim-tmux-navigator/vim-tmux-navigator.tmux b/tmux/.config/tmux/plugins/vim-tmux-navigator/vim-tmux-navigator.tmux new file mode 100755 index 0000000..bf3faad --- /dev/null +++ b/tmux/.config/tmux/plugins/vim-tmux-navigator/vim-tmux-navigator.tmux @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +version_pat='s/^tmux[^0-9]*([.0-9]+).*/\1/p' + +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'" +tmux bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +tmux bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +tmux bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +tmux bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" +tmux_version="$(tmux -V | sed -En "$version_pat")" +tmux setenv -g tmux_version "$tmux_version" + +#echo "{'version' : '${tmux_version}', 'sed_pat' : '${version_pat}' }" > ~/.tmux_version.json + +tmux if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" +tmux if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + +tmux bind-key -T copy-mode-vi C-h select-pane -L +tmux bind-key -T copy-mode-vi C-j select-pane -D +tmux bind-key -T copy-mode-vi C-k select-pane -U +tmux bind-key -T copy-mode-vi C-l select-pane -R +tmux bind-key -T copy-mode-vi C-\\ select-pane -l diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf new file mode 100644 index 0000000..bfeac6c --- /dev/null +++ b/tmux/.config/tmux/tmux.conf @@ -0,0 +1,67 @@ +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'christoomey/vim-tmux-navigator' + +set -g @plugin 'pschmitt/tmux-ssh-split' +# Other examples: +# set -g @plugin 'github_username/plugin_name' +# set -g @plugin 'github_username/plugin_name#branch' +# set -g @plugin 'git@github.com:user/plugin' +# set -g @plugin 'git@bitbucket.com:user/plugin' +#set -g @plugin "arcticicestudio/nord-tmux" +#set -g default-terminal "st-256color" +#set -g @plugin 'wfxr/tmux-power' +#set -g @tmux_power_theme 'default' +#set -g status-style fg=white,bg=black + +# ---------------------- +# Status Bar +# ----------------------- +set-option -g status on # turn the status bar on +set -g status-interval 5 # set update frequencey (default 15 seconds) +set -g status-justify centre # center window list for clarity +# set-option -g status-position top # position the status bar at top of screen + +# visual notification of activity in other windows + +# set color for status bar +#set-option -g status-bg color8 #base02 +set -g status-style bg=default +set-option -g status-fg color3 #yellow + +# set window list colors - red for active and cyan for inactive + +# show host name and IP address on left side of status bar +set -g status-left-length 85 + +# show session name, window & pane number, date and time on right side of +# status bar +set -g status-right-length 60 +set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]: %d %b %Y #[fg=green]: %l:%M %p : #(date -u | awk '{print $4}') :" +set -g status-right "#[fg=blue]#(tmux-cpu --no-color)" + +# mouse mode (commented lines for old versions of tmux) +# setw -g mode-mouse on +# set -g mouse-resize-pane on +# set -g mouse-select-pane on +# set -g mouse-select-window on +# key bindings + +# divider color +set -g default-terminal "xterm-256color" + +unbind r +bind r source-file /home/moo/.config/tmux/tmux.conf + +#act like vim +setw -g mode-keys vi +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R + +bind-key -n C-S-Left swap-window -t -1 +bind-key -n C-S-Right swap-window -t +1 + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.config/tmux/plugins/tpm/tpm' diff --git a/userdirs/.config/user-dirs.dirs b/userdirs/.config/user-dirs.dirs new file mode 100644 index 0000000..140e318 --- /dev/null +++ b/userdirs/.config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/.config/desktop" +XDG_DOWNLOAD_DIR="$HOME/.local/media/mnt/alpha" +XDG_TEMPLATES_DIR="$HOME/" +XDG_PUBLICSHARE_DIR="$HOME/" +XDG_DOCUMENTS_DIR="$HOME/.local/dox" +XDG_MUSIC_DIR="$HOME/" +XDG_PICTURES_DIR="$HOME/.local/media/pics" +XDG_VIDEOS_DIR="$HOME/.local/media/vids" diff --git a/userdirs/.config/user-dirs.locale b/userdirs/.config/user-dirs.locale new file mode 100644 index 0000000..c206361 --- /dev/null +++ b/userdirs/.config/user-dirs.locale @@ -0,0 +1 @@ +en_US \ No newline at end of file diff --git a/vim/.config/vim/.netrwhist b/vim/.config/vim/.netrwhist new file mode 100644 index 0000000..1fce8af --- /dev/null +++ b/vim/.config/vim/.netrwhist @@ -0,0 +1,12 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhistcnt =7 +let g:netrw_dirhist_7='/home/moo/.pki/nssdb' +let g:netrw_dirhist_6='/home/moo/.pki' +let g:netrw_dirhist_5='/home/moo/.wallpapers' +let g:netrw_dirhist_4='/home/moo/.zenmap' +let g:netrw_dirhist_3='/home/moo/.cargo' +let g:netrw_dirhist_2='/run/media/moo/unlocked-universe/website/rioluroom.com/sass/artists' +let g:netrw_dirhist_1='/home/moo/vim-visualHtml/autoload/visualHtml' +let g:netrw_dirhist_0='/home/moo/.config/qutebrowser' +let g:netrw_dirhist_9='/run/media/moo/unlocked-universe/website/rioluroom.com/js/Zoom/SlipperyT' +let g:netrw_dirhist_8='/run/media/moo/unlocked-universe/website/rioluroom.com/sass' diff --git a/vim/.config/vim/autoload/plug.vim b/vim/.config/vim/autoload/plug.vim new file mode 100644 index 0000000..6c0fd20 --- /dev/null +++ b/vim/.config/vim/autoload/plug.vim @@ -0,0 +1,2802 @@ +" vim-plug: Vim plugin manager +" ============================ +" +" Download plug.vim and put it in ~/.vim/autoload +" +" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ +" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +" +" Edit your .vimrc +" +" call plug#begin('~/.vim/plugged') +" +" " Make sure you use single quotes +" +" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +" Plug 'junegunn/vim-easy-align' +" +" " Any valid git URL is allowed +" Plug 'https://github.com/junegunn/vim-github-dashboard.git' +" +" " Multiple Plug commands can be written in a single line using | separators +" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' +" +" " On-demand loading +" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } +" +" " Using a non-default branch +" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } +" +" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) +" Plug 'fatih/vim-go', { 'tag': '*' } +" +" " Plugin options +" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } +" +" " Plugin outside ~/.vim/plugged with post-update hook +" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +" +" " Unmanaged plugin (manually installed and updated) +" Plug '~/my-prototype-plugin' +" +" " Initialize plugin system +" call plug#end() +" +" Then reload .vimrc and :PlugInstall to install plugins. +" +" Plug options: +" +"| Option | Description | +"| ----------------------- | ------------------------------------------------ | +"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | +"| `rtp` | Subdirectory that contains Vim plugin | +"| `dir` | Custom directory for the plugin | +"| `as` | Use different name for the plugin | +"| `do` | Post-update hook (string or funcref) | +"| `on` | On-demand loading: Commands or ``-mappings | +"| `for` | On-demand loading: File types | +"| `frozen` | Do not update unless explicitly specified | +" +" More information: https://github.com/junegunn/vim-plug +" +" +" Copyright (c) 2017 Junegunn Choi +" +" MIT License +" +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be +" included in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +if exists('g:loaded_plug') + finish +endif +let g:loaded_plug = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let s:plug_src = 'https://github.com/junegunn/vim-plug.git' +let s:plug_tab = get(s:, 'plug_tab', -1) +let s:plug_buf = get(s:, 'plug_buf', -1) +let s:mac_gui = has('gui_macvim') && has('gui_running') +let s:is_win = has('win32') +let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) +let s:vim8 = has('patch-8.0.0039') && exists('*job_start') +if s:is_win && &shellslash + set noshellslash + let s:me = resolve(expand(':p')) + set shellslash +else + let s:me = resolve(expand(':p')) +endif +let s:base_spec = { 'branch': '', 'frozen': 0 } +let s:TYPE = { +\ 'string': type(''), +\ 'list': type([]), +\ 'dict': type({}), +\ 'funcref': type(function('call')) +\ } +let s:loaded = get(s:, 'loaded', {}) +let s:triggers = get(s:, 'triggers', {}) + +function! s:is_powershell(shell) + return a:shell =~# 'powershell\(\.exe\)\?$' || a:shell =~# 'pwsh\(\.exe\)\?$' +endfunction + +function! s:isabsolute(dir) abort + return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') +endfunction + +function! s:git_dir(dir) abort + let gitdir = s:trim(a:dir) . '/.git' + if isdirectory(gitdir) + return gitdir + endif + if !filereadable(gitdir) + return '' + endif + let gitdir = matchstr(get(readfile(gitdir), 0, ''), '^gitdir: \zs.*') + if len(gitdir) && !s:isabsolute(gitdir) + let gitdir = a:dir . '/' . gitdir + endif + return isdirectory(gitdir) ? gitdir : '' +endfunction + +function! s:git_origin_url(dir) abort + let gitdir = s:git_dir(a:dir) + let config = gitdir . '/config' + if empty(gitdir) || !filereadable(config) + return '' + endif + return matchstr(join(readfile(config)), '\[remote "origin"\].\{-}url\s*=\s*\zs\S*\ze') +endfunction + +function! s:git_revision(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + + let line = get(readfile(head), 0, '') + let ref = matchstr(line, '^ref: \zs.*') + if empty(ref) + return line + endif + + if filereadable(gitdir . '/' . ref) + return get(readfile(gitdir . '/' . ref), 0, '') + endif + + if filereadable(gitdir . '/packed-refs') + for line in readfile(gitdir . '/packed-refs') + if line =~# ' ' . ref + return matchstr(line, '^[0-9a-f]*') + endif + endfor + endif + + return '' +endfunction + +function! s:git_local_branch(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + let branch = matchstr(get(readfile(head), 0, ''), '^ref: refs/heads/\zs.*') + return len(branch) ? branch : 'HEAD' +endfunction + +function! s:git_origin_branch(spec) + if len(a:spec.branch) + return a:spec.branch + endif + + " The file may not be present if this is a local repository + let gitdir = s:git_dir(a:spec.dir) + let origin_head = gitdir.'/refs/remotes/origin/HEAD' + if len(gitdir) && filereadable(origin_head) + return matchstr(get(readfile(origin_head), 0, ''), + \ '^ref: refs/remotes/origin/\zs.*') + endif + + " The command may not return the name of a branch in detached HEAD state + let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir)) + return v:shell_error ? '' : result[-1] +endfunction + +if s:is_win + function! s:plug_call(fn, ...) + let shellslash = &shellslash + try + set noshellslash + return call(a:fn, a:000) + finally + let &shellslash = shellslash + endtry + endfunction +else + function! s:plug_call(fn, ...) + return call(a:fn, a:000) + endfunction +endif + +function! s:plug_getcwd() + return s:plug_call('getcwd') +endfunction + +function! s:plug_fnamemodify(fname, mods) + return s:plug_call('fnamemodify', a:fname, a:mods) +endfunction + +function! s:plug_expand(fmt) + return s:plug_call('expand', a:fmt, 1) +endfunction + +function! s:plug_tempname() + return s:plug_call('tempname') +endfunction + +function! plug#begin(...) + if a:0 > 0 + let s:plug_home_org = a:1 + let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) + elseif exists('g:plug_home') + let home = s:path(g:plug_home) + elseif !empty(&rtp) + let home = s:path(split(&rtp, ',')[0]) . '/plugged' + else + return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') + endif + if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp + return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') + endif + + let g:plug_home = home + let g:plugs = {} + let g:plugs_order = [] + let s:triggers = {} + + call s:define_commands() + return 1 +endfunction + +function! s:define_commands() + command! -nargs=+ -bar Plug call plug#() + if !executable('git') + return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') + endif + if has('win32') + \ && &shellslash + \ && (&shell =~# 'cmd\(\.exe\)\?$' || s:is_powershell(&shell)) + return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') + endif + if !has('nvim') + \ && (has('win32') || has('win32unix')) + \ && !has('multi_byte') + return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') + endif + command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) + command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) + command! -nargs=0 -bar -bang PlugClean call s:clean(0) + command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif + command! -nargs=0 -bar PlugStatus call s:status() + command! -nargs=0 -bar PlugDiff call s:diff() + command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(0, ) +endfunction + +function! s:to_a(v) + return type(a:v) == s:TYPE.list ? a:v : [a:v] +endfunction + +function! s:to_s(v) + return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" +endfunction + +function! s:glob(from, pattern) + return s:lines(globpath(a:from, a:pattern)) +endfunction + +function! s:source(from, ...) + let found = 0 + for pattern in a:000 + for vim in s:glob(a:from, pattern) + execute 'source' s:esc(vim) + let found = 1 + endfor + endfor + return found +endfunction + +function! s:assoc(dict, key, val) + let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) +endfunction + +function! s:ask(message, ...) + call inputsave() + echohl WarningMsg + let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) + echohl None + call inputrestore() + echo "\r" + return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 +endfunction + +function! s:ask_no_interrupt(...) + try + return call('s:ask', a:000) + catch + return 0 + endtry +endfunction + +function! s:lazy(plug, opt) + return has_key(a:plug, a:opt) && + \ (empty(s:to_a(a:plug[a:opt])) || + \ !isdirectory(a:plug.dir) || + \ len(s:glob(s:rtp(a:plug), 'plugin')) || + \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) +endfunction + +function! plug#end() + if !exists('g:plugs') + return s:err('plug#end() called without calling plug#begin() first') + endif + + if exists('#PlugLOD') + augroup PlugLOD + autocmd! + augroup END + augroup! PlugLOD + endif + let lod = { 'ft': {}, 'map': {}, 'cmd': {} } + + if exists('g:did_load_filetypes') + filetype off + endif + for name in g:plugs_order + if !has_key(g:plugs, name) + continue + endif + let plug = g:plugs[name] + if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') + let s:loaded[name] = 1 + continue + endif + + if has_key(plug, 'on') + let s:triggers[name] = { 'map': [], 'cmd': [] } + for cmd in s:to_a(plug.on) + if cmd =~? '^.\+' + if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) + call s:assoc(lod.map, cmd, name) + endif + call add(s:triggers[name].map, cmd) + elseif cmd =~# '^[A-Z]' + let cmd = substitute(cmd, '!*$', '', '') + if exists(':'.cmd) != 2 + call s:assoc(lod.cmd, cmd, name) + endif + call add(s:triggers[name].cmd, cmd) + else + call s:err('Invalid `on` option: '.cmd. + \ '. Should start with an uppercase letter or ``.') + endif + endfor + endif + + if has_key(plug, 'for') + let types = s:to_a(plug.for) + if !empty(types) + augroup filetypedetect + call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') + augroup END + endif + for type in types + call s:assoc(lod.ft, type, name) + endfor + endif + endfor + + for [cmd, names] in items(lod.cmd) + execute printf( + \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "", , , , %s)', + \ cmd, string(cmd), string(names)) + endfor + + for [map, names] in items(lod.map) + for [mode, map_prefix, key_prefix] in + \ [['i', '', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] + execute printf( + \ '%snoremap %s %s:call lod_map(%s, %s, %s, "%s")', + \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) + endfor + endfor + + for [ft, names] in items(lod.ft) + augroup PlugLOD + execute printf('autocmd FileType %s call lod_ft(%s, %s)', + \ ft, string(ft), string(names)) + augroup END + endfor + + call s:reorg_rtp() + filetype plugin indent on + if has('vim_starting') + if has('syntax') && !exists('g:syntax_on') + syntax enable + end + else + call s:reload_plugins() + endif +endfunction + +function! s:loaded_names() + return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') +endfunction + +function! s:load_plugin(spec) + call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') +endfunction + +function! s:reload_plugins() + for name in s:loaded_names() + call s:load_plugin(g:plugs[name]) + endfor +endfunction + +function! s:trim(str) + return substitute(a:str, '[\/]\+$', '', '') +endfunction + +function! s:version_requirement(val, min) + for idx in range(0, len(a:min) - 1) + let v = get(a:val, idx, 0) + if v < a:min[idx] | return 0 + elseif v > a:min[idx] | return 1 + endif + endfor + return 1 +endfunction + +function! s:git_version_requirement(...) + if !exists('s:git_version') + let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') + endif + return s:version_requirement(s:git_version, a:000) +endfunction + +function! s:progress_opt(base) + return a:base && !s:is_win && + \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' +endfunction + +function! s:rtp(spec) + return s:path(a:spec.dir . get(a:spec, 'rtp', '')) +endfunction + +if s:is_win + function! s:path(path) + return s:trim(substitute(a:path, '/', '\', 'g')) + endfunction + + function! s:dirpath(path) + return s:path(a:path) . '\' + endfunction + + function! s:is_local_plug(repo) + return a:repo =~? '^[a-z]:\|^[%~]' + endfunction + + " Copied from fzf + function! s:wrap_cmds(cmds) + let cmds = [ + \ '@echo off', + \ 'setlocal enabledelayedexpansion'] + \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) + \ + ['endlocal'] + if has('iconv') + if !exists('s:codepage') + let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) + endif + return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) + endif + return map(cmds, 'v:val."\r"') + endfunction + + function! s:batchfile(cmd) + let batchfile = s:plug_tempname().'.bat' + call writefile(s:wrap_cmds(a:cmd), batchfile) + let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) + if s:is_powershell(&shell) + let cmd = '& ' . cmd + endif + return [batchfile, cmd] + endfunction +else + function! s:path(path) + return s:trim(a:path) + endfunction + + function! s:dirpath(path) + return substitute(a:path, '[/\\]*$', '/', '') + endfunction + + function! s:is_local_plug(repo) + return a:repo[0] =~ '[/$~]' + endfunction +endif + +function! s:err(msg) + echohl ErrorMsg + echom '[vim-plug] '.a:msg + echohl None +endfunction + +function! s:warn(cmd, msg) + echohl WarningMsg + execute a:cmd 'a:msg' + echohl None +endfunction + +function! s:esc(path) + return escape(a:path, ' ') +endfunction + +function! s:escrtp(path) + return escape(a:path, ' ,') +endfunction + +function! s:remove_rtp() + for name in s:loaded_names() + let rtp = s:rtp(g:plugs[name]) + execute 'set rtp-='.s:escrtp(rtp) + let after = globpath(rtp, 'after') + if isdirectory(after) + execute 'set rtp-='.s:escrtp(after) + endif + endfor +endfunction + +function! s:reorg_rtp() + if !empty(s:first_rtp) + execute 'set rtp-='.s:first_rtp + execute 'set rtp-='.s:last_rtp + endif + + " &rtp is modified from outside + if exists('s:prtp') && s:prtp !=# &rtp + call s:remove_rtp() + unlet! s:middle + endif + + let s:middle = get(s:, 'middle', &rtp) + let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') + let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') + let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') + \ . ','.s:middle.',' + \ . join(map(afters, 'escape(v:val, ",")'), ',') + let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') + let s:prtp = &rtp + + if !empty(s:first_rtp) + execute 'set rtp^='.s:first_rtp + execute 'set rtp+='.s:last_rtp + endif +endfunction + +function! s:doautocmd(...) + if exists('#'.join(a:000, '#')) + execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '' : '') join(a:000) + endif +endfunction + +function! s:dobufread(names) + for name in a:names + let path = s:rtp(g:plugs[name]) + for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] + if len(finddir(dir, path)) + if exists('#BufRead') + doautocmd BufRead + endif + return + endif + endfor + endfor +endfunction + +function! plug#load(...) + if a:0 == 0 + return s:err('Argument missing: plugin name(s) required') + endif + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 + let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') + if !empty(unknowns) + let s = len(unknowns) > 1 ? 's' : '' + return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) + end + let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') + if !empty(unloaded) + for name in unloaded + call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + endfor + call s:dobufread(unloaded) + return 1 + end + return 0 +endfunction + +function! s:remove_triggers(name) + if !has_key(s:triggers, a:name) + return + endif + for cmd in s:triggers[a:name].cmd + execute 'silent! delc' cmd + endfor + for map in s:triggers[a:name].map + execute 'silent! unmap' map + execute 'silent! iunmap' map + endfor + call remove(s:triggers, a:name) +endfunction + +function! s:lod(names, types, ...) + for name in a:names + call s:remove_triggers(name) + let s:loaded[name] = 1 + endfor + call s:reorg_rtp() + + for name in a:names + let rtp = s:rtp(g:plugs[name]) + for dir in a:types + call s:source(rtp, dir.'/**/*.vim') + endfor + if a:0 + if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) + execute 'runtime' a:1 + endif + call s:source(rtp, a:2) + endif + call s:doautocmd('User', name) + endfor +endfunction + +function! s:lod_ft(pat, names) + let syn = 'syntax/'.a:pat.'.vim' + call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) + execute 'autocmd! PlugLOD FileType' a:pat + call s:doautocmd('filetypeplugin', 'FileType') + call s:doautocmd('filetypeindent', 'FileType') +endfunction + +function! s:lod_cmd(cmd, bang, l1, l2, args, names) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) +endfunction + +function! s:lod_map(map, names, with_prefix, prefix) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + let extra = '' + while 1 + let c = getchar(0) + if c == 0 + break + endif + let extra .= nr2char(c) + endwhile + + if a:with_prefix + let prefix = v:count ? v:count : '' + let prefix .= '"'.v:register.a:prefix + if mode(1) == 'no' + if v:operator == 'c' + let prefix = "\" . prefix + endif + let prefix .= v:operator + endif + call feedkeys(prefix, 'n') + endif + call feedkeys(substitute(a:map, '^', "\", '') . extra) +endfunction + +function! plug#(repo, ...) + if a:0 > 1 + return s:err('Invalid number of arguments (1..2)') + endif + + try + let repo = s:trim(a:repo) + let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec + let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) + let spec = extend(s:infer_properties(name, repo), opts) + if !has_key(g:plugs, name) + call add(g:plugs_order, name) + endif + let g:plugs[name] = spec + let s:loaded[name] = get(s:loaded, name, 0) + catch + return s:err(repo . ' ' . v:exception) + endtry +endfunction + +function! s:parse_options(arg) + let opts = copy(s:base_spec) + let type = type(a:arg) + let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' + if type == s:TYPE.string + if empty(a:arg) + throw printf(opt_errfmt, 'tag', 'string') + endif + let opts.tag = a:arg + elseif type == s:TYPE.dict + for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] + if has_key(a:arg, opt) + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string') + endif + endfor + for opt in ['on', 'for'] + if has_key(a:arg, opt) + \ && type(a:arg[opt]) != s:TYPE.list + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string or list') + endif + endfor + if has_key(a:arg, 'do') + \ && type(a:arg.do) != s:TYPE.funcref + \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do)) + throw printf(opt_errfmt, 'do', 'string or funcref') + endif + call extend(opts, a:arg) + if has_key(opts, 'dir') + let opts.dir = s:dirpath(s:plug_expand(opts.dir)) + endif + else + throw 'Invalid argument type (expected: string or dictionary)' + endif + return opts +endfunction + +function! s:infer_properties(name, repo) + let repo = a:repo + if s:is_local_plug(repo) + return { 'dir': s:dirpath(s:plug_expand(repo)) } + else + if repo =~ ':' + let uri = repo + else + if repo !~ '/' + throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) + endif + let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') + let uri = printf(fmt, repo) + endif + return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } + endif +endfunction + +function! s:install(force, names) + call s:update_impl(0, a:force, a:names) +endfunction + +function! s:update(force, names) + call s:update_impl(1, a:force, a:names) +endfunction + +function! plug#helptags() + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + for spec in values(g:plugs) + let docd = join([s:rtp(spec), 'doc'], '/') + if isdirectory(docd) + silent! execute 'helptags' s:esc(docd) + endif + endfor + return 1 +endfunction + +function! s:syntax() + syntax clear + syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber + syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX + syn match plugNumber /[0-9]\+[0-9.]*/ contained + syn match plugBracket /[[\]]/ contained + syn match plugX /x/ contained + syn match plugDash /^-\{1}\ / + syn match plugPlus /^+/ + syn match plugStar /^*/ + syn match plugMessage /\(^- \)\@<=.*/ + syn match plugName /\(^- \)\@<=[^ ]*:/ + syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ + syn match plugTag /(tag: [^)]\+)/ + syn match plugInstall /\(^+ \)\@<=[^:]*/ + syn match plugUpdate /\(^* \)\@<=[^:]*/ + syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag + syn match plugEdge /^ \X\+$/ + syn match plugEdge /^ \X*/ contained nextgroup=plugSha + syn match plugSha /[0-9a-f]\{7,9}/ contained + syn match plugRelDate /([^)]*)$/ contained + syn match plugNotLoaded /(not loaded)$/ + syn match plugError /^x.*/ + syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ + syn match plugH2 /^.*:\n-\+$/ + syn match plugH2 /^-\{2,}/ + syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean + hi def link plug1 Title + hi def link plug2 Repeat + hi def link plugH2 Type + hi def link plugX Exception + hi def link plugBracket Structure + hi def link plugNumber Number + + hi def link plugDash Special + hi def link plugPlus Constant + hi def link plugStar Boolean + + hi def link plugMessage Function + hi def link plugName Label + hi def link plugInstall Function + hi def link plugUpdate Type + + hi def link plugError Error + hi def link plugDeleted Ignore + hi def link plugRelDate Comment + hi def link plugEdge PreProc + hi def link plugSha Identifier + hi def link plugTag Constant + + hi def link plugNotLoaded Comment +endfunction + +function! s:lpad(str, len) + return a:str . repeat(' ', a:len - len(a:str)) +endfunction + +function! s:lines(msg) + return split(a:msg, "[\r\n]") +endfunction + +function! s:lastline(msg) + return get(s:lines(a:msg), -1, '') +endfunction + +function! s:new_window() + execute get(g:, 'plug_window', 'vertical topleft new') +endfunction + +function! s:plug_window_exists() + let buflist = tabpagebuflist(s:plug_tab) + return !empty(buflist) && index(buflist, s:plug_buf) >= 0 +endfunction + +function! s:switch_in() + if !s:plug_window_exists() + return 0 + endif + + if winbufnr(0) != s:plug_buf + let s:pos = [tabpagenr(), winnr(), winsaveview()] + execute 'normal!' s:plug_tab.'gt' + let winnr = bufwinnr(s:plug_buf) + execute winnr.'wincmd w' + call add(s:pos, winsaveview()) + else + let s:pos = [winsaveview()] + endif + + setlocal modifiable + return 1 +endfunction + +function! s:switch_out(...) + call winrestview(s:pos[-1]) + setlocal nomodifiable + if a:0 > 0 + execute a:1 + endif + + if len(s:pos) > 1 + execute 'normal!' s:pos[0].'gt' + execute s:pos[1] 'wincmd w' + call winrestview(s:pos[2]) + endif +endfunction + +function! s:finish_bindings() + nnoremap R :call retry() + nnoremap D :PlugDiff + nnoremap S :PlugStatus + nnoremap U :call status_update() + xnoremap U :call status_update() + nnoremap ]] :silent! call section('') + nnoremap [[ :silent! call section('b') +endfunction + +function! s:prepare(...) + if empty(s:plug_getcwd()) + throw 'Invalid current working directory. Cannot proceed.' + endif + + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] + if exists(evar) + throw evar.' detected. Cannot proceed.' + endif + endfor + + call s:job_abort() + if s:switch_in() + if b:plug_preview == 1 + pc + endif + enew + else + call s:new_window() + endif + + nnoremap q :call close_pane() + if a:0 == 0 + call s:finish_bindings() + endif + let b:plug_preview = -1 + let s:plug_tab = tabpagenr() + let s:plug_buf = winbufnr(0) + call s:assign_name() + + for k in ['', 'L', 'o', 'X', 'd', 'dd'] + execute 'silent! unmap ' k + endfor + setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell + if exists('+colorcolumn') + setlocal colorcolumn= + endif + setf vim-plug + if exists('g:syntax_on') + call s:syntax() + endif +endfunction + +function! s:close_pane() + if b:plug_preview == 1 + pc + let b:plug_preview = -1 + else + bd + endif +endfunction + +function! s:assign_name() + " Assign buffer name + let prefix = '[Plugins]' + let name = prefix + let idx = 2 + while bufexists(name) + let name = printf('%s (%s)', prefix, idx) + let idx = idx + 1 + endwhile + silent! execute 'f' fnameescape(name) +endfunction + +function! s:chsh(swap) + let prev = [&shell, &shellcmdflag, &shellredir] + if !s:is_win + set shell=sh + endif + if a:swap + if s:is_powershell(&shell) + let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' + elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' + set shellredir=>%s\ 2>&1 + endif + endif + return prev +endfunction + +function! s:bang(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(a:0) + " FIXME: Escaping is incomplete. We could use shellescape with eval, + " but it won't work on Windows. + let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') + execute "normal! :execute g:_plug_bang\\" + finally + unlet g:_plug_bang + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + return v:shell_error ? 'Exit status: ' . v:shell_error : '' +endfunction + +function! s:regress_bar() + let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') + call s:progress_bar(2, bar, len(bar)) +endfunction + +function! s:is_updated(dir) + return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) +endfunction + +function! s:do(pull, force, todo) + for [name, spec] in items(a:todo) + if !isdirectory(spec.dir) + continue + endif + let installed = has_key(s:update.new, name) + let updated = installed ? 0 : + \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) + if a:force || installed || updated + execute 'cd' s:esc(spec.dir) + call append(3, '- Post-update hook for '. name .' ... ') + let error = '' + let type = type(spec.do) + if type == s:TYPE.string + if spec.do[0] == ':' + if !get(s:loaded, name, 0) + let s:loaded[name] = 1 + call s:reorg_rtp() + endif + call s:load_plugin(spec) + try + execute spec.do[1:] + catch + let error = v:exception + endtry + if !s:plug_window_exists() + cd - + throw 'Warning: vim-plug was terminated by the post-update hook of '.name + endif + else + let error = s:bang(spec.do) + endif + elseif type == s:TYPE.funcref + try + call s:load_plugin(spec) + let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') + call spec.do({ 'name': name, 'status': status, 'force': a:force }) + catch + let error = v:exception + endtry + else + let error = 'Invalid hook type' + endif + call s:switch_in() + call setline(4, empty(error) ? (getline(4) . 'OK') + \ : ('x' . getline(4)[1:] . error)) + if !empty(error) + call add(s:update.errors, name) + call s:regress_bar() + endif + cd - + endif + endfor +endfunction + +function! s:hash_match(a, b) + return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 +endfunction + +function! s:checkout(spec) + let sha = a:spec.commit + let output = s:git_revision(a:spec.dir) + if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) + let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : '' + let output = s:system( + \ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) + endif + return output +endfunction + +function! s:finish(pull) + let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) + if new_frozen + let s = new_frozen > 1 ? 's' : '' + call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) + endif + call append(3, '- Finishing ... ') | 4 + redraw + call plug#helptags() + call plug#end() + call setline(4, getline(4) . 'Done!') + redraw + let msgs = [] + if !empty(s:update.errors) + call add(msgs, "Press 'R' to retry.") + endif + if a:pull && len(s:update.new) < len(filter(getline(5, '$'), + \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) + call add(msgs, "Press 'D' to see the updated changes.") + endif + echo join(msgs, ' ') + call s:finish_bindings() +endfunction + +function! s:retry() + if empty(s:update.errors) + return + endif + echo + call s:update_impl(s:update.pull, s:update.force, + \ extend(copy(s:update.errors), [s:update.threads])) +endfunction + +function! s:is_managed(name) + return has_key(g:plugs[a:name], 'uri') +endfunction + +function! s:names(...) + return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) +endfunction + +function! s:check_ruby() + silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") + if !exists('g:plug_ruby') + redraw! + return s:warn('echom', 'Warning: Ruby interface is broken') + endif + let ruby_version = split(g:plug_ruby, '\.') + unlet g:plug_ruby + return s:version_requirement(ruby_version, [1, 8, 7]) +endfunction + +function! s:update_impl(pull, force, args) abort + let sync = index(a:args, '--sync') >= 0 || has('vim_starting') + let args = filter(copy(a:args), 'v:val != "--sync"') + let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? + \ remove(args, -1) : get(g:, 'plug_threads', 16) + + let managed = filter(copy(g:plugs), 's:is_managed(v:key)') + let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : + \ filter(managed, 'index(args, v:key) >= 0') + + if empty(todo) + return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) + endif + + if !s:is_win && s:git_version_requirement(2, 3) + let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' + let $GIT_TERMINAL_PROMPT = 0 + for plug in values(todo) + let plug.uri = substitute(plug.uri, + \ '^https://git::@github\.com', 'https://github.com', '') + endfor + endif + + if !isdirectory(g:plug_home) + try + call mkdir(g:plug_home, 'p') + catch + return s:err(printf('Invalid plug directory: %s. '. + \ 'Try to call plug#begin with a valid directory', g:plug_home)) + endtry + endif + + if has('nvim') && !exists('*jobwait') && threads > 1 + call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') + endif + + let use_job = s:nvim || s:vim8 + let python = (has('python') || has('python3')) && !use_job + let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() + + let s:update = { + \ 'start': reltime(), + \ 'all': todo, + \ 'todo': copy(todo), + \ 'errors': [], + \ 'pull': a:pull, + \ 'force': a:force, + \ 'new': {}, + \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, + \ 'bar': '', + \ 'fin': 0 + \ } + + call s:prepare(1) + call append(0, ['', '']) + normal! 2G + silent! redraw + + " Set remote name, overriding a possible user git config's clone.defaultRemoteName + let s:clone_opt = ['--origin', 'origin'] + if get(g:, 'plug_shallow', 1) + call extend(s:clone_opt, ['--depth', '1']) + if s:git_version_requirement(1, 7, 10) + call add(s:clone_opt, '--no-single-branch') + endif + endif + + if has('win32unix') || has('wsl') + call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) + endif + + let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' + + " Python version requirement (>= 2.7) + if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 + redir => pyv + silent python import platform; print platform.python_version() + redir END + let python = s:version_requirement( + \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) + endif + + if (python || ruby) && s:update.threads > 1 + try + let imd = &imd + if s:mac_gui + set noimd + endif + if ruby + call s:update_ruby() + else + call s:update_python() + endif + catch + let lines = getline(4, '$') + let printed = {} + silent! 4,$d _ + for line in lines + let name = s:extract_name(line, '.', '') + if empty(name) || !has_key(printed, name) + call append('$', line) + if !empty(name) + let printed[name] = 1 + if line[0] == 'x' && index(s:update.errors, name) < 0 + call add(s:update.errors, name) + end + endif + endif + endfor + finally + let &imd = imd + call s:update_finish() + endtry + else + call s:update_vim() + while use_job && sync + sleep 100m + if s:update.fin + break + endif + endwhile + endif +endfunction + +function! s:log4(name, msg) + call setline(4, printf('- %s (%s)', a:msg, a:name)) + redraw +endfunction + +function! s:update_finish() + if exists('s:git_terminal_prompt') + let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt + endif + if s:switch_in() + call append(3, '- Updating ...') | 4 + for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) + let [pos, _] = s:logpos(name) + if !pos + continue + endif + if has_key(spec, 'commit') + call s:log4(name, 'Checking out '.spec.commit) + let out = s:checkout(spec) + elseif has_key(spec, 'tag') + let tag = spec.tag + if tag =~ '\*' + let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) + if !v:shell_error && !empty(tags) + let tag = tags[0] + call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) + call append(3, '') + endif + endif + call s:log4(name, 'Checking out '.tag) + let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) + else + let branch = s:git_origin_branch(spec) + call s:log4(name, 'Merging origin/'.s:esc(branch)) + let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' + \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) + endif + if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && + \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) + call s:log4(name, 'Updating submodules. This may take a while.') + let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) + endif + let msg = s:format_message(v:shell_error ? 'x': '-', name, out) + if v:shell_error + call add(s:update.errors, name) + call s:regress_bar() + silent execute pos 'd _' + call append(4, msg) | 4 + elseif !empty(out) + call setline(pos, msg[0]) + endif + redraw + endfor + silent 4 d _ + try + call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) + catch + call s:warn('echom', v:exception) + call s:warn('echo', '') + return + endtry + call s:finish(s:update.pull) + call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') + call s:switch_out('normal! gg') + endif +endfunction + +function! s:job_abort() + if (!s:nvim && !s:vim8) || !exists('s:jobs') + return + endif + + for [name, j] in items(s:jobs) + if s:nvim + silent! call jobstop(j.jobid) + elseif s:vim8 + silent! call job_stop(j.jobid) + endif + if j.new + call s:rm_rf(g:plugs[name].dir) + endif + endfor + let s:jobs = {} +endfunction + +function! s:last_non_empty_line(lines) + let len = len(a:lines) + for idx in range(len) + let line = a:lines[len-idx-1] + if !empty(line) + return line + endif + endfor + return '' +endfunction + +function! s:job_out_cb(self, data) abort + let self = a:self + let data = remove(self.lines, -1) . a:data + let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') + call extend(self.lines, lines) + " To reduce the number of buffer updates + let self.tick = get(self, 'tick', -1) + 1 + if !self.running || self.tick % len(s:jobs) == 0 + let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') + let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) + call s:log(bullet, self.name, result) + endif +endfunction + +function! s:job_exit_cb(self, data) abort + let a:self.running = 0 + let a:self.error = a:data != 0 + call s:reap(a:self.name) + call s:tick() +endfunction + +function! s:job_cb(fn, job, ch, data) + if !s:plug_window_exists() " plug window closed + return s:job_abort() + endif + call call(a:fn, [a:job, a:data]) +endfunction + +function! s:nvim_cb(job_id, data, event) dict abort + return (a:event == 'stdout' || a:event == 'stderr') ? + \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : + \ s:job_cb('s:job_exit_cb', self, 0, a:data) +endfunction + +function! s:spawn(name, cmd, opts) + let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], + \ 'new': get(a:opts, 'new', 0) } + let s:jobs[a:name] = job + + if s:nvim + if has_key(a:opts, 'dir') + let job.cwd = a:opts.dir + endif + let argv = a:cmd + call extend(job, { + \ 'on_stdout': function('s:nvim_cb'), + \ 'on_stderr': function('s:nvim_cb'), + \ 'on_exit': function('s:nvim_cb'), + \ }) + let jid = s:plug_call('jobstart', argv, job) + if jid > 0 + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = [jid < 0 ? argv[0].' is not executable' : + \ 'Invalid arguments (or job table is full)'] + endif + elseif s:vim8 + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) + if has_key(a:opts, 'dir') + let cmd = s:with_cd(cmd, a:opts.dir, 0) + endif + let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] + let jid = job_start(s:is_win ? join(argv, ' ') : argv, { + \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), + \ 'err_mode': 'raw', + \ 'out_mode': 'raw' + \}) + if job_status(jid) == 'run' + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = ['Failed to start job'] + endif + else + let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) + let job.error = v:shell_error != 0 + let job.running = 0 + endif +endfunction + +function! s:reap(name) + let job = s:jobs[a:name] + if job.error + call add(s:update.errors, a:name) + elseif get(job, 'new', 0) + let s:update.new[a:name] = 1 + endif + let s:update.bar .= job.error ? 'x' : '=' + + let bullet = job.error ? 'x' : '-' + let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) + call s:log(bullet, a:name, empty(result) ? 'OK' : result) + call s:bar() + + call remove(s:jobs, a:name) +endfunction + +function! s:bar() + if s:switch_in() + let total = len(s:update.all) + call setline(1, (s:update.pull ? 'Updating' : 'Installing'). + \ ' plugins ('.len(s:update.bar).'/'.total.')') + call s:progress_bar(2, s:update.bar, total) + call s:switch_out() + endif +endfunction + +function! s:logpos(name) + let max = line('$') + for i in range(4, max > 4 ? max : 4) + if getline(i) =~# '^[-+x*] '.a:name.':' + for j in range(i + 1, max > 5 ? max : 5) + if getline(j) !~ '^ ' + return [i, j - 1] + endif + endfor + return [i, i] + endif + endfor + return [0, 0] +endfunction + +function! s:log(bullet, name, lines) + if s:switch_in() + let [b, e] = s:logpos(a:name) + if b > 0 + silent execute printf('%d,%d d _', b, e) + if b > winheight('.') + let b = 4 + endif + else + let b = 4 + endif + " FIXME For some reason, nomodifiable is set after :d in vim8 + setlocal modifiable + call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) + call s:switch_out() + endif +endfunction + +function! s:update_vim() + let s:jobs = {} + + call s:bar() + call s:tick() +endfunction + +function! s:tick() + let pull = s:update.pull + let prog = s:progress_opt(s:nvim || s:vim8) +while 1 " Without TCO, Vim stack is bound to explode + if empty(s:update.todo) + if empty(s:jobs) && !s:update.fin + call s:update_finish() + let s:update.fin = 1 + endif + return + endif + + let name = keys(s:update.todo)[0] + let spec = remove(s:update.todo, name) + let new = empty(globpath(spec.dir, '.git', 1)) + + call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') + redraw + + let has_tag = has_key(spec, 'tag') + if !new + let [error, _] = s:git_validate(spec, 0) + if empty(error) + if pull + let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch'] + if has_tag && !empty(globpath(spec.dir, '.git/shallow')) + call extend(cmd, ['--depth', '99999999']) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, cmd, { 'dir': spec.dir }) + else + let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } + endif + else + let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } + endif + else + let cmd = ['git', 'clone'] + if !has_tag + call extend(cmd, s:clone_opt) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) + endif + + if !s:jobs[name].running + call s:reap(name) + endif + if len(s:jobs) >= s:update.threads + break + endif +endwhile +endfunction + +function! s:update_python() +let py_exe = has('python') ? 'python' : 'python3' +execute py_exe "<< EOF" +import datetime +import functools +import os +try: + import queue +except ImportError: + import Queue as queue +import random +import re +import shutil +import signal +import subprocess +import tempfile +import threading as thr +import time +import traceback +import vim + +G_NVIM = vim.eval("has('nvim')") == '1' +G_PULL = vim.eval('s:update.pull') == '1' +G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 +G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) +G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) +G_PROGRESS = vim.eval('s:progress_opt(1)') +G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) +G_STOP = thr.Event() +G_IS_WIN = vim.eval('s:is_win') == '1' + +class PlugError(Exception): + def __init__(self, msg): + self.msg = msg +class CmdTimedOut(PlugError): + pass +class CmdFailed(PlugError): + pass +class InvalidURI(PlugError): + pass +class Action(object): + INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] + +class Buffer(object): + def __init__(self, lock, num_plugs, is_pull): + self.bar = '' + self.event = 'Updating' if is_pull else 'Installing' + self.lock = lock + self.maxy = int(vim.eval('winheight(".")')) + self.num_plugs = num_plugs + + def __where(self, name): + """ Find first line with name in current buffer. Return line num. """ + found, lnum = False, 0 + matcher = re.compile('^[-+x*] {0}:'.format(name)) + for line in vim.current.buffer: + if matcher.search(line) is not None: + found = True + break + lnum += 1 + + if not found: + lnum = -1 + return lnum + + def header(self): + curbuf = vim.current.buffer + curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) + + num_spaces = self.num_plugs - len(self.bar) + curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') + + with self.lock: + vim.command('normal! 2G') + vim.command('redraw') + + def write(self, action, name, lines): + first, rest = lines[0], lines[1:] + msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] + msg.extend([' ' + line for line in rest]) + + try: + if action == Action.ERROR: + self.bar += 'x' + vim.command("call add(s:update.errors, '{0}')".format(name)) + elif action == Action.DONE: + self.bar += '=' + + curbuf = vim.current.buffer + lnum = self.__where(name) + if lnum != -1: # Found matching line num + del curbuf[lnum] + if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): + lnum = 3 + else: + lnum = 3 + curbuf.append(msg, lnum) + + self.header() + except vim.error: + pass + +class Command(object): + CD = 'cd /d' if G_IS_WIN else 'cd' + + def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): + self.cmd = cmd + if cmd_dir: + self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) + self.timeout = timeout + self.callback = cb if cb else (lambda msg: None) + self.clean = clean if clean else (lambda: None) + self.proc = None + + @property + def alive(self): + """ Returns true only if command still running. """ + return self.proc and self.proc.poll() is None + + def execute(self, ntries=3): + """ Execute the command with ntries if CmdTimedOut. + Returns the output of the command if no Exception. + """ + attempt, finished, limit = 0, False, self.timeout + + while not finished: + try: + attempt += 1 + result = self.try_command() + finished = True + return result + except CmdTimedOut: + if attempt != ntries: + self.notify_retry() + self.timeout += limit + else: + raise + + def notify_retry(self): + """ Retry required for command, notify user. """ + for count in range(3, 0, -1): + if G_STOP.is_set(): + raise KeyboardInterrupt + msg = 'Timeout. Will retry in {0} second{1} ...'.format( + count, 's' if count != 1 else '') + self.callback([msg]) + time.sleep(1) + self.callback(['Retrying ...']) + + def try_command(self): + """ Execute a cmd & poll for callback. Returns list of output. + Raises CmdFailed -> return code for Popen isn't 0 + Raises CmdTimedOut -> command exceeded timeout without new output + """ + first_line = True + + try: + tfile = tempfile.NamedTemporaryFile(mode='w+b') + preexec_fn = not G_IS_WIN and os.setsid or None + self.proc = subprocess.Popen(self.cmd, stdout=tfile, + stderr=subprocess.STDOUT, + stdin=subprocess.PIPE, shell=True, + preexec_fn=preexec_fn) + thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) + thrd.start() + + thread_not_started = True + while thread_not_started: + try: + thrd.join(0.1) + thread_not_started = False + except RuntimeError: + pass + + while self.alive: + if G_STOP.is_set(): + raise KeyboardInterrupt + + if first_line or random.random() < G_LOG_PROB: + first_line = False + line = '' if G_IS_WIN else nonblock_read(tfile.name) + if line: + self.callback([line]) + + time_diff = time.time() - os.path.getmtime(tfile.name) + if time_diff > self.timeout: + raise CmdTimedOut(['Timeout!']) + + thrd.join(0.5) + + tfile.seek(0) + result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] + + if self.proc.returncode != 0: + raise CmdFailed([''] + result) + + return result + except: + self.terminate() + raise + + def terminate(self): + """ Terminate process and cleanup. """ + if self.alive: + if G_IS_WIN: + os.kill(self.proc.pid, signal.SIGINT) + else: + os.killpg(self.proc.pid, signal.SIGTERM) + self.clean() + +class Plugin(object): + def __init__(self, name, args, buf_q, lock): + self.name = name + self.args = args + self.buf_q = buf_q + self.lock = lock + self.tag = args.get('tag', 0) + + def manage(self): + try: + if os.path.exists(self.args['dir']): + self.update() + else: + self.install() + with self.lock: + thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) + except PlugError as exc: + self.write(Action.ERROR, self.name, exc.msg) + except KeyboardInterrupt: + G_STOP.set() + self.write(Action.ERROR, self.name, ['Interrupted!']) + except: + # Any exception except those above print stack trace + msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) + self.write(Action.ERROR, self.name, msg.split('\n')) + raise + + def install(self): + target = self.args['dir'] + if target[-1] == '\\': + target = target[0:-1] + + def clean(target): + def _clean(): + try: + shutil.rmtree(target) + except OSError: + pass + return _clean + + self.write(Action.INSTALL, self.name, ['Installing ...']) + callback = functools.partial(self.write, Action.INSTALL, self.name) + cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( + '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], + esc(target)) + com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + + def repo_uri(self): + cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' + command = Command(cmd, self.args['dir'], G_TIMEOUT,) + result = command.execute(G_RETRIES) + return result[-1] + + def update(self): + actual_uri = self.repo_uri() + expect_uri = self.args['uri'] + regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') + ma = regex.match(actual_uri) + mb = regex.match(expect_uri) + if ma is None or mb is None or ma.groups() != mb.groups(): + msg = ['', + 'Invalid URI: {0}'.format(actual_uri), + 'Expected {0}'.format(expect_uri), + 'PlugClean required.'] + raise InvalidURI(msg) + + if G_PULL: + self.write(Action.UPDATE, self.name, ['Updating ...']) + callback = functools.partial(self.write, Action.UPDATE, self.name) + fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' + cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) + com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + else: + self.write(Action.DONE, self.name, ['Already installed']) + + def write(self, action, name, msg): + self.buf_q.put((action, name, msg)) + +class PlugThread(thr.Thread): + def __init__(self, tname, args): + super(PlugThread, self).__init__() + self.tname = tname + self.args = args + + def run(self): + thr.current_thread().name = self.tname + buf_q, work_q, lock = self.args + + try: + while not G_STOP.is_set(): + name, args = work_q.get_nowait() + plug = Plugin(name, args, buf_q, lock) + plug.manage() + work_q.task_done() + except queue.Empty: + pass + +class RefreshThread(thr.Thread): + def __init__(self, lock): + super(RefreshThread, self).__init__() + self.lock = lock + self.running = True + + def run(self): + while self.running: + with self.lock: + thread_vim_command('noautocmd normal! a') + time.sleep(0.33) + + def stop(self): + self.running = False + +if G_NVIM: + def thread_vim_command(cmd): + vim.session.threadsafe_call(lambda: vim.command(cmd)) +else: + def thread_vim_command(cmd): + vim.command(cmd) + +def esc(name): + return '"' + name.replace('"', '\"') + '"' + +def nonblock_read(fname): + """ Read a file with nonblock flag. Return the last line. """ + fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) + buf = os.read(fread, 100000).decode('utf-8', 'replace') + os.close(fread) + + line = buf.rstrip('\r\n') + left = max(line.rfind('\r'), line.rfind('\n')) + if left != -1: + left += 1 + line = line[left:] + + return line + +def main(): + thr.current_thread().name = 'main' + nthreads = int(vim.eval('s:update.threads')) + plugs = vim.eval('s:update.todo') + mac_gui = vim.eval('s:mac_gui') == '1' + + lock = thr.Lock() + buf = Buffer(lock, len(plugs), G_PULL) + buf_q, work_q = queue.Queue(), queue.Queue() + for work in plugs.items(): + work_q.put(work) + + start_cnt = thr.active_count() + for num in range(nthreads): + tname = 'PlugT-{0:02}'.format(num) + thread = PlugThread(tname, (buf_q, work_q, lock)) + thread.start() + if mac_gui: + rthread = RefreshThread(lock) + rthread.start() + + while not buf_q.empty() or thr.active_count() != start_cnt: + try: + action, name, msg = buf_q.get(True, 0.25) + buf.write(action, name, ['OK'] if not msg else msg) + buf_q.task_done() + except queue.Empty: + pass + except KeyboardInterrupt: + G_STOP.set() + + if mac_gui: + rthread.stop() + rthread.join() + +main() +EOF +endfunction + +function! s:update_ruby() + ruby << EOF + module PlugStream + SEP = ["\r", "\n", nil] + def get_line + buffer = '' + loop do + char = readchar rescue return + if SEP.include? char.chr + buffer << $/ + break + else + buffer << char + end + end + buffer + end + end unless defined?(PlugStream) + + def esc arg + %["#{arg.gsub('"', '\"')}"] + end + + def killall pid + pids = [pid] + if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM + pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } + else + unless `which pgrep 2> /dev/null`.empty? + children = pids + until children.empty? + children = children.map { |pid| + `pgrep -P #{pid}`.lines.map { |l| l.chomp } + }.flatten + pids += children + end + end + pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } + end + end + + def compare_git_uri a, b + regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} + regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) + end + + require 'thread' + require 'fileutils' + require 'timeout' + running = true + iswin = VIM::evaluate('s:is_win').to_i == 1 + pull = VIM::evaluate('s:update.pull').to_i == 1 + base = VIM::evaluate('g:plug_home') + all = VIM::evaluate('s:update.todo') + limit = VIM::evaluate('get(g:, "plug_timeout", 60)') + tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 + nthr = VIM::evaluate('s:update.threads').to_i + maxy = VIM::evaluate('winheight(".")').to_i + vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ + cd = iswin ? 'cd /d' : 'cd' + tot = VIM::evaluate('len(s:update.todo)') || 0 + bar = '' + skip = 'Already installed' + mtx = Mutex.new + take1 = proc { mtx.synchronize { running && all.shift } } + logh = proc { + cnt = bar.length + $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" + $curbuf[2] = '[' + bar.ljust(tot) + ']' + VIM::command('normal! 2G') + VIM::command('redraw') + } + where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } + log = proc { |name, result, type| + mtx.synchronize do + ing = ![true, false].include?(type) + bar += type ? '=' : 'x' unless ing + b = case type + when :install then '+' when :update then '*' + when true, nil then '-' else + VIM::command("call add(s:update.errors, '#{name}')") + 'x' + end + result = + if type || type.nil? + ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] + elsif result =~ /^Interrupted|^Timeout/ + ["#{b} #{name}: #{result}"] + else + ["#{b} #{name}"] + result.lines.map { |l| " " << l } + end + if lnum = where.call(name) + $curbuf.delete lnum + lnum = 4 if ing && lnum > maxy + end + result.each_with_index do |line, offset| + $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) + end + logh.call + end + } + bt = proc { |cmd, name, type, cleanup| + tried = timeout = 0 + begin + tried += 1 + timeout += limit + fd = nil + data = '' + if iswin + Timeout::timeout(timeout) do + tmp = VIM::evaluate('tempname()') + system("(#{cmd}) > #{tmp}") + data = File.read(tmp).chomp + File.unlink tmp rescue nil + end + else + fd = IO.popen(cmd).extend(PlugStream) + first_line = true + log_prob = 1.0 / nthr + while line = Timeout::timeout(timeout) { fd.get_line } + data << line + log.call name, line.chomp, type if name && (first_line || rand < log_prob) + first_line = false + end + fd.close + end + [$? == 0, data.chomp] + rescue Timeout::Error, Interrupt => e + if fd && !fd.closed? + killall fd.pid + fd.close + end + cleanup.call if cleanup + if e.is_a?(Timeout::Error) && tried < tries + 3.downto(1) do |countdown| + s = countdown > 1 ? 's' : '' + log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type + sleep 1 + end + log.call name, 'Retrying ...', type + retry + end + [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] + end + } + main = Thread.current + threads = [] + watcher = Thread.new { + if vim7 + while VIM::evaluate('getchar(1)') + sleep 0.1 + end + else + require 'io/console' # >= Ruby 1.9 + nil until IO.console.getch == 3.chr + end + mtx.synchronize do + running = false + threads.each { |t| t.raise Interrupt } unless vim7 + end + threads.each { |t| t.join rescue nil } + main.kill + } + refresh = Thread.new { + while true + mtx.synchronize do + break unless running + VIM::command('noautocmd normal! a') + end + sleep 0.2 + end + } if VIM::evaluate('s:mac_gui') == 1 + + clone_opt = VIM::evaluate('s:clone_opt').join(' ') + progress = VIM::evaluate('s:progress_opt(1)') + nthr.times do + mtx.synchronize do + threads << Thread.new { + while pair = take1.call + name = pair.first + dir, uri, tag = pair.last.values_at *%w[dir uri tag] + exists = File.directory? dir + ok, result = + if exists + chdir = "#{cd} #{iswin ? dir : esc(dir)}" + ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil + current_uri = data.lines.to_a.last + if !ret + if data =~ /^Interrupted|^Timeout/ + [false, data] + else + [false, [data.chomp, "PlugClean required."].join($/)] + end + elsif !compare_git_uri(current_uri, uri) + [false, ["Invalid URI: #{current_uri}", + "Expected: #{uri}", + "PlugClean required."].join($/)] + else + if pull + log.call name, 'Updating ...', :update + fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' + bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil + else + [true, skip] + end + end + else + d = esc dir.sub(%r{[\\/]+$}, '') + log.call name, 'Installing ...', :install + bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { + FileUtils.rm_rf dir + } + end + mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok + log.call name, result, ok + end + } if running + end + end + threads.each { |t| t.join rescue nil } + logh.call + refresh.kill if refresh + watcher.kill +EOF +endfunction + +function! s:shellesc_cmd(arg, script) + let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') + return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') +endfunction + +function! s:shellesc_ps1(arg) + return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" +endfunction + +function! s:shellesc_sh(arg) + return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" +endfunction + +" Escape the shell argument based on the shell. +" Vim and Neovim's shellescape() are insufficient. +" 1. shellslash determines whether to use single/double quotes. +" Double-quote escaping is fragile for cmd.exe. +" 2. It does not work for powershell. +" 3. It does not work for *sh shells if the command is executed +" via cmd.exe (ie. cmd.exe /c sh -c command command_args) +" 4. It does not support batchfile syntax. +" +" Accepts an optional dictionary with the following keys: +" - shell: same as Vim/Neovim 'shell' option. +" If unset, fallback to 'cmd.exe' on Windows or 'sh'. +" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. +function! plug#shellescape(arg, ...) + if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' + return a:arg + endif + let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} + let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') + let script = get(opts, 'script', 1) + if shell =~# 'cmd\(\.exe\)\?$' + return s:shellesc_cmd(a:arg, script) + elseif s:is_powershell(shell) + return s:shellesc_ps1(a:arg) + endif + return s:shellesc_sh(a:arg) +endfunction + +function! s:glob_dir(path) + return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') +endfunction + +function! s:progress_bar(line, bar, total) + call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') +endfunction + +function! s:compare_git_uri(a, b) + " See `git help clone' + " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] + " [git@] github.com[:port] : junegunn/vim-plug [.git] + " file:// / junegunn/vim-plug [/] + " / junegunn/vim-plug [/] + let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' + let ma = matchlist(a:a, pat) + let mb = matchlist(a:b, pat) + return ma[1:2] ==# mb[1:2] +endfunction + +function! s:format_message(bullet, name, message) + if a:bullet != 'x' + return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] + else + let lines = map(s:lines(a:message), '" ".v:val') + return extend([printf('x %s:', a:name)], lines) + endif +endfunction + +function! s:with_cd(cmd, dir, ...) + let script = a:0 > 0 ? a:1 : 1 + return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) +endfunction + +function! s:system(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + if type(a:cmd) == s:TYPE.list + " Neovim's system() supports list argument to bypass the shell + " but it cannot set the working directory for the command. + " Assume that the command does not rely on the shell. + if has('nvim') && a:0 == 0 + return system(a:cmd) + endif + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) + if s:is_powershell(&shell) + let cmd = '& ' . cmd + endif + else + let cmd = a:cmd + endif + if a:0 > 0 + let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) + endif + if s:is_win && type(a:cmd) != s:TYPE.list + let [batchfile, cmd] = s:batchfile(cmd) + endif + return system(cmd) + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry +endfunction + +function! s:system_chomp(...) + let ret = call('s:system', a:000) + return v:shell_error ? '' : substitute(ret, '\n$', '', '') +endfunction + +function! s:git_validate(spec, check_branch) + let err = '' + if isdirectory(a:spec.dir) + let result = [s:git_local_branch(a:spec.dir), s:git_origin_url(a:spec.dir)] + let remote = result[-1] + if empty(remote) + let err = join([remote, 'PlugClean required.'], "\n") + elseif !s:compare_git_uri(remote, a:spec.uri) + let err = join(['Invalid URI: '.remote, + \ 'Expected: '.a:spec.uri, + \ 'PlugClean required.'], "\n") + elseif a:check_branch && has_key(a:spec, 'commit') + let sha = s:git_revision(a:spec.dir) + if empty(sha) + let err = join(add(result, 'PlugClean required.'), "\n") + elseif !s:hash_match(sha, a:spec.commit) + let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', + \ a:spec.commit[:6], sha[:6]), + \ 'PlugUpdate required.'], "\n") + endif + elseif a:check_branch + let current_branch = result[0] + " Check tag + let origin_branch = s:git_origin_branch(a:spec) + if has_key(a:spec, 'tag') + let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) + if a:spec.tag !=# tag && a:spec.tag !~ '\*' + let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', + \ (empty(tag) ? 'N/A' : tag), a:spec.tag) + endif + " Check branch + elseif origin_branch !=# current_branch + let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', + \ current_branch, origin_branch) + endif + if empty(err) + let [ahead, behind] = split(s:lastline(s:system([ + \ 'git', 'rev-list', '--count', '--left-right', + \ printf('HEAD...origin/%s', origin_branch) + \ ], a:spec.dir)), '\t') + if !v:shell_error && ahead + if behind + " Only mention PlugClean if diverged, otherwise it's likely to be + " pushable (and probably not that messed up). + let err = printf( + \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" + \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind) + else + let err = printf("Ahead of origin/%s by %d commit(s).\n" + \ .'Cannot update until local changes are pushed.', + \ origin_branch, ahead) + endif + endif + endif + endif + else + let err = 'Not found' + endif + return [err, err =~# 'PlugClean'] +endfunction + +function! s:rm_rf(dir) + if isdirectory(a:dir) + return s:system(s:is_win + \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) + \ : ['rm', '-rf', a:dir]) + endif +endfunction + +function! s:clean(force) + call s:prepare() + call append(0, 'Searching for invalid plugins in '.g:plug_home) + call append(1, '') + + " List of valid directories + let dirs = [] + let errs = {} + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + if !s:is_managed(name) + call add(dirs, spec.dir) + else + let [err, clean] = s:git_validate(spec, 1) + if clean + let errs[spec.dir] = s:lines(err)[0] + else + call add(dirs, spec.dir) + endif + endif + let cnt += 1 + call s:progress_bar(2, repeat('=', cnt), total) + normal! 2G + redraw + endfor + + let allowed = {} + for dir in dirs + let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 + let allowed[dir] = 1 + for child in s:glob_dir(dir) + let allowed[child] = 1 + endfor + endfor + + let todo = [] + let found = sort(s:glob_dir(g:plug_home)) + while !empty(found) + let f = remove(found, 0) + if !has_key(allowed, f) && isdirectory(f) + call add(todo, f) + call append(line('$'), '- ' . f) + if has_key(errs, f) + call append(line('$'), ' ' . errs[f]) + endif + let found = filter(found, 'stridx(v:val, f) != 0') + end + endwhile + + 4 + redraw + if empty(todo) + call append(line('$'), 'Already clean.') + else + let s:clean_count = 0 + call append(3, ['Directories to delete:', '']) + redraw! + if a:force || s:ask_no_interrupt('Delete all directories?') + call s:delete([6, line('$')], 1) + else + call setline(4, 'Cancelled.') + nnoremap d :set opfunc=delete_opg@ + nmap dd d_ + xnoremap d :call delete_op(visualmode(), 1) + echo 'Delete the lines (d{motion}) to delete the corresponding directories' + endif + endif + 4 + setlocal nomodifiable +endfunction + +function! s:delete_op(type, ...) + call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) +endfunction + +function! s:delete(range, force) + let [l1, l2] = a:range + let force = a:force + let err_count = 0 + while l1 <= l2 + let line = getline(l1) + if line =~ '^- ' && isdirectory(line[2:]) + execute l1 + redraw! + let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) + let force = force || answer > 1 + if answer + let err = s:rm_rf(line[2:]) + setlocal modifiable + if empty(err) + call setline(l1, '~'.line[1:]) + let s:clean_count += 1 + else + delete _ + call append(l1 - 1, s:format_message('x', line[1:], err)) + let l2 += len(s:lines(err)) + let err_count += 1 + endif + let msg = printf('Removed %d directories.', s:clean_count) + if err_count > 0 + let msg .= printf(' Failed to remove %d directories.', err_count) + endif + call setline(4, msg) + setlocal nomodifiable + endif + endif + let l1 += 1 + endwhile +endfunction + +function! s:upgrade() + echo 'Downloading the latest version of vim-plug' + redraw + let tmp = s:plug_tempname() + let new = tmp . '/plug.vim' + + try + let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) + if v:shell_error + return s:err('Error upgrading vim-plug: '. out) + endif + + if readfile(s:me) ==# readfile(new) + echo 'vim-plug is already up-to-date' + return 0 + else + call rename(s:me, s:me . '.old') + call rename(new, s:me) + unlet g:loaded_plug + echo 'vim-plug has been upgraded' + return 1 + endif + finally + silent! call s:rm_rf(tmp) + endtry +endfunction + +function! s:upgrade_specs() + for spec in values(g:plugs) + let spec.frozen = get(spec, 'frozen', 0) + endfor +endfunction + +function! s:status() + call s:prepare() + call append(0, 'Checking plugins') + call append(1, '') + + let ecnt = 0 + let unloaded = 0 + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + let is_dir = isdirectory(spec.dir) + if has_key(spec, 'uri') + if is_dir + let [err, _] = s:git_validate(spec, 1) + let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] + else + let [valid, msg] = [0, 'Not found. Try PlugInstall.'] + endif + else + if is_dir + let [valid, msg] = [1, 'OK'] + else + let [valid, msg] = [0, 'Not found.'] + endif + endif + let cnt += 1 + let ecnt += !valid + " `s:loaded` entry can be missing if PlugUpgraded + if is_dir && get(s:loaded, name, -1) == 0 + let unloaded = 1 + let msg .= ' (not loaded)' + endif + call s:progress_bar(2, repeat('=', cnt), total) + call append(3, s:format_message(valid ? '-' : 'x', name, msg)) + normal! 2G + redraw + endfor + call setline(1, 'Finished. '.ecnt.' error(s).') + normal! gg + setlocal nomodifiable + if unloaded + echo "Press 'L' on each line to load plugin, or 'U' to update" + nnoremap L :call status_load(line('.')) + xnoremap L :call status_load(line('.')) + end +endfunction + +function! s:extract_name(str, prefix, suffix) + return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') +endfunction + +function! s:status_load(lnum) + let line = getline(a:lnum) + let name = s:extract_name(line, '-', '(not loaded)') + if !empty(name) + call plug#load(name) + setlocal modifiable + call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) + setlocal nomodifiable + endif +endfunction + +function! s:status_update() range + let lines = getline(a:firstline, a:lastline) + let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') + if !empty(names) + echo + execute 'PlugUpdate' join(names) + endif +endfunction + +function! s:is_preview_window_open() + silent! wincmd P + if &previewwindow + wincmd p + return 1 + endif +endfunction + +function! s:find_name(lnum) + for lnum in reverse(range(1, a:lnum)) + let line = getline(lnum) + if empty(line) + return '' + endif + let name = s:extract_name(line, '-', '') + if !empty(name) + return name + endif + endfor + return '' +endfunction + +function! s:preview_commit() + if b:plug_preview < 0 + let b:plug_preview = !s:is_preview_window_open() + endif + + let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') + if empty(sha) + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) + return + endif + + if exists('g:plug_pwindow') && !s:is_preview_window_open() + execute g:plug_pwindow + execute 'e' sha + else + execute 'pedit' sha + wincmd P + endif + setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + execute 'silent %!' cmd + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + setlocal nomodifiable + nnoremap q :q + wincmd p +endfunction + +function! s:section(flags) + call search('\(^[x-] \)\@<=[^:]\+:', a:flags) +endfunction + +function! s:format_git_log(line) + let indent = ' ' + let tokens = split(a:line, nr2char(1)) + if len(tokens) != 5 + return indent.substitute(a:line, '\s*$', '', '') + endif + let [graph, sha, refs, subject, date] = tokens + let tag = matchstr(refs, 'tag: [^,)]\+') + let tag = empty(tag) ? ' ' : ' ('.tag.') ' + return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) +endfunction + +function! s:append_ul(lnum, text) + call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) +endfunction + +function! s:diff() + call s:prepare() + call append(0, ['Collecting changes ...', '']) + let cnts = [0, 0] + let bar = '' + let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') + call s:progress_bar(2, bar, len(total)) + for origin in [1, 0] + let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) + if empty(plugs) + continue + endif + call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') + for [k, v] in plugs + let branch = s:git_origin_branch(v) + if len(branch) + let range = origin ? '..origin/'.branch : 'HEAD@{1}..' + let cmd = ['git', 'log', '--graph', '--color=never'] + if s:git_version_requirement(2, 10, 0) + call add(cmd, '--no-show-signature') + endif + call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) + if has_key(v, 'rtp') + call extend(cmd, ['--', v.rtp]) + endif + let diff = s:system_chomp(cmd, v.dir) + if !empty(diff) + let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' + call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) + let cnts[origin] += 1 + endif + endif + let bar .= '=' + call s:progress_bar(2, bar, len(total)) + normal! 2G + redraw + endfor + if !cnts[origin] + call append(5, ['', 'N/A']) + endif + endfor + call setline(1, printf('%d plugin(s) updated.', cnts[0]) + \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) + + if cnts[0] || cnts[1] + nnoremap (plug-preview) :silent! call preview_commit() + if empty(maparg("\", 'n')) + nmap (plug-preview) + endif + if empty(maparg('o', 'n')) + nmap o (plug-preview) + endif + endif + if cnts[0] + nnoremap X :call revert() + echo "Press 'X' on each block to revert the update" + endif + normal! gg + setlocal nomodifiable +endfunction + +function! s:revert() + if search('^Pending updates', 'bnW') + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || + \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' + return + endif + + call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) + setlocal modifiable + normal! "_dap + setlocal nomodifiable + echo 'Reverted' +endfunction + +function! s:snapshot(force, ...) abort + call s:prepare() + setf vim + call append(0, ['" Generated by vim-plug', + \ '" '.strftime("%c"), + \ '" :source this file in vim to restore the snapshot', + \ '" or execute: vim -S snapshot.vim', + \ '', '', 'PlugUpdate!']) + 1 + let anchor = line('$') - 3 + let names = sort(keys(filter(copy(g:plugs), + \'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)'))) + for name in reverse(names) + let sha = s:git_revision(g:plugs[name].dir) + if !empty(sha) + call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) + redraw + endif + endfor + + if a:0 > 0 + let fn = s:plug_expand(a:1) + if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) + return + endif + call writefile(getline(1, '$'), fn) + echo 'Saved as '.a:1 + silent execute 'e' s:esc(fn) + setf vim + endif +endfunction + +function! s:split_rtp() + return split(&rtp, '\\\@ + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + diff --git a/vim/.config/vim/plugged/YCM-Generator/README.md b/vim/.config/vim/plugged/YCM-Generator/README.md new file mode 100644 index 0000000..df93026 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/README.md @@ -0,0 +1,72 @@ +# YCM-Generator +This is a script which generates a list of compiler flags from a project with an arbitrary build system. It can be used to: + +* generate a ```.ycm_extra_conf.py``` file for use with [YouCompleteMe](https://github.com/Valloric/YouCompleteMe) +* generate a ```.color_coded``` file for use with [color_coded](https://github.com/jeaye/color_coded) + +It works by building the project with a fake toolchain, which simply and filters compiler flags to be stored in the resulting file. + +It is reasonably fast, taking ~10 seconds to generate a configuration file for the Linux kernel. + +## Status +This plugin is in maintenance mode. I am happy to merge PRs and triage bug reports, but am not actively working on it. + +## Installation +Add ```NeoBundle 'rdnetto/YCM-Generator'``` to your vimrc (or the equivalent for your plugin manager). + +For [vim-plug](https://github.com/junegunn/vim-plug) users, add ```Plug 'rdnetto/YCM-Generator', { 'branch': 'stable'}``` to your vimrc. + +Alternatively, Arch Linux users can install YCM-Generator using the (unofficial) [AUR package](https://aur4.archlinux.org/packages/ycm-generator-git/). + +## Usage +Run ```./config_gen.py PROJECT_DIRECTORY```, where ```PROJECT_DIRECTORY``` is the root directory of your project's build system (i.e. the one containing the root Makefile, etc.) + +You can also invoke it from within Vim using the ```:YcmGenerateConfig``` or ```:CCGenerateConfig``` commands to generate a config file for the current directory. These commands accept the same arguments as ```./config_gen.py```, but do not require the project directory to be specified (it defaults to the current working directory). + +## Requirements and Limitations +* Requirements: + + Python 2 + + Clang + +* Supported build systems: + + make + + cmake + + qmake + + autotools + +Your build system should support specifying the compiler through the ```CC```/```CXX``` environment variables, or not use an absolute path to the compiler. + +Some flags present in the resulting configuration file may be mutually exclusive with each other - reading the generated file prior to use is recommended. + +The script assumes that executables with the names `clang` and `clang++` exist in your `PATH`. This has been known to cause issues under Ubuntu, where the C++ compiler may be called `clang++-3.6` (see #50). + +## Documentation & Support +* run ```./config_gen.py --help``` to see the complete list of supported options. +* if you receive the error message ```ERROR: No commands were logged to the build logs```, try using the ```--verbose``` flag to see any error messages + + some build systems require certain environment variables to be set. Note that these will *not* be used by YCM-Generator by default, unless `--preserve-environment` is used + + if you open an issue regarding this error message, please include the output when running with ```--verbose``` and a link to the project repo (if possible) + +## Development +Patches are welcome. Please submit pull requests against the ```develop``` branch. + +### Windows support +The script is currently supported under Unices (Linux, NixOS[1], BSD, OS X) only. +Implementing Windows support consists of porting the contents of ```fake-toolchain/Unix```. +If you are interested in implementing/testing this, please open a pull request. + +[1] May require `--preserve-environment` - see [#19](https://github.com/rdnetto/YCM-Generator/issues/19) + +### Test Cases +The following projects are used for testing: + +| Project | Build system | Notes | +| ------------------------------------------------------------------------- | ----------------- | ------ | +| [Linux kernel](https://git.kernel.org) | Kbuild (Make) | | +| [Vim-qt](https://bitbucket.org/equalsraf/vim-qt.git) | Autotools | | +| [Clementine](https://github.com/clementine-player/Clementine.git) | Cmake | | +| [ExtPlane](https://github.com/vranki/ExtPlane.git) | Qmake | Should be tested with both versions of Qt. | +| [OpenFOAM](https://github.com/OpenFOAM/OpenFOAM-3.0.x.git) | wmake | | + +## License +YCM-Generator is published under the GNU GPLv3. + diff --git a/vim/.config/vim/plugged/YCM-Generator/config_gen.py b/vim/.config/vim/plugged/YCM-Generator/config_gen.py new file mode 100755 index 0000000..6a4a108 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/config_gen.py @@ -0,0 +1,502 @@ +#!/usr/bin/env python2 + +import sys +import os +import os.path +import re +import argparse +import datetime +import multiprocessing +import shlex +import shutil +import tempfile +import time +import subprocess +import glob + + +# Default flags for make +default_make_flags = ["-i", "-j" + str(multiprocessing.cpu_count())] + +# Set YCM-Generator directory +# Always obtain the real path to the directory where 'config_gen.py' lives as, +# in some cases, it will be a symlink placed in '/usr/bin' (as is the case +# with the Arch Linux AUR package) and it won't +# be able to find the plugin directory. +ycm_generator_dir = os.path.dirname(os.path.realpath(__file__)) + + +def main(): + # parse command-line args + parser = argparse.ArgumentParser(description="Automatically generates config files for YouCompleteMe") + parser.add_argument("-v", "--verbose", action="store_true", help="Show output from build process") + parser.add_argument("-f", "--force", action="store_true", help="Overwrite the file if it exists.") + parser.add_argument("-m", "--make", default="make", help="Use the specified executable for make.") + parser.add_argument("-b", "--build-system", choices=["cmake", "autotools", "qmake", "make"], help="Force use of the specified build system rather than trying to autodetect.") + parser.add_argument("-c", "--compiler", help="Use the specified executable for clang. It should be the same version as the libclang used by YCM. The executable for clang++ will be inferred from this.") + parser.add_argument("-C", "--configure_opts", default="", help="Additional flags to pass to configure/cmake/etc. e.g. --configure_opts=\"--enable-FEATURE\"") + parser.add_argument("-F", "--format", choices=["ycm", "cc"], default="ycm", help="Format of output file (YouCompleteMe or color_coded). Default: ycm") + parser.add_argument("-M", "--make-flags", help="Flags to pass to make when fake-building. Default: -M=\"{}\"".format(" ".join(default_make_flags))) + parser.add_argument("-o", "--output", help="Save the config file as OUTPUT. Default: .ycm_extra_conf.py, or .color_coded if --format=cc.") + parser.add_argument("-x", "--language", choices=["c", "c++"], help="Only output flags for the given language. This defaults to whichever language has its compiler invoked the most.") + parser.add_argument("--out-of-tree", action="store_true", help="Build autotools projects out-of-tree. This is a no-op for other project types.") + parser.add_argument("--qt-version", choices=["4", "5"], default="5", help="Use the given Qt version for qmake. (Default: 5)") + parser.add_argument("-e", "--preserve-environment", action="store_true", help="Pass environment variables to build processes.") + parser.add_argument("PROJECT_DIR", help="The root directory of the project.") + args = vars(parser.parse_args()) + project_dir = os.path.abspath(args["PROJECT_DIR"]) + + # verify that project_dir exists + if(not os.path.exists(project_dir)): + print("ERROR: '{}' does not exist".format(project_dir)) + return 1 + + # verify the clang is installed, and infer the correct name for both the C and C++ compilers + try: + cc = args["compiler"] or "clang" + args["cc"] = subprocess.check_output(["which", cc]).strip() + except subprocess.CalledProcessError: + print("ERROR: Could not find clang at '{}'. Please make sure it is installed and is either in your path, or specified with --compiler.".format(cc)) + return 1 + + try: + h, t = os.path.split(args["compiler"] or "clang") + cxx = os.path.join(h, t.replace("clang", "clang++")) + args["cxx"] = subprocess.check_output(["which", cxx]).strip() + except subprocess.CalledProcessError: + print("ERROR: Could not find clang++ at '{}'. Please make sure it is installed and specified appropriately.".format(cxx)) + return 1 + + # sanity check - remove this after we add Windows support + if(sys.platform.startswith("win32")): + print("ERROR: Windows is not supported") + + # prompt user to overwrite existing file (if necessary) + config_file = { + None: args["output"], + "cc": os.path.join(project_dir, ".color_coded"), + "ycm": os.path.join(project_dir, ".ycm_extra_conf.py"), + }[args["format"] if args["output"] is None else None] + + if(os.path.exists(config_file) and not args["force"]): + print("'{}' already exists. Overwrite? [y/N] ".format(config_file)), + response = sys.stdin.readline().strip().lower() + + if(response != "y" and response != "yes"): + return 1 + + # command-line args to pass to fake_build() using kwargs + args["make_cmd"] = args.pop("make") + args["configure_opts"] = shlex.split(args["configure_opts"]) + args["make_flags"] = default_make_flags if args["make_flags"] is None else shlex.split(args["make_flags"]) + force_lang = args.pop("language") + output_format = args.pop("format") + del args["compiler"] + del args["force"] + del args["output"] + del args["PROJECT_DIR"] + + generate_conf = { + "ycm": generate_ycm_conf, + "cc": generate_cc_conf, + }[output_format] + + # temporary files to hold build logs + with tempfile.NamedTemporaryFile(mode="rw") as c_build_log: + with tempfile.NamedTemporaryFile(mode="rw") as cxx_build_log: + # perform the actual compilation of flags + fake_build(project_dir, c_build_log.name, cxx_build_log.name, **args) + (c_count, c_skip, c_flags) = parse_flags(c_build_log) + (cxx_count, cxx_skip, cxx_flags) = parse_flags(cxx_build_log) + + print("Collected {} relevant entries for C compilation ({} discarded).".format(c_count, c_skip)) + print("Collected {} relevant entries for C++ compilation ({} discarded).".format(cxx_count, cxx_skip)) + + # select the language to compile for. If -x was used, zero all other options (so we don't need to repeat the error code) + if(force_lang == "c"): + cxx_count = 0 + elif(force_lang == "c++"): + c_count = 0 + + if(c_count == 0 and cxx_count == 0): + print("") + print("ERROR: No commands were logged to the build logs (C: {}, C++: {}).".format(c_build_log.name, cxx_build_log.name)) + print("Your build system may not be compatible.") + + if(not args["verbose"]): + print("") + print("Try running with the --verbose flag to see build system output - the most common cause of this is a hardcoded compiler path.") + + c_build_log.delete = False + cxx_build_log.delete = False + return 3 + + elif(c_count > cxx_count): + lang, flags = ("c", c_flags) + else: + lang, flags = ("c++", cxx_flags) + + generate_conf(["-x", lang] + flags, config_file) + print("Created {} config file with {} {} flags".format(output_format.upper(), len(flags), lang.upper())) + + +def fake_build(project_dir, c_build_log_path, cxx_build_log_path, verbose, make_cmd, build_system, cc, cxx, out_of_tree, configure_opts, make_flags, preserve_environment, qt_version): + '''Builds the project using the fake toolchain, to collect the compiler flags. + + project_dir: the directory containing the source files + build_log_path: the file to log commands to + verbose: show the build process output + make_cmd: the path of the make executable + cc: the path of the clang executable + cxx: the path of the clang++ executable + out_of_tree: perform an out-of-tree build (autotools only) + configure_opts: additional flags for configure stage + make_flags: additional flags for make + preserve_environment: pass environment variables to build processes + qt_version: The Qt version to use when building with qmake. + ''' + + # TODO: add Windows support + assert(not sys.platform.startswith("win32")) + fake_path = os.path.join(ycm_generator_dir, "fake-toolchain", "Unix") + + # environment variables and arguments for build process + started = time.time() + FNULL = open(os.devnull, "w") + proc_opts = {} if verbose else { + "stdin": FNULL, + "stdout": FNULL, + "stderr": FNULL + } + proc_opts["cwd"] = project_dir + + if(preserve_environment): + env = os.environ + else: + # Preserve HOME, since Cmake needs it to find some packages and it's + # normally there anyway. See #26. + env = dict(map(lambda x: (x, os.environ[x]), ["HOME"])) + + env["PATH"] = "{}:{}".format(fake_path, os.environ["PATH"]) + env["CC"] = "clang" + env["CXX"] = "clang++" + env["YCM_CONFIG_GEN_CC_LOG"] = c_build_log_path + env["YCM_CONFIG_GEN_CXX_LOG"] = cxx_build_log_path + + # used during configuration stage, so that cmake, etc. can verify what the compiler supports + env_config = env.copy() + env_config["YCM_CONFIG_GEN_CC_PASSTHROUGH"] = cc + env_config["YCM_CONFIG_GEN_CXX_PASSTHROUGH"] = cxx + + # use -i (ignore errors), since the makefile may include scripts which + # depend upon the existence of various output files + make_args = [make_cmd] + make_flags + + # Used for the qmake build system below + pro_files = glob.glob(os.path.join(project_dir, "*.pro")) + + # sanity check - make sure the toolchain is available + assert os.path.exists(fake_path), "Could not find toolchain at '{}'".format(fake_path) + + # helper function to display exact commands used + def run(cmd, *args, **kwargs): + print("$ " + " ".join(cmd)) + subprocess.call(cmd, *args, **kwargs) + + if build_system is None: + if os.path.exists(os.path.join(project_dir, "CMakeLists.txt")): + build_system = "cmake" + elif os.path.exists(os.path.join(project_dir, "configure")): + build_system = "autotools" + elif pro_files: + build_system = "qmake" + elif any([os.path.exists(os.path.join(project_dir, x)) for x in ["GNUmakefile", "makefile", "Makefile"]]): + build_system = "make" + + # execute the build system + if build_system == "cmake": + # cmake + # run cmake in a temporary directory, then compile the project as usual + build_dir = tempfile.mkdtemp() + proc_opts["cwd"] = build_dir + + # if the project was built in-tree, we need to hide the cache file so that cmake + # populates the build dir instead of just re-generating the existing files + cache_path = os.path.join(project_dir, "CMakeCache.txt") + + if(os.path.exists(cache_path)): + fd, cache_tmp = tempfile.mkstemp() + os.close(fd) + shutil.move(cache_path, cache_tmp) + else: + cache_tmp = None + + print("Running cmake in '{}'...".format(build_dir)) + sys.stdout.flush() + run(["cmake", project_dir] + configure_opts, env=env_config, **proc_opts) + + print("\nRunning make...") + sys.stdout.flush() + run(make_args, env=env, **proc_opts) + + print("\nCleaning up...") + print("") + sys.stdout.flush() + shutil.rmtree(build_dir) + + if(cache_tmp): + shutil.move(cache_tmp, cache_path) + + elif build_system == "autotools": + # autotools + # perform build in-tree, since not all projects handle out-of-tree builds correctly + + if(out_of_tree): + build_dir = tempfile.mkdtemp() + proc_opts["cwd"] = build_dir + print("Configuring autotools in '{}'...".format(build_dir)) + else: + print("Configuring autotools...") + + run([os.path.join(project_dir, "configure")] + configure_opts, env=env_config, **proc_opts) + + print("\nRunning make...") + run(make_args, env=env, **proc_opts) + + print("\nCleaning up...") + + if(out_of_tree): + print("") + shutil.rmtree(build_dir) + else: + run([make_cmd, "maintainer-clean"], env=env, **proc_opts) + + elif build_system == "qmake": + # qmake + # make sure there is only one .pro file + if len(pro_files) != 1: + print("ERROR: Found {} .pro files (expected one): {}.".format( + len(pro_files), ', '.join(pro_files))) + sys.exit(1) + + # run qmake in a temporary directory, then compile the project as usual + build_dir = tempfile.mkdtemp() + proc_opts["cwd"] = build_dir + env_config["QT_SELECT"] = qt_version + + # QMAKESPEC is platform dependent - valid mkspecs are in + # /usr/share/qt4/mkspecs, /usr/lib64/qt5/mkspecs + env_config["QMAKESPEC"] = { + ("Linux", True): "unsupported/linux-clang", + ("Linux", False): "linux-clang", + ("Darwin", True): "unsupported/macx-clang", + ("Darwin", False): "macx-clang", + ("FreeBSD", False): "unsupported/freebsd-clang", + }[(os.uname()[0], qt_version == "4")] + + print("Running qmake in '{}' with Qt {}...".format(build_dir, qt_version)) + run(["qmake"] + configure_opts + [pro_files[0]], env=env_config, + **proc_opts) + + print("\nRunning make...") + run(make_args, env=env, **proc_opts) + + print("\nCleaning up...") + print("") + shutil.rmtree(build_dir) + + elif build_system == "make": + # make + # needs to be handled last, since other build systems can generate Makefiles + print("Preparing build directory...") + run([make_cmd, "clean"], env=env, **proc_opts) + + print("\nRunning make...") + run(make_args, env=env, **proc_opts) + + elif(os.path.exists(os.path.join(project_dir, "Make/options"))): + print("Found OpenFOAM Make/options") + + # OpenFOAM build system + make_args = ["wmake"] + + # Since icpc could not find directory in which g++ resides, + # set environmental variables to gcc to make fake_build operate normally. + + env['WM_COMPILER']='Gcc' + env['WM_CC']='gcc' + env['WM_CXX']='g++' + + print("\nRunning wmake...") + run(make_args, env=env, **proc_opts) + + else: + print("ERROR: Unknown build system") + sys.exit(2) + + print("Build completed in {} sec".format(round(time.time() - started, 2))) + print("") + + +def parse_flags(build_log): + '''Creates a list of compiler flags from the build log. + + build_log: an iterator of lines + Returns: (line_count, skip_count, flags) + flags is a list, and the counts are integers + ''' + + # Used to ignore entries which result in temporary files, or don't fully + # compile the file + temp_output = re.compile("(-x assembler)|(-o ([a-zA-Z0-9._].tmp))|(/dev/null)") + skip_count = 0 + + # Flags we want: + # -includes (-i, -I) + # -defines (-D) + # -warnings (-Werror), but no assembler, etc. flags (-Wa,-option) + # -language (-std=gnu99) and standard library (-nostdlib) + # -word size (-m64) + flags_whitelist = ["-[iIDF].*", "-W[^,]*", "-std=[a-z0-9+]+", "-(no)?std(lib|inc)", "-m[0-9]+"] + flags_whitelist = re.compile("|".join(map("^{}$".format, flags_whitelist))) + flags = set() + line_count = 0 + + # macro definitions should be handled separately, so we can resolve duplicates + define_flags = dict() + define_regex = re.compile("-D([a-zA-Z0-9_]+)=(.*)") + + # Used to only bundle filenames with applicable arguments + filename_flags = ["-o", "-I", "-isystem", "-iquote", "-include", "-imacros", "-isysroot"] + + # Process build log + for line in build_log: + if(temp_output.search(line)): + skip_count += 1 + continue + + line_count += 1 + words = split_flags(line) + + for (i, word) in enumerate(words): + if(word[0] != '-' or not flags_whitelist.match(word)): + continue + + # handle macro definitions + m = define_regex.match(word) + if(m): + if(m.group(1) not in define_flags): + define_flags[m.group(1)] = [m.group(2)] + elif(m.group(2) not in define_flags[m.group(1)]): + define_flags[m.group(1)].append(m.group(2)) + + continue + + # include arguments for this option, if there are any, as a tuple + if(i != len(words) - 1 and word in filename_flags and words[i + 1][0] != '-'): + flags.add((word, words[i + 1])) + else: + flags.add(word) + + # Only specify one word size (the largest) + # (Different sizes are used for different files in the linux kernel.) + mRegex = re.compile("^-m[0-9]+$") + word_flags = list([f for f in flags if isinstance(f, basestring) and mRegex.match(f)]) + + if(len(word_flags) > 1): + for flag in word_flags: + flags.remove(flag) + + flags.add(max(word_flags)) + + # Resolve duplicate macro definitions (always choose the last value for consistency) + for name, values in define_flags.iteritems(): + if(len(values) > 1): + print("WARNING: {} distinct definitions of macro {} found".format(len(values), name)) + values.sort() + + flags.add("-D{}={}".format(name, values[0])) + + return (line_count, skip_count, sorted(flags)) + + +def generate_cc_conf(flags, config_file): + '''Generates the .color_coded file + + flags: the list of flags + config_file: the path to save the configuration file at''' + + with open(config_file, "w") as output: + for flag in flags: + if(isinstance(flag, basestring)): + output.write(flag + "\n") + else: # is tuple + for f in flag: + output.write(f + "\n") + + +def generate_ycm_conf(flags, config_file): + '''Generates the .ycm_extra_conf.py. + + flags: the list of flags + config_file: the path to save the configuration file at''' + + template_file = os.path.join(ycm_generator_dir, "template.py") + + with open(template_file, "r") as template: + with open(config_file, "w") as output: + output.write("# Generated by YCM Generator at {}\n\n".format(str(datetime.datetime.today()))) + + for line in template: + if(line == " # INSERT FLAGS HERE\n"): + # insert generated code + for flag in flags: + if(isinstance(flag, basestring)): + output.write(" '{}',\n".format(flag)) + else: # is tuple + output.write(" '{}', '{}',\n".format(*flag)) + + else: + # copy template + output.write(line) + + +def split_flags(line): + '''Helper method that splits a string into flags. + Flags are space-seperated, except for spaces enclosed in quotes. + Returns a list of flags''' + + # Pass 1: split line using whitespace + words = line.strip().split() + + # Pass 2: merge words so that the no. of quotes is balanced + res = [] + + for w in words: + if(len(res) > 0 and unbalanced_quotes(res[-1])): + res[-1] += " " + w + else: + res.append(w) + + return res + + +def unbalanced_quotes(s): + '''Helper method that returns True if the no. of single or double quotes in s is odd.''' + + single = 0 + double = 0 + + for c in s: + if(c == "'"): + single += 1 + elif(c == '"'): + double += 1 + + return (single % 2 == 1 or double % 2 == 1) + + +if(__name__ == "__main__"): + # Note that sys.exit() lets us use None and 0 interchangably + sys.exit(main()) + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/ar b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/ar new file mode 100755 index 0000000..8a395e6 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/ar @@ -0,0 +1,4 @@ +#!/bin/sh +# This script is needed because /bin/true does not exist on non-FHS-compliant distros. e.g. NixOS +exit 0 + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/as b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/as new file mode 100755 index 0000000..8a395e6 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/as @@ -0,0 +1,4 @@ +#!/bin/sh +# This script is needed because /bin/true does not exist on non-FHS-compliant distros. e.g. NixOS +exit 0 + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/cc b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/cc new file mode 100755 index 0000000..8ecd890 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/cc @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then + # Cmake determines compiler properties by compiling a test file, so call clang for this case + $YCM_CONFIG_GEN_CC_PASSTHROUGH $@ + +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then + # Needed to enable clang-specific options for certain build systems (e.g. linux) + $YCM_CONFIG_GEN_CC_PASSTHROUGH $@ + +else + echo "$@" >> $YCM_CONFIG_GEN_CC_LOG +fi + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/clang b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/clang new file mode 100755 index 0000000..8ecd890 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/clang @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then + # Cmake determines compiler properties by compiling a test file, so call clang for this case + $YCM_CONFIG_GEN_CC_PASSTHROUGH $@ + +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then + # Needed to enable clang-specific options for certain build systems (e.g. linux) + $YCM_CONFIG_GEN_CC_PASSTHROUGH $@ + +else + echo "$@" >> $YCM_CONFIG_GEN_CC_LOG +fi + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/clang++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/clang++ new file mode 100755 index 0000000..4e3733e --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/clang++ @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then + # Cmake determines compiler properties by compiling a test file, so call clang for this case + $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ + +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then + # Needed to enable clang-specific options for certain build systems (e.g. linux) + $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ + +else + echo "$@" >> $YCM_CONFIG_GEN_CXX_LOG +fi + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/cxx b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/cxx new file mode 100755 index 0000000..4e3733e --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/cxx @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then + # Cmake determines compiler properties by compiling a test file, so call clang for this case + $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ + +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then + # Needed to enable clang-specific options for certain build systems (e.g. linux) + $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ + +else + echo "$@" >> $YCM_CONFIG_GEN_CXX_LOG +fi + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/g++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/g++ new file mode 100755 index 0000000..4e3733e --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/g++ @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then + # Cmake determines compiler properties by compiling a test file, so call clang for this case + $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ + +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then + # Needed to enable clang-specific options for certain build systems (e.g. linux) + $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ + +else + echo "$@" >> $YCM_CONFIG_GEN_CXX_LOG +fi + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/gcc b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/gcc new file mode 100755 index 0000000..8ecd890 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/gcc @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then + # Cmake determines compiler properties by compiling a test file, so call clang for this case + $YCM_CONFIG_GEN_CC_PASSTHROUGH $@ + +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then + # Needed to enable clang-specific options for certain build systems (e.g. linux) + $YCM_CONFIG_GEN_CC_PASSTHROUGH $@ + +else + echo "$@" >> $YCM_CONFIG_GEN_CC_LOG +fi + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/gcc++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/gcc++ new file mode 100755 index 0000000..4e3733e --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/gcc++ @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then + # Cmake determines compiler properties by compiling a test file, so call clang for this case + $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ + +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then + # Needed to enable clang-specific options for certain build systems (e.g. linux) + $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ + +else + echo "$@" >> $YCM_CONFIG_GEN_CXX_LOG +fi + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/ld b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/ld new file mode 100755 index 0000000..8a395e6 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/ld @@ -0,0 +1,4 @@ +#!/bin/sh +# This script is needed because /bin/true does not exist on non-FHS-compliant distros. e.g. NixOS +exit 0 + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/nm b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/nm new file mode 100755 index 0000000..8a395e6 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/nm @@ -0,0 +1,4 @@ +#!/bin/sh +# This script is needed because /bin/true does not exist on non-FHS-compliant distros. e.g. NixOS +exit 0 + diff --git a/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/true b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/true new file mode 100755 index 0000000..8a395e6 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/fake-toolchain/Unix/true @@ -0,0 +1,4 @@ +#!/bin/sh +# This script is needed because /bin/true does not exist on non-FHS-compliant distros. e.g. NixOS +exit 0 + diff --git a/vim/.config/vim/plugged/YCM-Generator/plugin/ycm-generator.vim b/vim/.config/vim/plugged/YCM-Generator/plugin/ycm-generator.vim new file mode 100644 index 0000000..f296774 --- /dev/null +++ b/vim/.config/vim/plugged/YCM-Generator/plugin/ycm-generator.vim @@ -0,0 +1,23 @@ + +let s:config_gen = expand(":p:h:h") . "/config_gen.py" + +command! -nargs=? -complete=file_in_path -bang CCGenerateConfig call s:GenerateConfig("cc", 0, "") +command! -nargs=? -complete=file_in_path -bang YcmGenerateConfig call s:GenerateConfig("ycm", 0, "") + +function! s:GenerateConfig(fmt, overwrite, flags) + let l:cmd = "! " . s:config_gen . " -F " . a:fmt . " " . a:flags + + if a:overwrite + let l:cmd = l:cmd . " -f" + endif + + " Only append the working directory if the last option is a flag + let l:split_flags = split(a:flags) + if len(l:split_flags) == 0 || l:split_flags[-1] =~ "^-" + let l:cmd = l:cmd . " " . shellescape(getcwd()) + endif + + " Disable interactive prompts for consistency with Neovim + execute l:cmd . " + +import os +import ycm_core + +flags = [ + # INSERT FLAGS HERE +] + + +# Set this to the absolute path to the folder (NOT the file!) containing the +# compile_commands.json file to use that instead of 'flags'. See here for +# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html +# +# You can get CMake to generate this file for you by adding: +# set( CMAKE_EXPORT_COMPILE_COMMANDS 1 ) +# to your CMakeLists.txt file. +# +# Most projects will NOT need to set this to anything; you can just change the +# 'flags' list of compilation flags. Notice that YCM itself uses that approach. +compilation_database_folder = '' + +if os.path.exists( compilation_database_folder ): + database = ycm_core.CompilationDatabase( compilation_database_folder ) +else: + database = None + +SOURCE_EXTENSIONS = [ '.C', '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ] + +def DirectoryOfThisScript(): + return os.path.dirname( os.path.abspath( __file__ ) ) + + +def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): + if not working_directory: + return list( flags ) + new_flags = [] + make_next_absolute = False + path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] + for flag in flags: + new_flag = flag + + if make_next_absolute: + make_next_absolute = False + if not flag.startswith( '/' ): + new_flag = os.path.join( working_directory, flag ) + + for path_flag in path_flags: + if flag == path_flag: + make_next_absolute = True + break + + if flag.startswith( path_flag ): + path = flag[ len( path_flag ): ] + new_flag = path_flag + os.path.join( working_directory, path ) + break + + if new_flag: + new_flags.append( new_flag ) + return new_flags + + +def IsHeaderFile( filename ): + extension = os.path.splitext( filename )[ 1 ] + return extension in [ '.H', '.h', '.hxx', '.hpp', '.hh' ] + + +def GetCompilationInfoForFile( filename ): + # The compilation_commands.json file generated by CMake does not have entries + # for header files. So we do our best by asking the db for flags for a + # corresponding source file, if any. If one exists, the flags for that file + # should be good enough. + if IsHeaderFile( filename ): + basename = os.path.splitext( filename )[ 0 ] + for extension in SOURCE_EXTENSIONS: + replacement_file = basename + extension + if os.path.exists( replacement_file ): + compilation_info = database.GetCompilationInfoForFile( + replacement_file ) + if compilation_info.compiler_flags_: + return compilation_info + return None + return database.GetCompilationInfoForFile( filename ) + + +def FlagsForFile( filename, **kwargs ): + if database: + # Bear in mind that compilation_info.compiler_flags_ does NOT return a + # python list, but a "list-like" StringVec object + compilation_info = GetCompilationInfoForFile( filename ) + if not compilation_info: + return None + + final_flags = MakeRelativePathsInFlagsAbsolute( + compilation_info.compiler_flags_, + compilation_info.compiler_working_dir_ ) + + else: + relative_to = DirectoryOfThisScript() + final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) + + return { + 'flags': final_flags, + 'do_cache': True + } + +def Settings( **kwargs ): + language = kwargs[ 'language' ] + if language == 'cfamily': + return { + 'flags': flags + } + + return {} diff --git a/vim/.config/vim/plugged/goyo.vim b/vim/.config/vim/plugged/goyo.vim new file mode 160000 index 0000000..fa0263d --- /dev/null +++ b/vim/.config/vim/plugged/goyo.vim @@ -0,0 +1 @@ +Subproject commit fa0263d456dd43f5926484d1c4c7022dfcb21ba9000000000000000000000000 diff --git a/vim/.config/vim/plugged/nord-vim/.editorconfig b/vim/.config/vim/plugged/nord-vim/.editorconfig new file mode 100644 index 0000000..885acd4 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/.editorconfig @@ -0,0 +1,27 @@ +# Copyright (c) 2016-present Sven Greb +# This source code is licensed under the MIT license found in the license file. + +# Configurations for EditorConfig. +# See https://editorconfig.org/#file-format-details for more details. + +# +--------------------+ +# + Base Configuration + +# +--------------------+ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +max_line_length = 160 +trim_trailing_whitespace = true + +# +-----------+ +# + Languages + +# +-----------+ +# +--- Markdown ---+ +[*.{md}] +max_line_length = off +trim_trailing_whitespace = false diff --git a/vim/.config/vim/plugged/nord-vim/.gitattributes b/vim/.config/vim/plugged/nord-vim/.gitattributes new file mode 100644 index 0000000..ad8e9b4 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/.gitattributes @@ -0,0 +1,12 @@ +# Copyright (c) 2016-present Sven Greb +# This source code is licensed under the MIT license found in the license file. + +# Configuration to define attributes per path. +# +# References: +# 1. https://git-scm.com/docs/gitattributes +# 2. https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Keyword-Expansion + +# Automatically perform line feed (LF) normalization for files detected as text and +# leave all files detected as binary untouched. +* text=auto eol=lf diff --git a/vim/.config/vim/plugged/nord-vim/.github/codeowners b/vim/.config/vim/plugged/nord-vim/.github/codeowners new file mode 100644 index 0000000..0f7b107 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/.github/codeowners @@ -0,0 +1,14 @@ +# Copyright (c) 2016-present Sven Greb +# This source code is licensed under the MIT license found in the license file. + +# Configuration for the GitHub feature to automatically request reviews from the code owners +# when a pull request changes any owned files. +# +# References: +# 1. https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location +# 2. https://github.com/blog/2392-introducing-code-owners + +# +----------------------+ +# + Core Team Code Owner + +# +----------------------+ +* @svengreb diff --git a/vim/.config/vim/plugged/nord-vim/.gitignore b/vim/.config/vim/plugged/nord-vim/.gitignore new file mode 100644 index 0000000..78562b3 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/.gitignore @@ -0,0 +1,10 @@ +# Copyright (c) 2016-present Sven Greb +# This source code is licensed under the MIT license found in the license file. + +# Path match pattern to intentionally ignore untracked files and directories. +# See https://git-scm.com/docs/gitignore for more details. + +# +---------+ +# + Node.js + +# +---------+ +**/node_modules/ diff --git a/vim/.config/vim/plugged/nord-vim/.mailmap b/vim/.config/vim/plugged/nord-vim/.mailmap new file mode 100644 index 0000000..0745dec --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/.mailmap @@ -0,0 +1,8 @@ +# Copyright (c) 2016-present Sven Greb +# This source code is licensed under the MIT license found in the license file. + +# Configuration for the Git mail mapping feature to coalesce together commits by the same person in the shortlog, +# where their name and/or email address was spelled differently or has been changed. +# See https://git-scm.com/docs/git-shortlog#_mapping_authors for more details. +Sven Greb +Sven Greb diff --git a/vim/.config/vim/plugged/nord-vim/.npmrc b/vim/.config/vim/plugged/nord-vim/.npmrc new file mode 100644 index 0000000..2ddf945 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/.npmrc @@ -0,0 +1,18 @@ +# Copyright (c) 2016-present Sven Greb +# This source code is licensed under the MIT license found in the license file. + +# Configurations for npm. +# See https://docs.npmjs.com/cli/v7/configuring-npm/npmrc for more details. + +# Only use a lockfile for single-consumer projects, like applications, but not for multi-consumer projects like +# libraries. +# It helps to pin dependency versions, improves the security through integrity checksums, prevents possible errors +# caused by updated transitive dependencies and allows to get deterministic build results, but it can hide problems in +# multi-consumer projects when any later versions of a used dependency, or its transitive dependencies, is not +# compatible with the own project anymore. +package-lock=true + +# Do not resolve to the latest minor and patch updates. +# Automatically pin dependencies to exact versions instead of resolving to latest minor and patch updates. +# This prevents possible errors caused by updated transitive dependencies. +save-exact=true diff --git a/vim/.config/vim/plugged/nord-vim/autoload/airline/themes/nord.vim b/vim/.config/vim/plugged/nord-vim/autoload/airline/themes/nord.vim new file mode 100755 index 0000000..ba1a9d9 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/autoload/airline/themes/nord.vim @@ -0,0 +1,94 @@ +" Copyright (c) 2016-present Sven Greb +" This source code is licensed under the MIT license found in the license file. + +let s:nord_vim_version="0.19.0" +let g:airline#themes#nord#palette = {} + +let s:nord0_gui = "#2E3440" +let s:nord1_gui = "#3B4252" +let s:nord2_gui = "#434C5E" +let s:nord3_gui = "#4C566A" +let s:nord4_gui = "#D8DEE9" +let s:nord5_gui = "#E5E9F0" +let s:nord6_gui = "#ECEFF4" +let s:nord7_gui = "#8FBCBB" +let s:nord8_gui = "#88C0D0" +let s:nord9_gui = "#81A1C1" +let s:nord10_gui = "#5E81AC" +let s:nord11_gui = "#BF616A" +let s:nord12_gui = "#D08770" +let s:nord13_gui = "#EBCB8B" +let s:nord14_gui = "#A3BE8C" +let s:nord15_gui = "#B48EAD" + +let s:nord0_term = "NONE" +let s:nord1_term = "0" +let s:nord2_term = "NONE" +let s:nord4_term = "NONE" +let s:nord11_term = "1" +let s:nord14_term = "2" +let s:nord13_term = "3" +let s:nord9_term = "4" +let s:nord15_term = "5" +let s:nord8_term = "6" +let s:nord5_term = "7" +let s:nord3_term = "8" +let s:nord12_term = "11" +let s:nord10_term = "12" +let s:nord7_term = "14" +let s:nord6_term = "15" + +let s:NMain = [s:nord1_gui, s:nord8_gui, s:nord1_term, s:nord8_term] +let s:NRight = [s:nord1_gui, s:nord9_gui, s:nord1_term, s:nord9_term] +let s:NMiddle = [s:nord5_gui, s:nord3_gui, s:nord5_term, s:nord3_term] +let s:NWarn = [s:nord1_gui, s:nord13_gui, s:nord3_term, s:nord13_term] +let s:NError = [s:nord0_gui, s:nord11_gui, s:nord1_term, s:nord11_term] +let g:airline#themes#nord#palette.normal = airline#themes#generate_color_map(s:NMain, s:NRight, s:NMiddle) +let g:airline#themes#nord#palette.normal.airline_warning = s:NWarn +let g:airline#themes#nord#palette.normal.airline_error = s:NError + +let s:IMain = [s:nord1_gui, s:nord14_gui, s:nord1_term, s:nord6_term] +let s:IRight = [s:nord1_gui, s:nord9_gui, s:nord1_term, s:nord9_term] +let s:IMiddle = [s:nord5_gui, s:nord3_gui, s:nord5_term, s:nord3_term] +let s:IWarn = [s:nord1_gui, s:nord13_gui, s:nord3_term, s:nord13_term] +let s:IError = [s:nord0_gui, s:nord11_gui, s:nord1_term, s:nord11_term] +let g:airline#themes#nord#palette.insert = airline#themes#generate_color_map(s:IMain, s:IRight, s:IMiddle) +let g:airline#themes#nord#palette.insert.airline_warning = s:IWarn +let g:airline#themes#nord#palette.insert.airline_error = s:IError + +let s:RMain = [s:nord1_gui, s:nord14_gui, s:nord1_term, s:nord14_term] +let s:RRight = [s:nord1_gui, s:nord9_gui, s:nord1_term, s:nord9_term] +let s:RMiddle = [s:nord5_gui, s:nord3_gui, s:nord5_term, s:nord3_term] +let s:RWarn = [s:nord1_gui, s:nord13_gui, s:nord3_term, s:nord13_term] +let s:RError = [s:nord0_gui, s:nord11_gui, s:nord1_term, s:nord11_term] +let g:airline#themes#nord#palette.replace = airline#themes#generate_color_map(s:RMain, s:RRight, s:RMiddle) +let g:airline#themes#nord#palette.replace.airline_warning = s:RWarn +let g:airline#themes#nord#palette.replace.airline_error = s:RError + +let s:VMain = [s:nord1_gui, s:nord7_gui, s:nord1_term, s:nord7_term] +let s:VRight = [s:nord1_gui, s:nord9_gui, s:nord1_term, s:nord9_term] +let s:VMiddle = [s:nord5_gui, s:nord3_gui, s:nord5_term, s:nord3_term] +let s:VWarn = [s:nord1_gui, s:nord13_gui, s:nord3_term, s:nord13_term] +let s:VError = [s:nord0_gui, s:nord11_gui, s:nord1_term, s:nord11_term] +let g:airline#themes#nord#palette.visual = airline#themes#generate_color_map(s:VMain, s:VRight, s:VMiddle) +let g:airline#themes#nord#palette.visual.airline_warning = s:VWarn +let g:airline#themes#nord#palette.visual.airline_error = s:VError + +let s:IAMain = [s:nord5_gui, s:nord3_gui, s:nord5_term, s:nord3_term] +let s:IARight = [s:nord5_gui, s:nord3_gui, s:nord5_term, s:nord3_term] +if g:nord_uniform_status_lines == 0 + let s:IAMiddle = [s:nord5_gui, s:nord1_gui, s:nord5_term, s:nord1_term] +else + let s:IAMiddle = [s:nord5_gui, s:nord3_gui, s:nord5_term, s:nord3_term] +endif +let s:IAWarn = [s:nord1_gui, s:nord13_gui, s:nord3_term, s:nord13_term] +let s:IAError = [s:nord0_gui, s:nord11_gui, s:nord1_term, s:nord11_term] +let g:airline#themes#nord#palette.inactive = airline#themes#generate_color_map(s:IAMain, s:IARight, s:IAMiddle) +let g:airline#themes#nord#palette.inactive.airline_warning = s:IAWarn +let g:airline#themes#nord#palette.inactive.airline_error = s:IAError + +let g:airline#themes#nord#palette.normal.airline_term = s:NMiddle +let g:airline#themes#nord#palette.insert.airline_term = s:IMiddle +let g:airline#themes#nord#palette.replace.airline_term = s:RMiddle +let g:airline#themes#nord#palette.visual.airline_term = s:VMiddle +let g:airline#themes#nord#palette.inactive.airline_term = s:IAMiddle diff --git a/vim/.config/vim/plugged/nord-vim/autoload/lightline/colorscheme/nord.vim b/vim/.config/vim/plugged/nord-vim/autoload/lightline/colorscheme/nord.vim new file mode 100755 index 0000000..b51cca6 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/autoload/lightline/colorscheme/nord.vim @@ -0,0 +1,43 @@ +" Copyright (c) 2016-present Sven Greb +" This source code is licensed under the MIT license found in the license file. + +let s:nord_vim_version="0.19.0" +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} + +let s:nord0 = ["#2E3440", "NONE"] +let s:nord1 = ["#3B4252", 0] +let s:nord2 = ["#434C5E", "NONE"] +let s:nord3 = ["#4C566A", 8] +let s:nord4 = ["#D8DEE9", "NONE"] +let s:nord5 = ["#E5E9F0", 7] +let s:nord6 = ["#ECEFF4", 15] +let s:nord7 = ["#8FBCBB", 14] +let s:nord8 = ["#88C0D0", 6] +let s:nord9 = ["#81A1C1", 4] +let s:nord10 = ["#5E81AC", 12] +let s:nord11 = ["#BF616A", 1] +let s:nord12 = ["#D08770", 11] +let s:nord13 = ["#EBCB8B", 3] +let s:nord14 = ["#A3BE8C", 2] +let s:nord15 = ["#B48EAD", 5] + +let s:p.normal.left = [ [ s:nord1, s:nord8 ], [ s:nord5, s:nord1 ] ] +let s:p.normal.middle = [ [ s:nord5, s:nord3 ] ] +let s:p.normal.right = [ [ s:nord5, s:nord1 ], [ s:nord5, s:nord1 ] ] +let s:p.normal.warning = [ [ s:nord1, s:nord13 ] ] +let s:p.normal.error = [ [ s:nord1, s:nord11 ] ] + +let s:p.inactive.left = [ [ s:nord1, s:nord8 ], [ s:nord5, s:nord1 ] ] +let s:p.inactive.middle = g:nord_uniform_status_lines == 0 ? [ [ s:nord5, s:nord1 ] ] : [ [ s:nord5, s:nord3 ] ] +let s:p.inactive.right = [ [ s:nord5, s:nord1 ], [ s:nord5, s:nord1 ] ] + +let s:p.insert.left = [ [ s:nord1, s:nord6 ], [ s:nord5, s:nord1 ] ] +let s:p.replace.left = [ [ s:nord1, s:nord13 ], [ s:nord5, s:nord1 ] ] +let s:p.visual.left = [ [ s:nord1, s:nord7 ], [ s:nord5, s:nord1 ] ] + +let s:p.tabline.left = [ [ s:nord5, s:nord3 ] ] +let s:p.tabline.middle = [ [ s:nord5, s:nord3 ] ] +let s:p.tabline.right = [ [ s:nord5, s:nord3 ] ] +let s:p.tabline.tabsel = [ [ s:nord1, s:nord8 ] ] + +let g:lightline#colorscheme#nord#palette = lightline#colorscheme#flatten(s:p) diff --git a/vim/.config/vim/plugged/nord-vim/changelog.md b/vim/.config/vim/plugged/nord-vim/changelog.md new file mode 100644 index 0000000..d9fae38 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/changelog.md @@ -0,0 +1,1261 @@ +

+ + + + + + +

+ +

+ + + + + + +

+ +

+ Changelog for Nord Vim — An arctic, north-bluish clean and elegant Vim color theme. +

+ + + +# 0.19.0 + +![Release Date: 2022-05-14](https://img.shields.io/static/v1.svg?style=flat-square&label=Release%20Date&message=2022-05-14&colorA=4c566a&colorB=88c0d0) [![Project Board](https://img.shields.io/static/v1.svg?style=flat-square&label=Project%20Board&message=0.19.0&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0)](https://github.com/orgs/nordtheme/projects/1/views/10) [![Milestone](https://img.shields.io/static/v1.svg?style=flat-square&label=Milestone&message=0.19.0&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0)](https://github.com/nordtheme/vim/milestone/21) + +⇅ [Show all commits][111] + +## Features + +### Syntax + +
+Support for LSP textDocument/documentHighlight — #284 (⊶ 3e4e273d) by @cmoscofian + +↠ The [Neovim LSP `textDocument` / `documentHightlight` groups][114] are responsible to highlight tokens in a document that are related to each +other, e.g. declared variables, using the `vim.buf.lsp.document_highlight()` function. +Also see the [LSP specification about "Document Highlights Request"][115] for more details. + +

+ +

+ +
+ +### UI + +
+Support for LSP LSPSignatureActiveParameter — #286 (⊶ a8256787) by @cmoscofian + +↠ The [`vim.lsp.buf.signature_help` function is used to highlight the active parameter in the signature help][117] [1]. Before the active parameter was not styled differently to any other parameter which made it hard to distinguish it. This has been improved by adding support for the `LspSignatureActiveParameter` syntax highlighting group where the active parameter now uses `nord8` are foreground color and additionally a font underline with the same color. + +

Before

+

+ +

After

+

+ +
+ +## Improvements + +
+Refactored theme configuration conditions — #295, #305 (⊶ 291e05d9, e3eb2084) by @jvoisin and @svengreb + +↠ The conditions and default values of the theme configurations were quite verbose so this commit improves them by… + +- …using inline ternary operators instead of if/else blocks to reduce the code overhead and make it way more readable. +- …using [Vim builtin `get` function][118] instead of if/else blocks. +- …inlining the script-scoped `logWarning` function since it was only used once. +- …grouping some blocks where it made sense. + +
+ +
+Only call execute function once per syntax group — #303 (⊶ 77fe4b3f) by @jvoisin and @svengreb + +↠ Before the custom `s:hi` function called [Vim's `execute` function][119] for each defined attribute which is quite expensive in terms of performance. To improve this the attributes are now concatenate as string and passed to `exec` at the end of the function instead. + +
+ +### Syntax + +
+Readability of C language constants — #283 (⊶ b32592eb) by @jvoisin + +↠ To improve the readability of C language constants, defined by [the `cConstant` syntax highlighting group][116], these are now colored with `nord9` for the foreground to make them stand out. This is important in C, since interesting things are usually happening in their proximity, like checking/returning an error, passing particular values/flags to functions and so on. + +

Before

+

+ +

After

+

+ +
+ +## Tasks + +
+Support for Neovim 0.6.0 diagnostic API highlight groups — #282 (⊶ 8035ba07) by @jan-xyz + +↠ In [Neovim `0.6.0`][112] the [naming scheme for the highlight groups of the diagnostic API changed][113] [2]. The new groups have been added as default while the previous groups are conditionally guarded when using Neovim `0.5.0`. + +
+ +# 0.18.0 + +![Release Date: 2021-09-12](https://img.shields.io/static/v1.svg?style=flat-square&label=Release%20Date&message=2021-09-12&colorA=4c566a&colorB=88c0d0) [![Project Board](https://img.shields.io/static/v1.svg?style=flat-square&label=Project%20Board&message=0.18.0&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0)](https://github.com/nordtheme/vim/projects/24) [![Milestone](https://img.shields.io/static/v1.svg?style=flat-square&label=Milestone&message=0.18.0&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0)](https://github.com/nordtheme/vim/milestone/20) + +⇅ [Show all commits][106] + +## Features + +### Syntax + +
+Support for vim-pandoc/vim-pandoc-syntax — #220 (⊶ 8d8b9bf8) by @tpoisot and @BirgerNi + +↠ To improve syntax highlighting for [Pandoc][9], support for the [vim-pandoc/vim-pandoc-syntax][13] plugin has been implemented. +Most groups are linked to existing Markdown groups to ensure a consistent style across languages and different plugins. + +

+ +
+ +### UI + +
+Support for LSP code lenses — #266 (⊶ 02ddfadb) by @jan-xyz + +↠ Before [LSP code lenses][107] were highlighted with the default color which has been changed to make it less visually intrusive, like other UI related elements, e.g. messages of linters. + +

Before

+

+ +

After

+

+ +
+ +## Improvements + +### Syntax + +
+Prevent aggressive error highlighting — #269 ⇄ #270 (⊶ e3e8a75c) by @jan-xyz + +↠ The `TSError` group is used to [highlight syntax/parser errors][108] which caused an aggressive styling where the background color of many syntax elements was rendered with `nord11` during typing. This is a known problem and was fixed by many other themes by removing the group again. One of the [core maintainers of `nvim-treesitter` provided a solution by remapping groups][110] and also mentioned that the group is [styled by the `nvim-treesitter` plugin but the active theme][109]. + +Syntax errors can still be highlighted through linters and parsers like [Neovim's LSP][8] can still be used instead to highlight errors with the correct style, e.g. only change the foreground color of a single word. + +

Before

+

+ +

After

+

+ +
+ +# 0.17.0 + +![Release Date: 2021-07-10](https://img.shields.io/static/v1.svg?style=flat-square&label=Release%20Date&message=2021-07-10&colorA=4c566a&colorB=88c0d0) [![Project Board](https://img.shields.io/static/v1.svg?style=flat-square&label=Project%20Board&message=0.17.0&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0)](https://github.com/nordtheme/vim/projects/23) [![Milestone](https://img.shields.io/static/v1.svg?style=flat-square&label=Milestone&message=0.17.0&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0)](https://github.com/nordtheme/vim/milestone/19) + +⇅ [Show all commits][101] + +## Features + +### Syntax + +
+Support for nvim-treesitter/nvim-treesitter — #235 ⇄ #253 (⊶ b3e712a9) by @s-u-d-o-e-r and @mrswats + +↠ Neovim [version 0.5][102] is a long-time awaited update that introduces features like support for [tree-sitter][105] via [nvim-treesitter][104] and [LSP][7] via [nvim-lspconfig][8]. +Even though Neovim divides more and more from Vim through specific features like first-class Lua support with custom APIs, the highlighting for tree-sitter is achieved through “normal“ syntax highlighting groups. Most of the groups are already [linked by the `nvim-treesitter` plugin by default][103] so only a few groups have been adjusted for now to fit the Nord style. + +⚠️ Note that this is the first iteration and **it is very likely that there will be inconsistencies compared to the current highlighting when using “normal“ Vim plugins per language**. Please **report any problem** you find so that the support for tree-sitter can be improved continuously! + +
+ +# 0.16.0 + +![Release Date: 2021-06-09](https://img.shields.io/static/v1.svg?style=flat-square&label=Release%20Date&message=2021-06-09&colorA=4c566a&colorB=88c0d0) [![Project Board](https://img.shields.io/static/v1.svg?style=flat-square&label=Project%20Board&message=0.16.0&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0)](https://github.com/nordtheme/vim/projects/22) [![Milestone](https://img.shields.io/static/v1.svg?style=flat-square&label=Milestone&message=0.16.0&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0)](https://github.com/nordtheme/vim/milestone/18) + +⇅ [Show all commits][88] + +## Features + +### API + +
+Public API function NordPalette to get Nord colors — #224 (⊶ 5867535c) by @jandamm + +↠ Implemented a new `NordPalette` pubic API function that returns all [Nord colors][87] as dictionary. This allows to use the colors in other Vim scripts without the need to copy & paste the colors from the documentations or the [Nord Vim theme sources][85]. + +
+ +### Syntax + +
+Support for the php.vim plugin — #218, #262 ⇄ #263 (⊶ b3c46c87, 07452c71) by @pirey + +↠ In [nordtheme/vim#218][84] new highlighting groups for the bundled PHP syntax were added to improve the highlighting of classes, function and methods and the overall syntax token detection, but they are actually defined by the [php.vim][98] plugin. Therefore the added highlighting calls have been moved to a plugin section. +Additionally, the `phpClassExtends` and `phpClassImplements` groups have been added to improve the highlighting for classes that implement or extended interfaces/classes. The `phpUseClass` has also been added to improve the highlighting for imports. + +To improve the highlighting with the bundled PHP syntax, the [following options][99] can be set: + +```vim +let php_asp_tags = 1 +let php_baselib = 1 +let php_htmlInStrings = 1 +let php_parent_error_close = 1 +let php_parent_error_open = 1 +``` + +

Before

+

+ +

After

+

+ +
+ +
+Conceal highlighting group support — #149, #207, #211, #256 ⇄ #261 (⊶ f3f28b93) + +↠ The `Conceal` group is was not supported which could resulted in rendering problems for (Unicode) characters that require special encoding like the ones from the [Greek alphabet][100] and [mathematical expressions][97] that are often used in [LaTeX][92] or [Pandoc][9] documents. These characters were highlighted with the default background color which made them kind of unreadable with the theme foreground color. +See `:help conceal` and `:help concealcursor` for more details about concealing in Vim. + +To fix the problem, the `Conceal` group has been added with its background color set to `NONE` for GUI and terminal mode to either use the terminal default background color or let loaded scripts apply custom styles based on the current runtime context. + +The problem has been reported in #149, #207 and #211 with LaTeX and Pandoc being used by the reporters. PR #220 adds support for [vim-pandoc/vim-pandoc-syntax][13] specific highlighting groups and can be merged after adding basic support for `Conceal`. + +To get the correct rendering for such elements the following configurations must be set: + +```vim +let g:pandoc#syntax#conceal#use = 1 +set conceallevel=2 +``` + +

Before

+

+ +

After

+

+ +
+ +
+Updated highlights for Neovim LSP diagnostics — #229, #248 (⊶ a3af928a) by @gbrlsnchs and @thallium + +↠ To ensure compatibility with the latest versions of Neovim LSP the highlighting groups for diagnostics have been adapted to the changes of [neovim/neovim#12655][96]. +See [`:help lsp-highlight-diagnostics`][7] for more details. + +Note that LSP will be available as of [Neovim 0.5][95] which is (at the time of this commit) still in development and only available as nightly build. +Also see great articles from Nord Vim contributors like [“Neovim (0.5) Is Overpowering“][86] for more information about Neovim 0.5 features, including LSP. + +Thanks to [@clason][89], [@crispgm][90] and [@ojroques][91] for the review support! + +
+ +### UI + +
+Support for the vim-indent-guides plugin — #186 ⇄ #226 (⊶ ea7ff9c3) by @mitinarseny + +↠ Added support for the [vim-indent-guides][93] plugin. The even and odd highlighting blocks using `nord1` and `nord2` (`nord3`in terminal mode) to provide a subtle and non-disturbing style. +Note that the [custom theme colors][94] are only applied when the `indent_guides_auto_colors` variable has been set to `0`: + +```vim +let g:indent_guides_auto_colors = 0 +``` + +

Before

+

+ +

After

+

+ +
+ +## Improvements + +### UI + +
+coc.vim error and warning highlighting — #213 (⊶ 8a9754ce) by @butterywombat + +↠ Added the [coc.nvim][6] highlighting groups for errors and warnings using their respective foreground colors and the `undercurl` font style. + +
+ +## Bug Fixes + +### UI + +
+Typo in group Pmenu group names — #252 (⊶ e5a54c7f) by @kunzaatko + +↠ Fixed two typos in `Pmenu` group names: + +- `PMenuSel` -> `PmenuSel` +- `PMenu` -> `Pmenu` + +This mismatch was never really noticed because most of the time users rely on plugins like [coc.vim][6] or [vim-clap][5] which come with custom highlighting groups and UI libraries. + +
+ +# 0.15.0 + +![Release Date: 2020-07-06](https://img.shields.io/badge/Release_Date-2020--07--06-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.15.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/21) [![Milestone](https://img.shields.io/badge/Milestone-0.15.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/17) + +## Features + +### Syntax + +**Extended support for TypeScript and TSX** — #208 (⊶ 1bd44ade) by [@iamdidev][78] +↠ Added extended support for [TypeScript][83] and [TSX][82] through the [yats.vim][80] plugin. +This provides, among many other good changes, better highlighting for syntax elements like [decorators][81], more granular separation of different language elements within a single code line as well as highlighting for… + +

…interfaces with bold font style, typing characters and types.

+

+ +

…global methods like setTimeout with italic font style.

+

+ +

…regular expressions with nord13 instead of the normal color for quoted strings.

+

+ +

…global elements like Error, JSON and console.

+

+ +

…brackets of types as structural elements.

+

+ +

…TSX/JSX and HTML with a consistent appearance.

+

+ +### UI + +**Support for vim-clap** — #178 (⊶ 7a52f66c) by [@meck][44] and [@ikalnytskyi][79] +↠ Added basic support for [vim-clap][5], a modern and performant generic finder and dispatcher for Vim and NeoVim. + +

+ +# 0.14.0 + +![Release Date: 2020-06-16](https://img.shields.io/badge/Release_Date-2020--06--16-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.14.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/20) [![Milestone](https://img.shields.io/badge/Milestone-0.14.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/16) + +## Features + +### UI + +**Basic support for nvim-lsp (Language Server Protocol)** — #198 (⊶ 0ccf70b6) by [@alexanderjeurissen][74] +↠ Added basic support for [nvim-lsp][76], a collection of common configurations for the NVim language server protocol client. + +## Improvements + +### UI + +**Consistent error highlighting between GUI and terminal mode** — #202 (⊶ 974a9190) by [@xulongwu4][75] +↠ The highlighting of errors in GUI and _true color_ terminal mode now also uses `nord4` as foreground color of instead of `nord0`. + +

Before

+

+

After

+

+ +**Improved highlighting for “More“ separator** — #202 (⊶ 974a9190) by [@xulongwu4][75] +↠ The highlighting of the _More_ separator is now highlighted with the `nord8` accent color. + +

Before

+

+

After

+

+ +**Transparent line number and cursor line background by default** — #204 (⊶ 6323f662) by [@xulongwu4][75] +↠ Before the background color of the `LineNr` and `CursorLineNr` highlighting groups were set to `nord0` which was fine in most cases, but conflicted with plugins like [Yggdroot/LeaderF][77] that renders line numbers in a popup windows with a different background color. + +

Before

+

+

After

+

+ +# 0.13.0 + +![Release Date: 2019-12-17](https://img.shields.io/badge/Release_Date-2019--12--17-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.13.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/19) [![Milestone](https://img.shields.io/badge/Milestone-0.13.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/15) + +## Features + +### UI + +**Support uniform status line background configuration for _vim-airline_ and _lightline.vim_ themes** — #168 ⇄ #169 (⊶ 73b3d340) by [@jmurinello][66] +↠ Added support for the [uniform status line][73] theme configuration, [introduced in version 0.7.0][63] through [nordtheme/vim#58][62], for the bundled _vim-airline_ and _lightline.vim_ themes. + +

lightline.vim

+

Before

+

+

After

+

+ +

vim-airline

+

Before

+

+

After

+

+ +**Basic support for coc.vim (Conquer of Completion)** — #164 (⊶ a7797269) by [@hennessey][65] +↠ Added basic support for [coc.nvim][6], a _Intellisense_ engine for Vim 8 & NeoVim with full language server protocol support. + +**Basic support for _vim-startify_** — #159 ⇄ #176 (⊶ 38ab4a9c) +↠ Added basic support for [vim-startify][69] with custom highlight groups. + +

+ +## Improvements + +### UI + +**No underlined style for gutter line numbers** — #174 ⇄ #185 (⊶ 0d352c4b) by [@nixtrace][67] and [@alexandremjacques][64] +↠ [Vim version 8.1.2029][71] added the [`underline` attribute for the `CursorLineNr` group to `cterm`][70] based on [vim/vim#4933][72]. +This change resulted in gutter line numbers being underlined which has now been reverted back to Nord's style by explicitly setting the attribute for the group to `NONE`. + +

Before

+

+ +

After

+

+ +## Bug Fixes + +### Documentation + +**Fix missing whitespace** — #165 (⊶ 81d80e4a) by [@vasilescur][68] +↠ Fixed a missing whitespace in the README project description. + +# 0.12.0 + +![Release Date: 2019-05-25](https://img.shields.io/badge/Release_Date-2019--05--25-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.12.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/18) [![Milestone](https://img.shields.io/badge/Milestone-0.12.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/14) + +## Features + +**Nord Docs Transition** — #158, #144 ⇄ #160 (⊶ 7be26147) +↠ Transferred all documentations, assets and from „Nord Vim“ to [Nord Docs][1] +Please see the [corresponding issue in the Nord Docs repository][60] to get an overview of what has changed for Nord Vim and what has been done to migrate to Nord Docs. + +###### Landing Page + +

Preview: Nord Vim Port Project Landing Page

+ +###### Landing Page Docs + +

Preview: Nord Vim Docs Project Landing Page

+ +###### Installation & Activation Docs + +

Preview: Nord Vim Docs Installation & Activation Docs Page

+ +###### Configuration Docs + +

Preview: Nord Vim Docs Configuration Docs Page

+ +###### Customization Docs + +

Preview: Nord Vim Docs Configuration Docs Page

+ +**Theme configuration for bold font style rendering** — #143 ⇄ #161 (⊶ 18a4e350) requested by [@tobydeh][59] +↠ Added a new [`nord_bold` theme configuration to allow to explicitly toggle bold font rendering styles][61]. +It is enabled by default when running for both in GUI and terminal mode since most terminals and shells are capable to handle bold fonts. + +

+ +## Improvements + +**Active match for increment search** — #139 ⇄ #140 (⊶ de24841a) by [@aborzunov][58] +↠ The currently active match during increment searches (`IncSearch`) is now highlighted differently (`nord10` as background and `nord6` as foreground) than inactive matches for a better visual distinction. + +

+ +# 0.11.0 + +![Release Date: 2019-04-18](https://img.shields.io/badge/Release_Date-2019--04--18-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.11.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/16) [![Milestone](https://img.shields.io/badge/Milestone-0.11.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/13) + +## Features + +### Syntax + +**Basic support for Asciidoc syntax highlighting** — #131 ⇄ #152 (⊶ 6e6025b9) by [@tidux][46] +↠ Added basic syntax highlighting support for [Asciidoc][39] that comes bundled with Vim 8. + +

+ +**Basic syntax highlighting support for Rust** — #138 ⇄ #154 (⊶ b0ffc6b5) by [@TerminalWitchcraft][45] +↠ Added basic syntax highlighting support for [Rust][55]. + +[Traits][54] and [enums][51] are colorized with `nord7` and with bold font to make them visually stand out more. +Also [attributes][49] and [derives][50] are colored with `nord10`. + +

Before

+ +

After

+ +[Macros][53] are colorized with `nord8` and bold font to make them visually different from "normal" functions. + +

Before

+ +

After

+ +[Escape][52] sequences are colored with `nord13`. + +

Before

+ +

After

+ +Import statements and paths are correctly colored with keyword and type colors. + +

Before

+ +

After

+ +#### Plugin Support + +**Haskell Syntax Plugin Support** — #104 ⇄ #150 (⊶ b0ffc6b5) by [@vabatta][47] +↠ Added support for Haskell syntax through the [neovimhaskell/haskell-vim][48] plugin. +This includes better coloring for types/classes using `nord7` instead of highlighting them like keywords (`nord9`) and pre-processor and pragma elements are now colorized correctly with `nord10`. + +#### Pragma + +

Before

+ +

After

+ +#### Pre-Processor + +

Before

+ +

After

+ +#### Types/Classes + +

Before

+ +

After

+ +### UI + +**Theme config for bolder vertical split line** — #132 ⇄ #153 (⊶ 9059d7d8) by [@huyvohcmc][42] +↠ Previously the [`VertSplit`][57] (`:help VertSplit`) key used `nord1` as background color by default making the line appear to be very lumpy. This has now been changed to use `nord0` as background instead to visually merge with the background so only the separator characters are a visual indicator for the split line which makes it look more lightweight and declutters the overall appearance. + +

With base editor background (default)

+ +

With enabled bold nord1 background

+ +To allow user who liked the previous implementation to keep the style a new `nord_bold_vertical_split_line` theme config was also added that can be assigned to `1` to achieve the legacy design. + +```viml +let g:nord_bold_vertical_split_line = 1 +``` + +The README includes information and hints how to change the separator character by customizing Vim's [`fillchars`][56] (`:help fillchars`) variable. + +#### Plugin Support + +**`:terminal` status line in airline** — #134 (⊶ be815f09) by [@meck][44] +↠ Added support for Vim's new `:terminal` mode in [airline][4]. + +

Before: No :terminal support (before)

+ +

After: Support for airline's new _term theme keys

+ +## Improvements + +### Syntax + +**Better generator expressions in CMake** — #137 ⇄ #151 (⊶ d2774cbb) by [@markand][43] +↠ [CMake generator expressions][40] are now highlighted using `nord10` as foreground instead of `nord13` as background and `nord0` as foreground. + +

Before

+ +

After

+ +### UI + +#### Plugin Support + +**airline warnings and errors** — #130 (⊶ e85dbe75) by [@axelitus][41] +↠ Added support for error and warning elements of [airline][4]. + +

Before

+ +

After

+ +**ALE error and warning support** — #135 (⊶ 9d82b7a1) by [@meck][44] +↠ Added support highlighting and underlines for [ALE][10] errors and warnings to also align the style with gutter signs. + +# 0.10.0 + +![Release Date: 2019-03-21](https://img.shields.io/badge/Release_Date-2019--03--21-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.10.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/15) [![Milestone](https://img.shields.io/badge/Milestone-0.10.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/12) + +## Features + +**Vim 8 terminal highlighting** — #125 ⇄ #126 (⊶ 83f8c260) by [@cg433n][38] +↠ Added support for the Vim's built-in terminal (`:terminal`) that comes with version 8.0.0 and higher. + +## Improvements + +**Comment Color Brightness** — #145 ⇄ #146 (⊶ 9e0249ca) +↠ Implemented the increase of the comment color (`nord3`) brightness by 10% from a lightness level of ~35% to ~45%. + +➜ **Please see [nordtheme/nord#94][36] for all details about this design change decision**! + +⚠ **NOTE**: This change also **deprecates the [comment contrast][11] configuration** that will be removed in Nord Vim version 1.0.0! +The default comment color has been adjusted so the configuration is not required anymore for users to increase the brightness on their own. +To notify users about this change a deprecation warning will be shown when the `g:nord_comment_brightness` configuration variable has been set and initialized through the user's configuration. + +**Improved compatibility of airline with tmuxline.vim plugin** — #117 ⇄ #128 (⊶ 3150628f) +↠ The [Nord airline.vim][4] UI plugin theme now includes better support for the [tmuxline.vim][37] plugin. Previously text shown in the main segment of the _tmuxline_, generated via the `:Tmuxline airline` command, caused a `bad colour: NONE` error or has been colorized using `nord0` which resulted in unreadable text due to a `nord3` background. + +This has been fixed by using `nord5` as foreground color. …[#11][34] was used as implementation reference since it fixed the same incompatibility for the [lightline.vim][35] plugin. + +![](https://user-images.githubusercontent.com/7836623/41835439-e3f2388c-7857-11e8-91e0-a0440b7ecf35.png) + +# 0.9.0 + +![Release Date: 2018-06-24](https://img.shields.io/badge/Release_Date-2018--06--24-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.9.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/13) [![Milestone](https://img.shields.io/badge/Milestone-0.9.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/11) + +## Features + +### Syntax + +#### Plugin Support + +❯ Added support for the [YAML][33] plugin [stephpy/vim-yaml][29] which improves the highlighting for keys to match the JSON syntax style. (PR #120, @mdzhang, b1478b07) + +

Before

+ +

After

+ +❯ Added basic syntax highlighting support for [vimwiki][30]. (PR #98 in PR #114, @smesko85, 9e7addbc) + +

+ +### UI + +❯ Added a new [configuration to allow users to enable background for the line number of the current line][31]. It can be enabled by setting the `g:nord_cursor_line_number_background` variable to `1`. (PR #100, @andrepolischuk, 035e36de) + +```vim +let g:nord_cursor_line_number_background = 1 +``` + +

No background (default)

+ +

Enabled background

+ +❯ Added a new [configuration to allow users to globally toggle underlines][32] for cases where the terminal emulator might not be capable to handle underlines in terminal mode. It can be enabled by setting the `g:nord_underline` variable to `1`. (#106 in PR #127 (supersedes #109), @dylnmc @markand , 01cfd1be) + +

Underlined Text

+ +❯ Added support for the status line of the `:terminal` window mode for Vim or Neovim. (PR #108 (supersedes #103), @dylnmc, 922504fb) + +

Before

+ +

After

+ +#### Plugin Support + +❯ Added highlighting support for the navigation marks in the sign column of the [kshenoy/vim-signature][28] plugin. (PR #122, @kooparse, 1df39453) + +

+ +## Improvements + +### Syntax + +❯ Added highlighting for the JavaScript keyword `this`. (PR #119, @kristijanhusak, 4fe2d43e) + +

Before

+ +

After

+ +### UI + +❯ The cursor is now correctly shown and visible when leaving a terminal window from within Vim or Neovim by adding the `TermCursorNC` group. (PR #101, @meck, 2fac9fa0) + +❯ The „inline marker“ in unified _diffs_ is now colorized differently than the background of the changed line to make the changes better and faster recognizable. This applies for both the [uniform _diff_ background mode][12] and normal _diff_ mode. (PR #121, @ironhouzi, 65c559ee) + +

Before/After comparison of default diff mode


+ +

Before/After comparison of uniform diff mode


+ +## Bug Fixes + +### UI + +❯ The current line number's color is now highlighted correctly in terminal mode. Previously it was only highlighted when running in GUI mode or when `termguicolors` has been set. (#116 in 50ec737b (PR #100), @huyvohcmc @dylnmc) + +

Before

+ +

After

+ +# 0.8.0 + +![Release Date: 2018-01-05](https://img.shields.io/badge/Release_Date-2018--01--05-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.8.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/11) [![Milestone](https://img.shields.io/badge/Milestone-0.8.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/10) + +## Features + +### Plugin Support + +#### UI + +❯ Added support for [vim-signify][27]. (PR #81, @dabio, edcdd0e4) + +

+ +## Improvements + +### UI + +❯ The color of links in `:help` was the same as normal text making it impossible to to distinguish between both. This has been improved by using `nord8` including the help bars when enabled with `:set conceallevel=2`. (#85 in PR #93, @delphinus, e9974fe6) + +

Before

+ +

After

+ +### Documentation + +❯ The lightline screenshots in the documentation have been made using the [lightline's advanced configurations][26]. This confused users when the lighline does not equal the one seen on the screenshot due to the default lightline configuration. This has now been clarified including a additional screenshot showing the appearance of the lightline when using the default configuration. (#74 in PR #94, @lokesh-krishna, 3c14c961) + +

+ +## Bug Fixes + +❯ The background color for matching parens is now assigned to the right color `nord3` instead of `nord0` in GUI mode. (#95 in PR #96, @dylnmc, 8bc1be01) + +

Before

+ +

After

+ +# 0.7.0 + +![Release Date: 2017-12-30](https://img.shields.io/badge/Release_Date-2017--12--30-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.7.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/10) [![Milestone](https://img.shields.io/badge/Milestone-0.7.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/9) + +## Features + +❯ Added a new [configuration to allow users to increase the comment brightness][11] by 1 - 20 percent. It can be enabled by setting the `g:nord_comment_brightness variable` to a number between `1` and `20`. (#48 in PR #56, @drzel, e18ab4e8) + +**This option should only be enabled if the terminal supports 24bit true color (16 million colors) and requires the `termguicolors` option to be set is in `~/.vimrc` or via `:set termguicolors`!** + +

Default and 15% increased

+ +

Default and 12% increased

+ +To adhere to the Nord design guidelines this option uses `nord3` by default. + +This is a reference table if users like to use the same increased contrast values as provided by the [Nord Atom Syntax accessibility custom comment contrast theme setting][19] which are calculated using the LESSCSS [`lighten`][18] function. + +| Increased by | Calculated value | +| ------------ | ---------------- | +| 1% | `#4e586d` | +| 2% | `#505b70` | +| 3% | `#525d73` | +| 4% | `#556076` | +| 5% | `#576279` | +| 6% | `#59647c` | +| 7% | `#5b677f` | +| 8% | `#5d6982` | +| 9% | `#5f6c85` | +| 10% | `#616e88` | +| 11% | `#63718b` | +| 12% | `#66738e` | +| 13% | `#687591` | +| 14% | `#6a7894` | +| 15% | `#6d7a96` | +| 16% | `#6f7d98` | +| 17% | `#72809a` | +| 18% | `#75829c` | +| 19% | `#78859e` | +| 20% | `#7b88a1` | + +More information about true color and the support in various terminals can be found in [this gist][16]. + +❯ Added a new [configuration for a uniform _diff_ background color][12]. (#60 in PR #61 #62 #65, @dylnmc @aidanharris @berkin, 958322d0) + +![](https://user-images.githubusercontent.com/7836623/30969227-0dbcb982-a462-11e7-86a8-a69e91ff7bc0.png) + +Setting `g:nord_uniform_diff_background` to `1` enables the uniform diff background using `nord1`: + +![](https://user-images.githubusercontent.com/7836623/30969233-12a37d64-a462-11e7-8253-3c083eba5174.png) + +❯ Added a new [configuration to use uniform activate- and inactive status line backgrounds][24]. (#37 in PR #58, @dylnmc @DenniJensen, 93056802) + +

Default status lines

+ +

Uniform status lines

+ +❯ Added a new [configuration to explicitly enable italic text formatting][23]. (#88 in PR #89, @lokesh-krishna @dylnmc, dbfc55ff) + +**Please note that this option should only be enabled if the used terminal supports italics!** + +

With enabled option for italic comments

+ +

Markdown syntax styling

+ +❯ Added support for NeoVim UI terminal colors. (#63, @meck, af01167b) + +### Plugin Support + +#### Syntax + +❯ Added support for the [plasticboy/vim-markdown][21] syntax plugin to match the style of the built-in markdown syntax styles. (#45 in PR #57, @VVVFO, 09921268) + +![](https://user-images.githubusercontent.com/7836623/30773618-63ffde56-a074-11e7-9452-121283afcb44.png) + +![](https://user-images.githubusercontent.com/7836623/30773619-657ec968-a074-11e7-80ba-c1cf3a3c19b0.png) + +#### UI + +❯ Added support for the `PlugClean` command of the [junegunn/vim-plug][20] plugin which used the `Ignore` group by default for deleted directory listings resulting in unreadable text when `cursorline` has been set. (#43 in PR #59, @dylnmc, e532b5d6) + +

Before

+ +

After

+ +❯ Added basic support for [tpope/vim-fugitive][22]. (#76 in PR #77, @anhari, fa09c3b1) + +Filenames are now highlighted when using the `:Gstatus` command. + +![](https://user-images.githubusercontent.com/6628875/33404056-def50276-d530-11e7-8e76-5733f58f7139.gif) + +## Improvements + +### Syntax + +❯ Added highlight support for legacy _diff_ groups `diffAdded` and `diffRemoved` of the `git.vim` and `diff.vim` syntx definitions. (#66 in PR #67, @brandoniffert, 99e59e67) + +These groups are not in the [official vim documentation][25] but are still used by the syntax for example when run with `git commit --verbose`. + +

Before

+ +

After

+ +❯ Added highlighting support for Markdown _italic_ and **bold** delimiter. (#90 in PR #92, 97c8aa24) + +

Before

+ +

After

+ +❯ Added missing Markdown _italic_ and **bold** groups. (#84 in PR #91, @lokesh-krishna @dylnmc, 63b46125) + +❯ Improved the highlighting for matching parens. (#75 and #71 in PR #78, @vincentzhezhang @cryptomaniac512 @dylnmc, 8eb7b2a6) + +The background color intensity under the cursor was too bright and the cursor no more visible causing the user to be distracted to focus on the matching bracket instead of the bracket at the cursor position. + +To optimally improve the highlighting `nord3` will now be used as background color for the matching element which doesn't conflict with the `cursorline` color and also stands out in order to see the matching element. + +

Before

+ +

After with cursorline option

+ +

After without cursorline option

+ +

+ +## Bug Fixes + +❯ _TODO_ keywords are now highlighted correctly for Neovim and gVim (#52 in PR #53, @dylnmc, 063620f0) + +

Before

+ +

After

+ +❯ Fixed invisible inactive lightline bars (PR #73, @dylnmc, 788876b8) + +

Before

+ +

After

+ +❯ Fixed the `WildMenu` background color for current selection (tab completion) not being visible. (#64 in PR #80, @markand, 53fce0db) + +

Before

+ +

After

+ +## Tasks + +❯ Added the included [lightline theme to the official lightline repository][17]. (#68 in [itchyny/lightline#257][17], @lokesh-krishna, itchyny/lightline@e69081c1370a57647e05df21b60a4ef092c3ce91) + +### Documentation + +❯ Migrated to the MIT license to adapt to the migration of the main [Nord][3] project. Detailed information can be found in the [main task ticket][15]. (#69 in PR #70, fa55dc35) + +# 0.6.0 + +![Release Date: 2017-08-03](https://img.shields.io/badge/Release_Date-2017--08--03-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.6.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/9) [![Milestone](https://img.shields.io/badge/Milestone-0.6.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/8) + +## Features + +### Plugin Support + +#### UI + +❯ Added basic support for [CtrlP][14]. (PR #33, @syedelec) + +- Matched characters are using the keyword color instead of the normal text color to make matched characters visible +- Already opened buffers now take the normal text color instead of the comment color + +❯ Added basic support [ALE][10]. (PR #44, @meck) + +- Warning signs are colorized using a `nord13` foreground +- Error signs are colorized using a `nord11` foreground instead of a red background with a white foreground + +## Improvements + +### UI + +❯ The fold marker foreground has been adjusted to match the comment color instead of `nord1` which has been too dark causing them to be unreadable in bright environments. The background color has also been changed to `nord1` to differ from normal comments and the font style is now bold for better legibility. (#38 in PR #40, @dylnmc) + +![](https://user-images.githubusercontent.com/7836623/28256249-ad23fa02-6ac0-11e7-873d-584303677662.png) + +❯ The highlight text of a active substitute search result is now underlined in order to make it more recognizable. (#35 in PR #41, @KevinSjoberg) + +![](https://user-images.githubusercontent.com/7836623/28245896-ebd3abae-6a10-11e7-9e83-85b69cb62455.gif) + +#### Neovim + +❯ Addded support for the Neovim specific `:CheckHealth` status highlight groups. (#31 in PR #42, @syedelec, Thanks to @dylnmc) + +

Before
After

+ +## Bug Fixes + +### UI + +❯ Fixed unreadable text color on pending search result highlights. (#32 in PR #39, @syedelec) + +

Before

After

+ +# 0.5.0 + +![Release Date: 2017-04-17](https://img.shields.io/badge/Release_Date-2017--04--17-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.5.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/8) [![Milestone](https://img.shields.io/badge/Milestone-0.5.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/7) + +## Improvements + +### Language Support + +❯ Implemented optimized styles for Ruby (@hahuang65, #29, 085c1337) + +- Symbols (`rubySymbol`) now have a bold font style +- Block parameter list symbols (`rubyBlockParameterList`) are now colorized as keywords +- Local (variable) methods (`rubyLocalVariableOrMethod`) are now colorized as methods + +

+ +## Bug Fixes + +### Documentation + +❯ Fixed a typo in the project description. (@svengreb, #28, b2134029) + +# 0.4.0 + +![Release Date: 2017-02-23](https://img.shields.io/badge/Release_Date-2017--02--23-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.4.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/7) [![Milestone](https://img.shields.io/badge/Milestone-0.4.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/6) + +## Features + +### Configurations + +❯ Added a configuration to enable [italic comments](https://github.com/nordtheme/vim#italic-comments). +To adhere to the Nord style guide this option is disabled by default. It can be enabled by setting the `g:nord_italic_comments` variable to `1`. + +```vim +let g:nord_italic_comments = 1 +``` + +(@kepbod, #13 (PR #16), dc6149f4) + +## Improvements + +### Plugin Support + +❯ The method/function signature live preview of the [`jedi-vim`](https://github.com/davidhalter/jedi-vim) plugin is now colorized correctly. (@mkalinski, #14, a5c3459a) + +

Before

After

+ +### Language Support + +❯ Implemented optimized styles for the Python syntax group `pythonEscape`. (@mkalinski, #22, 360a76ea) +![ghi-22-scrot-pythonescape](https://cloud.githubusercontent.com/assets/7836623/22618370/ad74e7fc-eada-11e6-89f2-23b351e8aa2b.png) + +❯ Implemented optimized styles for the SQL syntax groups `sqlSpecial` which is now linked to the `sqlKeyword` group to colorize constants like `true`/`false` and `null` as keywords. (@mkalinski, #23, dcfb441e) + +### Documentation + +❯ Added the new terminal emulator port project [Nord Hyper](https://github.com/arcticicestudio/nord-hyper) +[![Nord Hyper](https://cdn.rawgit.com/nordtheme/nord/develop/src/assets/nord-hyper-banner.svg)](https://github.com/arcticicestudio/nord-hyper) + +# 0.3.0 + +![Release Date: 2017-01-24](https://img.shields.io/badge/Release_Date-2017--01--24-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.3.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/6) [![Milestone](https://img.shields.io/badge/Milestone-0.3.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/5) + +## Improvements + +### Plugin Support + +❯ The [Nord lightline.vim][2] UI plugin theme now includes better support for the [tmuxline.vim](https://github.com/edkolev/tmuxline.vim) plugin. Before this implementation text shown in the main segment of the tmuxline, generated via the `:Tmuxline lightline` command, has been colorized using `nord0` which resulted in unreadable text due to a `nord3` background. +This has been fixed by using `nord5` as foreground color. (@scottwillmoore, #11, 4ea37f7e) + +

Before

After

With unicode separators

Without specified configurations (tmuxline.vim autodetect)

+ +## Bug Fixes + +### Documentation + +❯ Fixed a typo in the [README installation guide](https://github.com/nordtheme/vim#via-pluginruntimepath-manager) for Vundle. (@kepbod, #10, 29145bbb) + +❯ Fixed the banner of the [Nord iTerm2](https://github.com/arcticicestudio/nord-iterm2) port project showing the [Nord GNOME Terminal](https://github.com/arcticicestudio/nord-gnome-terminal) banner instead. (@shvetsovdm, #8 / [nord/#9](https://github.com/nordthenme/nord/issues/9), 7a447b40) + +# 0.2.0 + +![Release Date: 2017-01-02](https://img.shields.io/badge/Release_Date-2017--01--02-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.2.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/5) [![Milestone](https://img.shields.io/badge/Milestone-0.2.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/4) + +## Improvements + +❯ Characters under block cursors are now colored darker (`nord0`) while the block cursor is visible to achieve a optimal contrast and to avoid unreadability due to the same cursor- and foreground color (`nord4`). (@svengreb / @scottwillmoore, #9, 30e1f7e3) + +

Before

After

+ +❯ The background color of visual mode selections is now colored in `nord1` instead of `nord3` to avoid a color collision with comments which has led to unreadable text.(@scottwillmoore, #7, bdb209f5) + +

Before

After

+ +# 0.1.2 + +_2017-01-01_ + +![Release Date: 2017-01-01](https://img.shields.io/badge/Release_Date-2017--01--01-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.1.2-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/4) [![Milestone](https://img.shields.io/badge/Milestone-0.1.2-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/3) + +## Bug Fixes + +❯ Fixed a bug where the `g:colors_name` variable has been unset caused by the `syntax reset` call due to the execution +order. (@shuei72, #5, f8ffce24) + +# 0.1.1 + +![Release Date: 2016-12-26](https://img.shields.io/badge/Release_Date-2016--12--26-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.1.1-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/3) [![Milestone](https://img.shields.io/badge/Milestone-0.1.1-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/2) + +## Bug Fixes + +❯ Fixed wrong color variables (`*_term` to `*_gui`) for the `guisp` attribute of all `Spell*` highlighting groups which caused error logs while loading `vim`/`gvim`/MacVim. (@kamwitsta, #4, 4d642b9b) + +# 0.1.0 + +![Release Date: 2016-12-25](https://img.shields.io/badge/Release_Date-2016--12--25-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.1.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/projects/2) [![Milestone](https://img.shields.io/badge/Milestone-0.1.0-88C0D0.svg?style=flat-square)](https://github.com/nordtheme/vim/milestone/1) + +## Features + +Detailed information about features, supported plugins/languages and install instructions can be found in the [README](https://github.com/nordtheme/vim/blob/main/readme.md#installation) and in the [project wiki](https://github.com/nordtheme/vim/wiki). + +❯ Implemented the main color theme file [`nord.vim`](https://github.com/nordtheme/vim/blob/main/colors/nord.vim). (@svengreb, #1, e2832b9) + +

+ +❯ Implemented the [lightline](https://github.com/itchyny/lightline.vim) color scheme file [`nord.vim`](https://github.com/nordtheme/vim/blob/main/autoload/lightline/colorscheme/nord.vim). (@svengreb, #2, f9891ffe) + +

+ +❯ Implemented the [airline](https://github.com/vim-airline/vim-airline) color theme file [`nord.vim`](https://github.com/nordtheme/vim/blob/main/autoload/airline/themes/nord.vim). (@svengreb, #3, e54464a7) + +

+ +# Project Initialization + +![Release Date: 2016-12-25](https://img.shields.io/badge/Release_Date-2016--12--25-88C0D0.svg?style=flat-square) + + + + + + + +[1]: https://www.nordtheme.com +[2]: https://github.com/nordtheme/vim/blob/main/autoload/lightline/colorscheme/nord.vim +[3]: https://github.com/nordtheme/nord + + + +[4]: https://github.com/nordtheme/vim/blob/main/autoload/airline/themes/nord.vim +[5]: https://github.com/liuchengxu/vim-clap +[6]: https://github.com/neoclide/coc.nvim +[7]: https://neovim.io/doc/user/lsp.html +[8]: https://github.com/neovim/nvim-lspconfig +[9]: https://pandoc.org +[10]: https://github.com/w0rp/ale +[11]: https://github.com/nordtheme/vim#comment-contrast +[12]: https://github.com/nordtheme/vim#uniform-diff-background +[13]: https://github.com/vim-pandoc/vim-pandoc-syntax +[44]: https://github.com/meck + + + +[14]: https://github.com/ctrlpvim/ctrlp.vim + + + +[15]: https://github.com/nordtheme/nord/issues/55 +[16]: https://gist.github.com/XVilka/8346728 +[17]: https://github.com/itchyny/lightline.vim/pull/257 +[18]: http://lesscss.org/functions/#color-operations-lighten +[19]: https://github.com/arcticicestudio/nord-atom-syntax/pull/47 +[20]: https://github.com/junegunn/vim-plug +[21]: https://github.com/plasticboy/vim-markdown +[22]: https://github.com/tpope/vim-fugitive +[23]: https://github.com/nordtheme/vim#italic-support +[24]: https://github.com/nordtheme/vim#uniform-status-lines +[25]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#hl-DiffAdd + + + +[26]: https://github.com/itchyny/lightline.vim#advanced-configuration +[27]: https://github.com/mhinz/vim-signify + + + +[28]: https://github.com/kshenoy/vim-signature +[29]: https://github.com/stephpy/vim-yaml +[30]: https://github.com/vimwiki/vimwiki +[31]: https://github.com/nordtheme/vim#line-number-background +[32]: https://github.com/nordtheme/vim#underline-support +[33]: http://yaml.org + + + +[34]: https://github.com/nordtheme/vim/issues/11 +[35]: https://github.com/itchyny/lightline.vim +[36]: https://github.com/nordtheme/nord/issues/94 +[37]: https://github.com/edkolev/tmuxline.vim +[38]: https://github.com/cg433n + + + +[39]: https://asciidoctor.org +[40]: https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html +[41]: https://github.com/axelitus +[42]: https://github.com/huyvohcmc +[43]: https://github.com/markand +[45]: https://github.com/terminalwitchcraft +[46]: https://github.com/tidux +[47]: https://github.com/vabatta +[48]: https://github.com/neovimhaskell/haskell-vim +[49]: https://doc.rust-lang.org/reference/attributes.html +[50]: https://doc.rust-lang.org/edition-guide/rust-2018/macros/custom-derive.html +[51]: https://doc.rust-lang.org/1.1.0/book/enums.html +[52]: https://doc.rust-lang.org/reference/tokens.html#ascii-escapes +[53]: https://doc.rust-lang.org/1.8.0/book/macros.html +[54]: https://doc.rust-lang.org/book/ch10-02-traits.html +[55]: https://www.rust-lang.org +[56]: http://vimdoc.sourceforge.net/htmldoc/options.html#'fillchars' +[57]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#hl-VertSplit + + + +[58]: https://github.com/aborzunov +[59]: https://github.com/tobydeh +[60]: https://github.com/arcticicestudio/nord-docs/issues/143 +[61]: https://www.nordtheme.com/ports/vim/configuration#bold-styles + + + +[62]: https://github.com/nordtheme/vim/pull/58 +[63]: https://github.com/nordtheme/vim/releases/tag/v0.7.0 +[64]: https://github.com/alexandremjacques +[65]: https://github.com/hennessey +[66]: https://github.com/jmurinello +[67]: https://github.com/nixtrace +[68]: https://github.com/vasilescur +[69]: https://github.com/mhinz/vim-startify +[70]: https://github.com/vim/vim/compare/d9b0d83b13d2691e4544709abd87eac004715175...017ba07fa2cdc578245618717229444fd50c470d#diff-80fffb3e9c20e93e5b2328a9a20e19c +[71]: https://github.com/vim/vim/releases/tag/v8.1.2029 +[72]: https://github.com/vim/vim/pull/4933 +[73]: https://www.nordtheme.com/docs/ports/vim/configuration#uniform-status-lines + + + +[74]: https://github.com/alexanderjeurissen +[75]: https://github.com/xulongwu4 +[76]: https://github.com/neovim/nvim-lsp +[77]: https://github.com/Yggdroot/LeaderF + + + +[78]: https://github.com/iamdidev +[79]: https://github.com/ikalnytskyi +[80]: https://github.com/HerringtonDarkholme/yats.vim +[81]: https://www.typescriptlang.org/docs/handbook/decorators.html +[82]: https://www.typescriptlang.org/docs/handbook/jsx.html +[83]: https://www.typescriptlang.org + + + +[84]: https://github.com/nordtheme/vim/pull/218 +[85]: https://github.com/nordtheme/vim/blob/main/colors/nord.vim +[86]: https://crispgm.com/page/neovim-is-overpowering.html +[87]: https://www.nordtheme.com/docs/colors-and-palettes +[88]: https://github.com/nordtheme/vim/compare/v0.15.0...v0.16.0 +[89]: https://github.com/clason +[90]: https://github.com/crispgm +[91]: https://github.com/ojroques +[92]: https://www.latex-project.org +[93]: https://github.com/nathanaelkane/vim-indent-guides +[94]: https://github.com/nathanaelkane/vim-indent-guides#setting-custom-indent-colors +[95]: https://github.com/neovim/neovim/milestone/19 +[96]: https://github.com/neovim/neovim#12655 +[97]: https://www.overleaf.com/learn/latex/mathematical_expressions +[98]: https://github.com/StanAngeloff/php.vim +[99]: https://vimhelp.org/syntax.txt.html#ft%2dphp%2dsyntax +[100]: https://en.wikipedia.org/wiki/Greek_alphabet + + + +[101]: https://github.com/nordtheme/vim/compare/v0.16.0...v0.17.0 +[102]: https://github.com/neovim/neovim/releases/tag/v0.5.0 +[103]: https://github.com/nvim-treesitter/nvim-treesitter/blob/90f15d9/plugin/nvim-treesitter.vim +[104]: https://github.com/nvim-treesitter/nvim-treesitter +[105]: https://github.com/tree-sitter/tree-sitter + + + +[106]: https://github.com/nordtheme/vim/compare/v0.17.0...v0.18.0 +[107]: https://neovim.io/doc/user/lsp.html#lsp-highlight-codelens +[108]: https://github.com/nvim-treesitter/nvim-treesitter/blob/fb5d6e04/doc/nvim-treesitter.txt#L493-L495 +[109]: https://github.com/nvim-treesitter/nvim-treesitter/issues/1016#issuecomment-797049591 +[110]: https://github.com/nvim-treesitter/nvim-treesitter/issues/78#issuecomment-647140700 + + + +[111]: https://github.com/nordtheme/vim/compare/v0.18.0...v0.19.0 +[112]: https://github.com/neovim/neovim/releases/tag/v0.6.0 +[113]: https://github.com/neovim/neovim/commit/a5bbb932f9094098bd656d3f6be3c58344576709#diff-51fab2b766d0a3b606462e95de492190df173b7296147912307cdad636cd492aR77 +[114]: https://github.com/neovim/neovim/blob/f92a2457c2e7ad14d9a5a907ef4213fa770b6d95/runtime/doc/lsp.txt#L423 +[115]: https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight +[116]: https://github.com/vim/vim/blob/0e6adf8a29d5c2c96c42cc7157f71bf22c2ad471/runtime/syntax/c.vim#L313-L375 +[117]: https://github.com/neovim/neovim/blob/70db972e5fbcab39946ad8ac05472a693cf65b68/runtime/doc/lsp.txt#L456-L459 +[118]: https://vimhelp.org/builtin.txt.html#builtin.txt#get%28%29 +[119]: https://vimhelp.org/builtin.txt.html#builtin.txt#execute%28%29 diff --git a/vim/.config/vim/plugged/nord-vim/colors/nord.vim b/vim/.config/vim/plugged/nord-vim/colors/nord.vim new file mode 100755 index 0000000..b50a004 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/colors/nord.vim @@ -0,0 +1,838 @@ +" Copyright (c) 2016-present Sven Greb +" This source code is licensed under the MIT license found in the license file. + +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let g:colors_name = "nord" +let s:nord_vim_version="0.19.0" +set background=dark + +let s:nord0_gui = "#2E3440" +let s:nord1_gui = "#3B4252" +let s:nord2_gui = "#434C5E" +let s:nord3_gui = "#4C566A" +let s:nord3_gui_bright = "#616E88" +let s:nord4_gui = "#D8DEE9" +let s:nord5_gui = "#E5E9F0" +let s:nord6_gui = "#ECEFF4" +let s:nord7_gui = "#8FBCBB" +let s:nord8_gui = "#88C0D0" +let s:nord9_gui = "#81A1C1" +let s:nord10_gui = "#5E81AC" +let s:nord11_gui = "#BF616A" +let s:nord12_gui = "#D08770" +let s:nord13_gui = "#EBCB8B" +let s:nord14_gui = "#A3BE8C" +let s:nord15_gui = "#B48EAD" + +let s:nord1_term = "0" +let s:nord3_term = "8" +let s:nord5_term = "7" +let s:nord6_term = "15" +let s:nord7_term = "14" +let s:nord8_term = "6" +let s:nord9_term = "4" +let s:nord10_term = "12" +let s:nord11_term = "1" +let s:nord12_term = "11" +let s:nord13_term = "3" +let s:nord14_term = "2" +let s:nord15_term = "5" + +let s:nord3_gui_brightened = [ + \ s:nord3_gui, + \ "#4e586d", + \ "#505b70", + \ "#525d73", + \ "#556076", + \ "#576279", + \ "#59647c", + \ "#5b677f", + \ "#5d6982", + \ "#5f6c85", + \ "#616e88", + \ "#63718b", + \ "#66738e", + \ "#687591", + \ "#6a7894", + \ "#6d7a96", + \ "#6f7d98", + \ "#72809a", + \ "#75829c", + \ "#78859e", + \ "#7b88a1", +\ ] + +let g:nord_bold = get(g:, "nord_bold", 1) +let s:bold = (g:nord_bold == 0) ? "" : "bold," + +let g:nord_underline = get(g:, "nord_underline", 1) +let s:underline = (g:nord_underline == 0) ? "NONE," : "underline," + +let g:nord_italic = get(g:, "nord_italic", (has("gui_running") || $TERM_ITALICS == "true")) +let s:italic = (g:nord_italic == 0) ? "" : "italic," + +let g:nord_italic_comments = get(g:, "nord_italic_comments", 0) +let s:italicize_comments = (g:nord_italic_comments == 0) ? "" : get(s:, "italic") + +let g:nord_uniform_status_lines = get(g:, "nord_uniform_status_lines", 0) + +let g:nord_bold_vertical_split_line = get(g:, "nord_bold_vertical_split_line", 0) +if exists("g:nord_comment_brightness") + echohl WarningMsg + echomsg 'nord: warning: Variable g:nord_comment_brightness has been deprecated and will be removed in version 1.0.0!' . + \' The comment color brightness has been increased by 10% by default.' . + \' Please see https://github.com/nordtheme/vim/issues/145 for more details.' + echohl None + let g:nord_comment_brightness = 10 +endif +let g:nord_cursor_line_number_background = get(g:, "nord_cursor_line_number_background", 0) +let g:nord_uniform_diff_background = get(g:, "nord_uniform_diff_background", 0) + +function! s:hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp) + let cmd = "" + if a:guifg != "" + let cmd = cmd . " guifg=" . a:guifg + endif + if a:guibg != "" + let cmd = cmd . " guibg=" . a:guibg + endif + if a:ctermfg != "" + let cmd = cmd . " ctermfg=" . a:ctermfg + endif + if a:ctermbg != "" + let cmd = cmd . " ctermbg=" . a:ctermbg + endif + if a:attr != "" + let cmd = cmd . " gui=" . a:attr . " cterm=" . substitute(a:attr, "undercurl", s:underline, "") + endif + if a:guisp != "" + let cmd = cmd . " guisp=" . a:guisp + endif + if cmd != "" + exec "hi " . a:group . cmd + endif +endfunction + +"+---------------+ +"+ UI Components + +"+---------------+ +"+--- Attributes ---+ +call s:hi("Bold", "", "", "", "", s:bold, "") +call s:hi("Italic", "", "", "", "", s:italic, "") +call s:hi("Underline", "", "", "", "", s:underline, "") + +"+--- Editor ---+ +call s:hi("ColorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "") +call s:hi("Cursor", s:nord0_gui, s:nord4_gui, "", "NONE", "", "") +call s:hi("CursorLine", "", s:nord1_gui, "NONE", s:nord1_term, "NONE", "") +call s:hi("Error", s:nord4_gui, s:nord11_gui, "", s:nord11_term, "", "") +call s:hi("iCursor", s:nord0_gui, s:nord4_gui, "", "NONE", "", "") +call s:hi("LineNr", s:nord3_gui, "NONE", s:nord3_term, "NONE", "", "") +call s:hi("MatchParen", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "", "") +call s:hi("NonText", s:nord2_gui, "", s:nord3_term, "", "", "") +call s:hi("Normal", s:nord4_gui, s:nord0_gui, "NONE", "NONE", "", "") +call s:hi("Pmenu", s:nord4_gui, s:nord2_gui, "NONE", s:nord1_term, "NONE", "") +call s:hi("PmenuSbar", s:nord4_gui, s:nord2_gui, "NONE", s:nord1_term, "", "") +call s:hi("PmenuSel", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "", "") +call s:hi("PmenuThumb", s:nord8_gui, s:nord3_gui, "NONE", s:nord3_term, "", "") +call s:hi("SpecialKey", s:nord3_gui, "", s:nord3_term, "", "", "") +call s:hi("SpellBad", s:nord11_gui, s:nord0_gui, s:nord11_term, "NONE", "undercurl", s:nord11_gui) +call s:hi("SpellCap", s:nord13_gui, s:nord0_gui, s:nord13_term, "NONE", "undercurl", s:nord13_gui) +call s:hi("SpellLocal", s:nord5_gui, s:nord0_gui, s:nord5_term, "NONE", "undercurl", s:nord5_gui) +call s:hi("SpellRare", s:nord6_gui, s:nord0_gui, s:nord6_term, "NONE", "undercurl", s:nord6_gui) +call s:hi("Visual", "", s:nord2_gui, "", s:nord1_term, "", "") +call s:hi("VisualNOS", "", s:nord2_gui, "", s:nord1_term, "", "") + +"+- Vim 8 Terminal Colors -+ +if has('terminal') + let g:terminal_ansi_colors = [s:nord1_gui, s:nord11_gui, s:nord14_gui, s:nord13_gui, s:nord9_gui, s:nord15_gui, s:nord8_gui, s:nord5_gui, s:nord3_gui, s:nord11_gui, s:nord14_gui, s:nord13_gui, s:nord9_gui, s:nord15_gui, s:nord7_gui, s:nord6_gui] +endif + +if has('nvim') + "+- Neovim Terminal Colors -+ + let g:terminal_color_0 = s:nord1_gui + let g:terminal_color_1 = s:nord11_gui + let g:terminal_color_2 = s:nord14_gui + let g:terminal_color_3 = s:nord13_gui + let g:terminal_color_4 = s:nord9_gui + let g:terminal_color_5 = s:nord15_gui + let g:terminal_color_6 = s:nord8_gui + let g:terminal_color_7 = s:nord5_gui + let g:terminal_color_8 = s:nord3_gui + let g:terminal_color_9 = s:nord11_gui + let g:terminal_color_10 = s:nord14_gui + let g:terminal_color_11 = s:nord13_gui + let g:terminal_color_12 = s:nord9_gui + let g:terminal_color_13 = s:nord15_gui + let g:terminal_color_14 = s:nord7_gui + let g:terminal_color_15 = s:nord6_gui + + "+- Neovim Support -+ + call s:hi("healthError", s:nord11_gui, s:nord1_gui, s:nord11_term, s:nord1_term, "", "") + call s:hi("healthSuccess", s:nord14_gui, s:nord1_gui, s:nord14_term, s:nord1_term, "", "") + call s:hi("healthWarning", s:nord13_gui, s:nord1_gui, s:nord13_term, s:nord1_term, "", "") + call s:hi("TermCursorNC", "", s:nord1_gui, "", s:nord1_term, "", "") + + "+- Neovim Diagnostics API -+ + call s:hi("DiagnosticWarn", s:nord13_gui, "", s:nord13_term, "", "", "") + call s:hi("DiagnosticError" , s:nord11_gui, "", s:nord11_term, "", "", "") + call s:hi("DiagnosticInfo" , s:nord8_gui, "", s:nord8_term, "", "", "") + call s:hi("DiagnosticHint" , s:nord10_gui, "", s:nord10_term, "", "", "") + call s:hi("DiagnosticUnderlineWarn" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "") + call s:hi("DiagnosticUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "") + call s:hi("DiagnosticUnderlineInfo" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "") + call s:hi("DiagnosticUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "") + + "+- Neovim DocumentHighlight -+ + call s:hi("LspReferenceText", "", s:nord3_gui, "", s:nord3_term, "", "") + call s:hi("LspReferenceRead", "", s:nord3_gui, "", s:nord3_term, "", "") + call s:hi("LspReferenceWrite", "", s:nord3_gui, "", s:nord3_term, "", "") + + "+- Neovim LspSignatureHelp -+ + call s:hi("LspSignatureActiveParameter", s:nord8_gui, "", s:nord8_term, "", s:underline, "") +endif + +"+--- Gutter ---+ +call s:hi("CursorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "") +if g:nord_cursor_line_number_background == 0 + call s:hi("CursorLineNr", s:nord4_gui, "", "NONE", "", "NONE", "") +else + call s:hi("CursorLineNr", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "") +endif +call s:hi("Folded", s:nord3_gui, s:nord1_gui, s:nord3_term, s:nord1_term, s:bold, "") +call s:hi("FoldColumn", s:nord3_gui, s:nord0_gui, s:nord3_term, "NONE", "", "") +call s:hi("SignColumn", s:nord1_gui, s:nord0_gui, s:nord1_term, "NONE", "", "") + +"+--- Navigation ---+ +call s:hi("Directory", s:nord8_gui, "", s:nord8_term, "NONE", "", "") + +"+--- Prompt/Status ---+ +call s:hi("EndOfBuffer", s:nord1_gui, "", s:nord1_term, "NONE", "", "") +call s:hi("ErrorMsg", s:nord4_gui, s:nord11_gui, "NONE", s:nord11_term, "", "") +call s:hi("ModeMsg", s:nord4_gui, "", "", "", "", "") +call s:hi("MoreMsg", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("Question", s:nord4_gui, "", "NONE", "", "", "") +if g:nord_uniform_status_lines == 0 + call s:hi("StatusLine", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "") + call s:hi("StatusLineNC", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "") + call s:hi("StatusLineTerm", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "") + call s:hi("StatusLineTermNC", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "") +else + call s:hi("StatusLine", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "") + call s:hi("StatusLineNC", s:nord4_gui, s:nord3_gui, "NONE", s:nord3_term, "NONE", "") + call s:hi("StatusLineTerm", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "") + call s:hi("StatusLineTermNC", s:nord4_gui, s:nord3_gui, "NONE", s:nord3_term, "NONE", "") +endif +call s:hi("WarningMsg", s:nord0_gui, s:nord13_gui, s:nord1_term, s:nord13_term, "", "") +call s:hi("WildMenu", s:nord8_gui, s:nord1_gui, s:nord8_term, s:nord1_term, "", "") + +"+--- Search ---+ +call s:hi("IncSearch", s:nord6_gui, s:nord10_gui, s:nord6_term, s:nord10_term, s:underline, "") +call s:hi("Search", s:nord1_gui, s:nord8_gui, s:nord1_term, s:nord8_term, "NONE", "") + +"+--- Tabs ---+ +call s:hi("TabLine", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "") +call s:hi("TabLineFill", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "") +call s:hi("TabLineSel", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "") + +"+--- Window ---+ +call s:hi("Title", s:nord4_gui, "", "NONE", "", "NONE", "") + +if g:nord_bold_vertical_split_line == 0 + call s:hi("VertSplit", s:nord2_gui, s:nord0_gui, s:nord3_term, "NONE", "NONE", "") +else + call s:hi("VertSplit", s:nord2_gui, s:nord1_gui, s:nord3_term, s:nord1_term, "NONE", "") +endif + +"+----------------------+ +"+ Language Base Groups + +"+----------------------+ +call s:hi("Boolean", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Character", s:nord14_gui, "", s:nord14_term, "", "", "") +call s:hi("Comment", s:nord3_gui_bright, "", s:nord3_term, "", s:italicize_comments, "") +call s:hi("Conceal", "", "NONE", "", "NONE", "", "") +call s:hi("Conditional", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Constant", s:nord4_gui, "", "NONE", "", "", "") +call s:hi("Decorator", s:nord12_gui, "", s:nord12_term, "", "", "") +call s:hi("Define", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Delimiter", s:nord6_gui, "", s:nord6_term, "", "", "") +call s:hi("Exception", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Float", s:nord15_gui, "", s:nord15_term, "", "", "") +call s:hi("Function", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("Identifier", s:nord4_gui, "", "NONE", "", "NONE", "") +call s:hi("Include", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Keyword", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Label", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Number", s:nord15_gui, "", s:nord15_term, "", "", "") +call s:hi("Operator", s:nord9_gui, "", s:nord9_term, "", "NONE", "") +call s:hi("PreProc", s:nord9_gui, "", s:nord9_term, "", "NONE", "") +call s:hi("Repeat", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Special", s:nord4_gui, "", "NONE", "", "", "") +call s:hi("SpecialChar", s:nord13_gui, "", s:nord13_term, "", "", "") +call s:hi("SpecialComment", s:nord8_gui, "", s:nord8_term, "", s:italicize_comments, "") +call s:hi("Statement", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("StorageClass", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("String", s:nord14_gui, "", s:nord14_term, "", "", "") +call s:hi("Structure", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("Tag", s:nord4_gui, "", "", "", "", "") +call s:hi("Todo", s:nord13_gui, "NONE", s:nord13_term, "NONE", "", "") +call s:hi("Type", s:nord9_gui, "", s:nord9_term, "", "NONE", "") +call s:hi("Typedef", s:nord9_gui, "", s:nord9_term, "", "", "") +hi! link Annotation Decorator +hi! link Macro Define +hi! link PreCondit PreProc +hi! link Variable Identifier + +"+-----------+ +"+ Languages + +"+-----------+ +call s:hi("asciidocAttributeEntry", s:nord10_gui, "", s:nord10_term, "", "", "") +call s:hi("asciidocAttributeList", s:nord10_gui, "", s:nord10_term, "", "", "") +call s:hi("asciidocAttributeRef", s:nord10_gui, "", s:nord10_term, "", "", "") +call s:hi("asciidocHLabel", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("asciidocListingBlock", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("asciidocMacroAttributes", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("asciidocOneLineTitle", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("asciidocPassthroughBlock", s:nord9_gui, "", s:nord9_term, "", "", "") +call s:hi("asciidocQuotedMonospaced", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("asciidocTriplePlusPassthrough", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link asciidocAdmonition Keyword +hi! link asciidocAttributeRef markdownH1 +hi! link asciidocBackslash Keyword +hi! link asciidocMacro Keyword +hi! link asciidocQuotedBold Bold +hi! link asciidocQuotedEmphasized Italic +hi! link asciidocQuotedMonospaced2 asciidocQuotedMonospaced +hi! link asciidocQuotedUnconstrainedBold asciidocQuotedBold +hi! link asciidocQuotedUnconstrainedEmphasized asciidocQuotedEmphasized +hi! link asciidocURL markdownLinkText + +call s:hi("awkCharClass", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("awkPatterns", s:nord9_gui, "", s:nord9_term, "", s:bold, "") +hi! link awkArrayElement Identifier +hi! link awkBoolLogic Keyword +hi! link awkBrktRegExp SpecialChar +hi! link awkComma Delimiter +hi! link awkExpression Keyword +hi! link awkFieldVars Identifier +hi! link awkLineSkip Keyword +hi! link awkOperator Operator +hi! link awkRegExp SpecialChar +hi! link awkSearch Keyword +hi! link awkSemicolon Delimiter +hi! link awkSpecialCharacter SpecialChar +hi! link awkSpecialPrintf SpecialChar +hi! link awkVariables Identifier + +call s:hi("cIncluded", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link cOperator Operator +hi! link cPreCondit PreCondit +hi! link cConstant Type + +call s:hi("cmakeGeneratorExpression", s:nord10_gui, "", s:nord10_term, "", "", "") + +hi! link csPreCondit PreCondit +hi! link csType Type +hi! link csXmlTag SpecialComment + +call s:hi("cssAttributeSelector", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("cssDefinition", s:nord7_gui, "", s:nord7_term, "", "NONE", "") +call s:hi("cssIdentifier", s:nord7_gui, "", s:nord7_term, "", s:underline, "") +call s:hi("cssStringQ", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link cssAttr Keyword +hi! link cssBraces Delimiter +hi! link cssClassName cssDefinition +hi! link cssColor Number +hi! link cssProp cssDefinition +hi! link cssPseudoClass cssDefinition +hi! link cssPseudoClassId cssPseudoClass +hi! link cssVendor Keyword + +call s:hi("dosiniHeader", s:nord8_gui, "", s:nord8_term, "", "", "") +hi! link dosiniLabel Type + +call s:hi("dtBooleanKey", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("dtExecKey", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("dtLocaleKey", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("dtNumericKey", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("dtTypeKey", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link dtDelim Delimiter +hi! link dtLocaleValue Keyword +hi! link dtTypeValue Keyword + +if g:nord_uniform_diff_background == 0 + call s:hi("DiffAdd", s:nord14_gui, s:nord0_gui, s:nord14_term, "NONE", "inverse", "") + call s:hi("DiffChange", s:nord13_gui, s:nord0_gui, s:nord13_term, "NONE", "inverse", "") + call s:hi("DiffDelete", s:nord11_gui, s:nord0_gui, s:nord11_term, "NONE", "inverse", "") + call s:hi("DiffText", s:nord9_gui, s:nord0_gui, s:nord9_term, "NONE", "inverse", "") +else + call s:hi("DiffAdd", s:nord14_gui, s:nord1_gui, s:nord14_term, s:nord1_term, "", "") + call s:hi("DiffChange", s:nord13_gui, s:nord1_gui, s:nord13_term, s:nord1_term, "", "") + call s:hi("DiffDelete", s:nord11_gui, s:nord1_gui, s:nord11_term, s:nord1_term, "", "") + call s:hi("DiffText", s:nord9_gui, s:nord1_gui, s:nord9_term, s:nord1_term, "", "") +endif +" Legacy groups for official git.vim and diff.vim syntax +hi! link diffAdded DiffAdd +hi! link diffChanged DiffChange +hi! link diffRemoved DiffDelete + +call s:hi("gitconfigVariable", s:nord7_gui, "", s:nord7_term, "", "", "") + +call s:hi("goBuiltins", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link goConstants Keyword + +call s:hi("helpBar", s:nord3_gui, "", s:nord3_term, "", "", "") +call s:hi("helpHyperTextJump", s:nord8_gui, "", s:nord8_term, "", s:underline, "") + +call s:hi("htmlArg", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("htmlLink", s:nord4_gui, "", "", "", "NONE", "NONE") +hi! link htmlBold Bold +hi! link htmlEndTag htmlTag +hi! link htmlItalic Italic +hi! link htmlH1 markdownH1 +hi! link htmlH2 markdownH1 +hi! link htmlH3 markdownH1 +hi! link htmlH4 markdownH1 +hi! link htmlH5 markdownH1 +hi! link htmlH6 markdownH1 +hi! link htmlSpecialChar SpecialChar +hi! link htmlTag Keyword +hi! link htmlTagN htmlTag + +call s:hi("javaDocTags", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link javaCommentTitle Comment +hi! link javaScriptBraces Delimiter +hi! link javaScriptIdentifier Keyword +hi! link javaScriptNumber Number + +call s:hi("jsonKeyword", s:nord7_gui, "", s:nord7_term, "", "", "") + +call s:hi("lessClass", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link lessAmpersand Keyword +hi! link lessCssAttribute Delimiter +hi! link lessFunction Function +hi! link cssSelectorOp Keyword + +hi! link lispAtomBarSymbol SpecialChar +hi! link lispAtomList SpecialChar +hi! link lispAtomMark Keyword +hi! link lispBarSymbol SpecialChar +hi! link lispFunc Function + +hi! link luaFunc Function + +call s:hi("markdownBlockquote", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("markdownCode", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("markdownCodeDelimiter", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("markdownFootnote", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("markdownId", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("markdownIdDeclaration", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("markdownH1", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("markdownLinkText", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("markdownUrl", s:nord4_gui, "", "NONE", "", "NONE", "") +hi! link markdownBold Bold +hi! link markdownBoldDelimiter Keyword +hi! link markdownFootnoteDefinition markdownFootnote +hi! link markdownH2 markdownH1 +hi! link markdownH3 markdownH1 +hi! link markdownH4 markdownH1 +hi! link markdownH5 markdownH1 +hi! link markdownH6 markdownH1 +hi! link markdownIdDelimiter Keyword +hi! link markdownItalic Italic +hi! link markdownItalicDelimiter Keyword +hi! link markdownLinkDelimiter Keyword +hi! link markdownLinkTextDelimiter Keyword +hi! link markdownListMarker Keyword +hi! link markdownRule Keyword +hi! link markdownHeadingDelimiter Keyword + +call s:hi("perlPackageDecl", s:nord7_gui, "", s:nord7_term, "", "", "") + +call s:hi("phpClasses", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("phpDocTags", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link phpDocCustomTags phpDocTags +hi! link phpMemberSelector Keyword + +call s:hi("podCmdText", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("podVerbatimLine", s:nord4_gui, "", "NONE", "", "", "") +hi! link podFormat Keyword + +hi! link pythonBuiltin Type +hi! link pythonEscape SpecialChar + +call s:hi("rubyConstant", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("rubySymbol", s:nord6_gui, "", s:nord6_term, "", s:bold, "") +hi! link rubyAttribute Identifier +hi! link rubyBlockParameterList Operator +hi! link rubyInterpolationDelimiter Keyword +hi! link rubyKeywordAsMethod Function +hi! link rubyLocalVariableOrMethod Function +hi! link rubyPseudoVariable Keyword +hi! link rubyRegexp SpecialChar + +call s:hi("rustAttribute", s:nord10_gui, "", s:nord10_term, "", "", "") +call s:hi("rustEnum", s:nord7_gui, "", s:nord7_term, "", s:bold, "") +call s:hi("rustMacro", s:nord8_gui, "", s:nord8_term, "", s:bold, "") +call s:hi("rustModPath", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("rustPanic", s:nord9_gui, "", s:nord9_term, "", s:bold, "") +call s:hi("rustTrait", s:nord7_gui, "", s:nord7_term, "", s:italic, "") +hi! link rustCommentLineDoc Comment +hi! link rustDerive rustAttribute +hi! link rustEnumVariant rustEnum +hi! link rustEscape SpecialChar +hi! link rustQuestionMark Keyword + +call s:hi("sassClass", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("sassId", s:nord7_gui, "", s:nord7_term, "", s:underline, "") +hi! link sassAmpersand Keyword +hi! link sassClassChar Delimiter +hi! link sassControl Keyword +hi! link sassControlLine Keyword +hi! link sassExtend Keyword +hi! link sassFor Keyword +hi! link sassFunctionDecl Keyword +hi! link sassFunctionName Function +hi! link sassidChar sassId +hi! link sassInclude SpecialChar +hi! link sassMixinName Function +hi! link sassMixing SpecialChar +hi! link sassReturn Keyword + +hi! link shCmdParenRegion Delimiter +hi! link shCmdSubRegion Delimiter +hi! link shDerefSimple Identifier +hi! link shDerefVar Identifier + +hi! link sqlKeyword Keyword +hi! link sqlSpecial Keyword + +call s:hi("vimAugroup", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("vimMapRhs", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("vimNotation", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link vimFunc Function +hi! link vimFunction Function +hi! link vimUserFunc Function + +call s:hi("xmlAttrib", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("xmlCdataStart", s:nord3_gui_bright, "", s:nord3_term, "", s:bold, "") +call s:hi("xmlNamespace", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link xmlAttribPunct Delimiter +hi! link xmlCdata Comment +hi! link xmlCdataCdata xmlCdataStart +hi! link xmlCdataEnd xmlCdataStart +hi! link xmlEndTag xmlTagName +hi! link xmlProcessingDelim Keyword +hi! link xmlTagName Keyword + +call s:hi("yamlBlockMappingKey", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link yamlBool Keyword +hi! link yamlDocumentStart Keyword + +"+----------------+ +"+ Plugin Support + +"+----------------+ +"+--- UI ---+ +" ALE +" > w0rp/ale +call s:hi("ALEWarningSign", s:nord13_gui, "", s:nord13_term, "", "", "") +call s:hi("ALEErrorSign" , s:nord11_gui, "", s:nord11_term, "", "", "") +call s:hi("ALEWarning" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "") +call s:hi("ALEError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "") + +" Coc +" > neoclide/coc.vim +call s:hi("CocWarningHighlight" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "") +call s:hi("CocErrorHighlight" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "") +call s:hi("CocWarningSign", s:nord13_gui, "", s:nord13_term, "", "", "") +call s:hi("CocErrorSign" , s:nord11_gui, "", s:nord11_term, "", "", "") +call s:hi("CocInfoSign" , s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("CocHintSign" , s:nord10_gui, "", s:nord10_term, "", "", "") + +if has('nvim') + " Neovim LSP + " > neovim/nvim-lspconfig + call s:hi("LspCodeLens", s:nord3_gui_bright, "", s:nord3_term, "", "", "") + if has("nvim-0.5") + call s:hi("LspDiagnosticsDefaultWarning", s:nord13_gui, "", s:nord13_term, "", "", "") + call s:hi("LspDiagnosticsDefaultError" , s:nord11_gui, "", s:nord11_term, "", "", "") + call s:hi("LspDiagnosticsDefaultInformation" , s:nord8_gui, "", s:nord8_term, "", "", "") + call s:hi("LspDiagnosticsDefaultHint" , s:nord10_gui, "", s:nord10_term, "", "", "") + call s:hi("LspDiagnosticsUnderlineWarning" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "") + call s:hi("LspDiagnosticsUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "") + call s:hi("LspDiagnosticsUnderlineInformation" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "") + call s:hi("LspDiagnosticsUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "") + endif + + " Gitsigns + " > lewis6991/gitsigns.nvim + hi! link GitSignsCurrentLineBlame Comment +endif + +" GitGutter +" > airblade/vim-gitgutter +call s:hi("GitGutterAdd", s:nord14_gui, "", s:nord14_term, "", "", "") +call s:hi("GitGutterChange", s:nord13_gui, "", s:nord13_term, "", "", "") +call s:hi("GitGutterChangeDelete", s:nord11_gui, "", s:nord11_term, "", "", "") +call s:hi("GitGutterDelete", s:nord11_gui, "", s:nord11_term, "", "", "") + +" Signify +" > mhinz/vim-signify +call s:hi("SignifySignAdd", s:nord14_gui, "", s:nord14_term, "", "", "") +call s:hi("SignifySignChange", s:nord13_gui, "", s:nord13_term, "", "", "") +call s:hi("SignifySignChangeDelete", s:nord11_gui, "", s:nord11_term, "", "", "") +call s:hi("SignifySignDelete", s:nord11_gui, "", s:nord11_term, "", "", "") + +" Sneak +" > justinmk/vim-sneak +hi! link Sneak Search + +" fugitive.vim +" > tpope/vim-fugitive +call s:hi("gitcommitDiscardedFile", s:nord11_gui, "", s:nord11_term, "", "", "") +call s:hi("gitcommitUntrackedFile", s:nord11_gui, "", s:nord11_term, "", "", "") +call s:hi("gitcommitSelectedFile", s:nord14_gui, "", s:nord14_term, "", "", "") + +" davidhalter/jedi-vim +call s:hi("jediFunction", s:nord4_gui, s:nord3_gui, "", s:nord3_term, "", "") +call s:hi("jediFat", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, s:underline.s:bold, "") + +" NERDTree +" > scrooloose/nerdtree +call s:hi("NERDTreeExecFile", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link NERDTreeDirSlash Keyword +hi! link NERDTreeHelp Comment + +" CtrlP +" > ctrlpvim/ctrlp.vim +hi! link CtrlPMatch Keyword +hi! link CtrlPBufferHid Normal + +" vim-clap +" > liuchengxu/vim-clap +call s:hi("ClapDir", s:nord4_gui, "", "", "", "", "") +call s:hi("ClapDisplay", s:nord4_gui, s:nord1_gui, "", s:nord1_term, "", "") +call s:hi("ClapFile", s:nord4_gui, "", "", "NONE", "", "") +call s:hi("ClapMatches", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("ClapNoMatchesFound", s:nord13_gui, "", s:nord13_term, "", "", "") +call s:hi("ClapSelected", s:nord7_gui, "", s:nord7_term, "", s:bold, "") +call s:hi("ClapSelectedSign", s:nord9_gui, "", s:nord9_term, "", "", "") +let s:clap_matches = [ + \ [s:nord8_gui, s:nord8_term] , + \ [s:nord9_gui, s:nord9_term] , + \ [s:nord10_gui, s:nord10_term] , + \ ] +for s:nord_clap_match_i in range(1,12) + let clap_match_color = s:clap_matches[s:nord_clap_match_i % len(s:clap_matches) - 1] + call s:hi("ClapMatches" . s:nord_clap_match_i, clap_match_color[0], "", clap_match_color[1], "", "", "") + call s:hi("ClapFuzzyMatches" . s:nord_clap_match_i, clap_match_color[0], "", clap_match_color[1], "", "", "") +endfor +unlet s:nord_clap_match_i +hi! link ClapCurrentSelection PmenuSel +hi! link ClapCurrentSelectionSign ClapSelectedSign +hi! link ClapInput Pmenu +hi! link ClapPreview Pmenu +hi! link ClapProviderAbout ClapDisplay +hi! link ClapProviderColon Type +hi! link ClapProviderId Type + +" vim-indent-guides +" > nathanaelkane/vim-indent-guides +call s:hi("IndentGuidesEven", "", s:nord1_gui, "", s:nord1_term, "", "") +call s:hi("IndentGuidesOdd", "", s:nord2_gui, "", s:nord3_term, "", "") + +" vim-plug +" > junegunn/vim-plug +call s:hi("plugDeleted", s:nord11_gui, "", "", s:nord11_term, "", "") + +" vim-signature +" > kshenoy/vim-signature +call s:hi("SignatureMarkText", s:nord8_gui, "", s:nord8_term, "", "", "") + +" vim-startify +" > mhinz/vim-startify +call s:hi("StartifyFile", s:nord6_gui, "", s:nord6_term, "", "", "") +call s:hi("StartifyFooter", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("StartifyHeader", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("StartifyNumber", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("StartifyPath", s:nord8_gui, "", s:nord8_term, "", "", "") +hi! link StartifyBracket Delimiter +hi! link StartifySlash Normal +hi! link StartifySpecial Comment + +"+--- Languages ---+ +" Haskell +" > neovimhaskell/haskell-vim +call s:hi("haskellPreProc", s:nord10_gui, "", s:nord10_term, "", "", "") +call s:hi("haskellType", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link haskellPragma haskellPreProc + +" JavaScript +" > pangloss/vim-javascript +call s:hi("jsGlobalNodeObjects", s:nord8_gui, "", s:nord8_term, "", s:italic, "") +hi! link jsBrackets Delimiter +hi! link jsFuncCall Function +hi! link jsFuncParens Delimiter +hi! link jsThis Keyword +hi! link jsNoise Delimiter +hi! link jsPrototype Keyword +hi! link jsRegexpString SpecialChar + +" Pandoc +" > vim-pandoc/vim-pandoc-syntax +call s:hi("pandocDefinitionBlockTerm", s:nord7_gui, "", s:nord7_term, "", s:italic, "") +call s:hi("pandocTableDelims", s:nord3_gui, "", s:nord3_term, "", "", "") +hi! link pandocAtxHeader markdownH1 +hi! link pandocBlockQuote markdownBlockquote +hi! link pandocCiteAnchor Operator +hi! link pandocCiteKey pandocReferenceLabel +hi! link pandocDefinitionBlockMark Operator +hi! link pandocEmphasis markdownItalic +hi! link pandocFootnoteID pandocReferenceLabel +hi! link pandocFootnoteIDHead markdownLinkDelimiter +hi! link pandocFootnoteIDTail pandocFootnoteIDHead +hi! link pandocGridTableDelims pandocTableDelims +hi! link pandocGridTableHeader pandocTableDelims +hi! link pandocOperator Operator +hi! link pandocPipeTableDelims pandocTableDelims +hi! link pandocReferenceDefinition pandocReferenceLabel +hi! link pandocReferenceLabel markdownLinkText +hi! link pandocReferenceURL markdownUrl +hi! link pandocSimpleTableHeader pandocAtxHeader +hi! link pandocStrong markdownBold +hi! link pandocTableHeaderWord pandocAtxHeader +hi! link pandocUListItemBullet Operator + +if has('nvim') + " tree-sitter + " > nvim-treesitter/nvim-treesitter + hi! link TSAnnotation Annotation + hi! link TSConstBuiltin Constant + hi! link TSConstructor Function + hi! link TSEmphasis Italic + hi! link TSFuncBuiltin Function + hi! link TSFuncMacro Function + hi! link TSStringRegex SpecialChar + hi! link TSStrong Bold + hi! link TSStructure Structure + hi! link TSTagDelimiter TSTag + hi! link TSUnderline Underline + hi! link TSVariable Variable + hi! link TSVariableBuiltin Keyword +endif + +" TypeScript +" > HerringtonDarkholme/yats.vim +call s:hi("typescriptBOMWindowMethod", s:nord8_gui, "", s:nord8_term, "", s:italic, "") +call s:hi("typescriptClassName", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("typescriptDecorator", s:nord12_gui, "", s:nord12_term, "", "", "") +call s:hi("typescriptInterfaceName", s:nord7_gui, "", s:nord7_term, "", s:bold, "") +call s:hi("typescriptRegexpString", s:nord13_gui, "", s:nord13_term, "", "", "") +" TypeScript JSX + call s:hi("tsxAttrib", s:nord7_gui, "", s:nord7_term, "", "", "") +hi! link typescriptOperator Operator +hi! link typescriptBinaryOp Operator +hi! link typescriptAssign Operator +hi! link typescriptMember Identifier +hi! link typescriptDOMStorageMethod Identifier +hi! link typescriptArrowFuncArg Identifier +hi! link typescriptGlobal typescriptClassName +hi! link typescriptBOMWindowProp Function +hi! link typescriptArrowFuncDef Function +hi! link typescriptAliasDeclaration Function +hi! link typescriptPredefinedType Type +hi! link typescriptTypeReference typescriptClassName +hi! link typescriptTypeAnnotation Structure +hi! link typescriptDocNamedParamType SpecialComment +hi! link typescriptDocNotation Keyword +hi! link typescriptDocTags Keyword +hi! link typescriptImport Keyword +hi! link typescriptExport Keyword +hi! link typescriptTry Keyword +hi! link typescriptVariable Keyword +hi! link typescriptBraces Normal +hi! link typescriptObjectLabel Normal +hi! link typescriptCall Normal +hi! link typescriptClassHeritage typescriptClassName +hi! link typescriptFuncTypeArrow Structure +hi! link typescriptMemberOptionality Structure +hi! link typescriptNodeGlobal typescriptGlobal +hi! link typescriptTypeBrackets Structure +hi! link tsxEqual Operator +hi! link tsxIntrinsicTagName htmlTag +hi! link tsxTagName tsxIntrinsicTagName + +" Markdown +" > plasticboy/vim-markdown +call s:hi("mkdCode", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("mkdFootnote", s:nord8_gui, "", s:nord8_term, "", "", "") +call s:hi("mkdRule", s:nord10_gui, "", s:nord10_term, "", "", "") +call s:hi("mkdLineBreak", s:nord9_gui, "", s:nord9_term, "", "", "") +hi! link mkdBold Bold +hi! link mkdItalic Italic +hi! link mkdString Keyword +hi! link mkdCodeStart mkdCode +hi! link mkdCodeEnd mkdCode +hi! link mkdBlockquote Comment +hi! link mkdListItem Keyword +hi! link mkdListItemLine Normal +hi! link mkdFootnotes mkdFootnote +hi! link mkdLink markdownLinkText +hi! link mkdURL markdownUrl +hi! link mkdInlineURL mkdURL +hi! link mkdID Identifier +hi! link mkdLinkDef mkdLink +hi! link mkdLinkDefTarget mkdURL +hi! link mkdLinkTitle mkdInlineURL +hi! link mkdDelimiter Keyword + +" PHP +" > StanAngeloff/php.vim +call s:hi("phpClass", s:nord7_gui, "", s:nord7_term, "", "", "") +call s:hi("phpClassImplements", s:nord7_gui, "", s:nord7_term, "", s:bold, "") +hi! link phpClassExtends phpClass +hi! link phpFunction Function +hi! link phpMethod Function +hi! link phpUseClass phpClass + +" Vimwiki +" > vimwiki/vimwiki +if !exists("g:vimwiki_hl_headers") || g:vimwiki_hl_headers == 0 + for s:i in range(1,6) + call s:hi("VimwikiHeader".s:i, s:nord8_gui, "", s:nord8_term, "", s:bold, "") + endfor +else + let s:vimwiki_hcolor_guifg = [s:nord7_gui, s:nord8_gui, s:nord9_gui, s:nord10_gui, s:nord14_gui, s:nord15_gui] + let s:vimwiki_hcolor_ctermfg = [s:nord7_term, s:nord8_term, s:nord9_term, s:nord10_term, s:nord14_term, s:nord15_term] + for s:i in range(1,6) + call s:hi("VimwikiHeader".s:i, s:vimwiki_hcolor_guifg[s:i-1] , "", s:vimwiki_hcolor_ctermfg[s:i-1], "", s:bold, "") + endfor +endif +call s:hi("VimwikiLink", s:nord8_gui, "", s:nord8_term, "", s:underline, "") +hi! link VimwikiHeaderChar markdownHeadingDelimiter +hi! link VimwikiHR Keyword +hi! link VimwikiList markdownListMarker + +" YAML +" > stephpy/vim-yaml +call s:hi("yamlKey", s:nord7_gui, "", s:nord7_term, "", "", "") + +"+------------+ +"+ Public API + +"+------------+ +"+--- Functions ---+ + +function! NordPalette() abort + let ret = {} + for color in range(16) + execute 'let ret["nord'.color.'"] = s:nord'.color.'_gui' + endfor + let ret["nord3_bright"] = s:nord3_gui_bright + return ret +endfunction diff --git a/vim/.config/vim/plugged/nord-vim/license b/vim/.config/vim/plugged/nord-vim/license new file mode 100644 index 0000000..8283a7c --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/license @@ -0,0 +1,21 @@ +MIT License (MIT) + +Copyright (c) 2016-present Sven Greb (https://www.svengreb.de) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vim/.config/vim/plugged/nord-vim/package-lock.json b/vim/.config/vim/plugged/nord-vim/package-lock.json new file mode 100644 index 0000000..df588df --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/package-lock.json @@ -0,0 +1,5851 @@ +{ + "name": "@nordtheme/vim", + "version": "0.19.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@nordtheme/vim", + "version": "0.19.0", + "license": "MIT", + "devDependencies": { + "@arcticicestudio/remark-preset-lint": ">=0.4.0 <1.0.0", + "husky": "8.0.3", + "lint-staged": "13.1.2", + "npm-run-all": "4.1.5", + "prettier": "^2.8.4", + "remark-cli": "11.0.0" + }, + "engines": { + "node": ">=15.13", + "npm": ">=7.7" + } + }, + "node_modules/@arcticicestudio/remark-preset-lint": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@arcticicestudio/remark-preset-lint/-/remark-preset-lint-0.4.0.tgz", + "integrity": "sha512-Gw0CBqNqmDj3jr1EZqx5K4EV1N152xmcYqLsxNrSwmKQmkMh64CO5i+89zaYxH2c59GJ1Nt/4bGxS/CU/UvuWw==", + "dev": true, + "dependencies": { + "remark-footnotes": "^3.0.0", + "remark-frontmatter": "^3.0.0", + "remark-gfm": "^1.0.0", + "remark-lint": "^8.0.0", + "remark-lint-blockquote-indentation": "^2.0.1", + "remark-lint-checkbox-character-style": "^3.0.0", + "remark-lint-checkbox-content-indent": "^3.0.0", + "remark-lint-code-block-style": "^2.0.1", + "remark-lint-definition-case": "^2.0.1", + "remark-lint-definition-spacing": "^2.0.1", + "remark-lint-emphasis-marker": "^2.0.1", + "remark-lint-fenced-code-flag": "^2.0.1", + "remark-lint-fenced-code-marker": "^2.0.1", + "remark-lint-file-extension": "^1.0.5", + "remark-lint-final-definition": "^2.1.0", + "remark-lint-final-newline": "^1.0.5", + "remark-lint-first-heading-level": "^2.0.1", + "remark-lint-hard-break-spaces": "^2.0.1", + "remark-lint-heading-increment": "^2.0.1", + "remark-lint-heading-style": "^2.0.1", + "remark-lint-linebreak-style": "^2.0.1", + "remark-lint-link-title-style": "^2.0.1", + "remark-lint-list-item-bullet-indent": "^3.0.0", + "remark-lint-list-item-content-indent": "^2.0.1", + "remark-lint-list-item-indent": "^2.0.1", + "remark-lint-list-item-spacing": "^3.0.0", + "remark-lint-maximum-heading-length": "^2.0.1", + "remark-lint-maximum-line-length": "^2.0.3", + "remark-lint-no-auto-link-without-protocol": "^2.0.1", + "remark-lint-no-blockquote-without-marker": "^4.0.0", + "remark-lint-no-consecutive-blank-lines": "^3.0.0", + "remark-lint-no-duplicate-defined-urls": "^1.0.1", + "remark-lint-no-duplicate-definitions": "^2.0.1", + "remark-lint-no-duplicate-headings": "^2.0.1", + "remark-lint-no-duplicate-headings-in-section": "^2.0.2", + "remark-lint-no-emphasis-as-heading": "^2.0.1", + "remark-lint-no-empty-url": "^2.0.1", + "remark-lint-no-file-name-articles": "^1.0.5", + "remark-lint-no-file-name-consecutive-dashes": "^1.0.5", + "remark-lint-no-file-name-irregular-characters": "^1.0.5", + "remark-lint-no-file-name-mixed-case": "^1.0.5", + "remark-lint-no-file-name-outer-dashes": "^1.0.6", + "remark-lint-no-heading-content-indent": "^3.0.0", + "remark-lint-no-heading-indent": "^3.0.0", + "remark-lint-no-heading-like-paragraph": "^2.0.1", + "remark-lint-no-heading-punctuation": "^2.0.1", + "remark-lint-no-html": "^2.0.1", + "remark-lint-no-inline-padding": "^3.0.0", + "remark-lint-no-literal-urls": "^2.0.1", + "remark-lint-no-missing-blank-lines": "^2.0.1", + "remark-lint-no-multiple-toplevel-headings": "^2.0.1", + "remark-lint-no-paragraph-content-indent": "^3.0.0", + "remark-lint-no-reference-like-url": "^2.0.1", + "remark-lint-no-shell-dollars": "^2.0.2", + "remark-lint-no-shortcut-reference-image": "^2.0.1", + "remark-lint-no-shortcut-reference-link": "^2.0.1", + "remark-lint-no-table-indentation": "^3.0.0", + "remark-lint-no-tabs": "^2.0.1", + "remark-lint-no-undefined-references": "^3.0.0", + "remark-lint-no-unneeded-full-reference-image": "^2.0.1", + "remark-lint-no-unneeded-full-reference-link": "^2.0.1", + "remark-lint-no-unused-definitions": "^2.0.1", + "remark-lint-ordered-list-marker-style": "^2.0.1", + "remark-lint-ordered-list-marker-value": "^2.0.1", + "remark-lint-rule-style": "^2.0.1", + "remark-lint-strong-marker": "^2.0.1", + "remark-lint-table-cell-padding": "^3.0.0", + "remark-lint-table-pipe-alignment": "^2.0.1", + "remark-lint-table-pipes": "^3.0.0", + "remark-lint-unordered-list-marker-style": "^2.0.1" + }, + "peerDependencies": { + "remark-cli": "^9.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@npmcli/config": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-6.1.3.tgz", + "integrity": "sha512-c8uOXPbRq1K8YeyUszj6MBWIdB6bx6x3K/UbGmc5GF7qpv1mB893Y5SuyrH/J7Kcw24Im4ASrsztk38ZBWFS2Q==", + "dev": true, + "dependencies": { + "@npmcli/map-workspaces": "^3.0.2", + "ini": "^3.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.2", + "semver": "^7.3.5", + "walk-up-path": "^1.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/config/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/map-workspaces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-3.0.2.tgz", + "integrity": "sha512-bCEC4PG7HbadtAYkW/TTUVNEOSr5Dhfmv6yGLgByJgCvdCqq7teq09cjvJ1LhzJU/euWjvYMcQxsfj7yDD2ikg==", + "dev": true, + "dependencies": { + "@npmcli/name-from-folder": "^2.0.0", + "glob": "^8.0.1", + "minimatch": "^6.1.6", + "read-package-json-fast": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@npmcli/map-workspaces/node_modules/minimatch": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz", + "integrity": "sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@npmcli/name-from-folder": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz", + "integrity": "sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@types/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-t3YCerNM7NTVjLuICZo5gYAXYoDvpuuTceCcFQWcDQz26kxUR5uIWolxbIR5jRNIXpMqhOpW/b8imCR1LEmuJw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dev": true, + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/is-empty": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/is-empty/-/is-empty-1.2.1.tgz", + "integrity": "sha512-a3xgqnFTuNJDm1fjsTjHocYJ40Cz3t8utYpi5GNaxzrJC2HSD08ym+whIL7fNqiqBCdM9bcqD1H/tORWAFXoZw==", + "dev": true + }, + "node_modules/@types/mdast": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz", + "integrity": "sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz", + "integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==", + "dev": true + }, + "node_modules/@types/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-dPWnWsf+kzIG140B8z2w3fr5D03TLWbOAFQl45xUpI3vcizeXriNR5VYkWZ+WTMsUHqZ9Xlt3hrxGNANFyNQfw==", + "dev": true + }, + "node_modules/@types/text-table": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@types/text-table/-/text-table-0.2.2.tgz", + "integrity": "sha512-dGoI5Af7To0R2XE8wJuc6vwlavWARsCh3UKJPjWs1YEqGUqfgBI/j/4GX0yf19/DsDPPf0YAXWAp8psNeIehLg==", + "dev": true + }, + "node_modules/@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", + "dev": true + }, + "node_modules/abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", + "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ccount": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-truncate": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "dev": true, + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/co": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz", + "integrity": "sha512-CQsjCRiNObI8AtTsNIBDRMQ4oMR83CzEswHYahClvul7gKk+lDQiOKv+5qh7LQWf5sh6jkZNispz/QlsZxyNgA==", + "dev": true + }, + "node_modules/collapse-white-space": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", + "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "dev": true, + "engines": [ + "node >= 6.0" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decode-named-character-reference": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + "dev": true, + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/decode-named-character-reference/node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/execa": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^3.0.1", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dev": true, + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/human-signals": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "dev": true, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-meta-resolve": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-2.2.1.tgz", + "integrity": "sha512-C6lLL7EJPY44kBvA80gq4uMsVFw5x3oSKfuMl1cuZ2RkI5+UJqQXgn+6hlUew0y4ig7Ypt4CObAAIzU53Nfpuw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-empty": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-empty/-/is-empty-1.2.0.tgz", + "integrity": "sha512-F2FnH/otLNJv0J6wc73A5Xo7oHLNnqplYqZhUu01tD54DIPvxIRSTSLkrUB/M0nHO4vo1O9PDfN4KoTxCzLh/w==", + "dev": true + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/lilconfig": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.3.tgz", + "integrity": "sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/lint-staged": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.1.2.tgz", + "integrity": "sha512-K9b4FPbWkpnupvK3WXZLbgu9pchUJ6N7TtVZjbaPsoizkqFUDkUReUL25xdrCljJs7uLUF3tZ7nVPeo/6lp+6w==", + "dev": true, + "dependencies": { + "cli-truncate": "^3.1.0", + "colorette": "^2.0.19", + "commander": "^9.4.1", + "debug": "^4.3.4", + "execa": "^6.1.0", + "lilconfig": "2.0.6", + "listr2": "^5.0.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-inspect": "^1.12.2", + "pidtree": "^0.6.0", + "string-argv": "^0.3.1", + "yaml": "^2.1.3" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/listr2": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-5.0.7.tgz", + "integrity": "sha512-MD+qXHPmtivrHIDRwPYdfNkrzqDiuaKU/rfBcec3WMyMF3xylQj3jMq344OtvQxz7zaCFViRAeqlr2AFhPvXHw==", + "dev": true, + "dependencies": { + "cli-truncate": "^2.1.0", + "colorette": "^2.0.19", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rfdc": "^1.3.0", + "rxjs": "^7.8.0", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + }, + "peerDependenciesMeta": { + "enquirer": { + "optional": true + } + } + }, + "node_modules/listr2/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/listr2/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/listr2/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/listr2/node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/listr2/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/listr2/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-plugin": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-5.1.0.tgz", + "integrity": "sha512-Lg1CZa1CFj2CbNaxijTL6PCbzd4qGTlZov+iH2p5Xwy/ApcZJh+i6jMN2cYePouTfjJfrNu3nXFdEw8LvbjPFQ==", + "dev": true, + "dependencies": { + "@npmcli/config": "^6.0.0", + "import-meta-resolve": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-update/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "dependencies": { + "repeat-string": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-comment-marker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/mdast-comment-marker/-/mdast-comment-marker-1.1.2.tgz", + "integrity": "sha512-vTFXtmbbF3rgnTh3Zl3irso4LtvwUq/jaDvT2D1JqTGAwaipcS7RpTxzi6KjoRqI9n2yuAhzLDAC8xVTF3XYVQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-1.1.1.tgz", + "integrity": "sha512-9cKl33Y21lyckGzpSmEQnIDjEfeeWelN5s1kUW1LwdB0Fkuq2u+4GdqcGEygYxJE8GVqCl0741bYXHgamfWAZA==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^4.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mdast-util-footnote": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/mdast-util-footnote/-/mdast-util-footnote-0.1.7.tgz", + "integrity": "sha512-QxNdO8qSxqbO2e3m09KwDKfWiLgqyCurdWTQ198NpbZ2hxntdc+VKS4fDJCmNWbAroUdYnSthu+XbZ8ovh8C3w==", + "dev": true, + "dependencies": { + "mdast-util-to-markdown": "^0.6.0", + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.0.tgz", + "integrity": "sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "mdast-util-to-string": "^3.1.0", + "micromark": "^3.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-decode-string": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "unist-util-stringify-position": "^3.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown/node_modules/mdast-util-to-string": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.1.1.tgz", + "integrity": "sha512-tGvhT94e+cVnQt8JWE9/b3cUQZWS732TJxXHktvP+BYo62PpYD53Ls/6cC60rW21dW+txxiM4zMdc6abASvZKA==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown/node_modules/micromark": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", + "integrity": "sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "micromark-core-commonmark": "^1.0.1", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-combine-extensions": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-frontmatter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", + "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", + "dev": true, + "dependencies": { + "micromark-extension-frontmatter": "^0.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.2.tgz", + "integrity": "sha512-NNkhDx/qYcuOWB7xHUGWZYVXvjPFFd6afg6/e2g+SV4r9q5XUcCbV4Wfa3DLYIiD+xAEZc6K4MGaE/m0KDcPwQ==", + "dev": true, + "dependencies": { + "mdast-util-gfm-autolink-literal": "^0.1.0", + "mdast-util-gfm-strikethrough": "^0.2.0", + "mdast-util-gfm-table": "^0.1.0", + "mdast-util-gfm-task-list-item": "^0.1.0", + "mdast-util-to-markdown": "^0.6.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.3.tgz", + "integrity": "sha512-GjmLjWrXg1wqMIO9+ZsRik/s7PLwTaeCHVB7vRxUwLntZc8mzmTsLVr6HW1yLokcnhfURsn5zmSVdi3/xWWu1A==", + "dev": true, + "dependencies": { + "ccount": "^1.0.0", + "mdast-util-find-and-replace": "^1.1.0", + "micromark": "^2.11.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.3.tgz", + "integrity": "sha512-5OQLXpt6qdbttcDG/UxYY7Yjj3e8P7X16LzvpX8pIQPYJ/C2Z1qFGMmcw+1PZMUM3Z8wt8NRfYTvCni93mgsgA==", + "dev": true, + "dependencies": { + "mdast-util-to-markdown": "^0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.6.tgz", + "integrity": "sha512-j4yDxQ66AJSBwGkbpFEp9uG/LS1tZV3P33fN1gkyRB2LoRL+RR3f76m0HPHaby6F4Z5xr9Fv1URmATlRRUIpRQ==", + "dev": true, + "dependencies": { + "markdown-table": "^2.0.0", + "mdast-util-to-markdown": "~0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.6.tgz", + "integrity": "sha512-/d51FFIfPsSmCIRNp7E6pozM9z1GYPIkSy1urQ8s/o4TC22BZ7DqfHFWiqBD23bc7J3vV1Fc9O4QIHBlfuit8A==", + "dev": true, + "dependencies": { + "mdast-util-to-markdown": "~0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-heading-style": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/mdast-util-heading-style/-/mdast-util-heading-style-1.0.6.tgz", + "integrity": "sha512-8ZuuegRqS0KESgjAGW8zTx4tJ3VNIiIaGFNEzFpRSAQBavVc7AvOo9I4g3crcZBfYisHs4seYh0rAVimO6HyOw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz", + "integrity": "sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz", + "integrity": "sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-factory-destination": "^1.0.0", + "micromark-factory-label": "^1.0.0", + "micromark-factory-space": "^1.0.0", + "micromark-factory-title": "^1.0.0", + "micromark-factory-whitespace": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-classify-character": "^1.0.0", + "micromark-util-html-tag-name": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-extension-footnote": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/micromark-extension-footnote/-/micromark-extension-footnote-0.3.2.tgz", + "integrity": "sha512-gr/BeIxbIWQoUm02cIfK7mdMZ/fbroRpLsck4kvFtjbzP4yi+OPVbnukTc/zy0i7spC2xYE/dbX1Sur8BEDJsQ==", + "dev": true, + "dependencies": { + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-frontmatter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", + "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", + "dev": true, + "dependencies": { + "fault": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.3.tgz", + "integrity": "sha512-oVN4zv5/tAIA+l3GbMi7lWeYpJ14oQyJ3uEim20ktYFAcfX1x3LNlFGGlmrZHt7u9YlKExmyJdDGaTt6cMSR/A==", + "dev": true, + "dependencies": { + "micromark": "~2.11.0", + "micromark-extension-gfm-autolink-literal": "~0.5.0", + "micromark-extension-gfm-strikethrough": "~0.6.5", + "micromark-extension-gfm-table": "~0.4.0", + "micromark-extension-gfm-tagfilter": "~0.3.0", + "micromark-extension-gfm-task-list-item": "~0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.7.tgz", + "integrity": "sha512-ePiDGH0/lhcngCe8FtH4ARFoxKTUelMp4L7Gg2pujYD5CSMb9PbblnyL+AAMud/SNMyusbS2XDSiPIRcQoNFAw==", + "dev": true, + "dependencies": { + "micromark": "~2.11.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.5.tgz", + "integrity": "sha512-PpOKlgokpQRwUesRwWEp+fHjGGkZEejj83k9gU5iXCbDG+XBA92BqnRKYJdfqfkrRcZRgGuPuXb7DaK/DmxOhw==", + "dev": true, + "dependencies": { + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.3.tgz", + "integrity": "sha512-hVGvESPq0fk6ALWtomcwmgLvH8ZSVpcPjzi0AjPclB9FsVRgMtGZkUcpE0zgjOCFAznKepF4z3hX8z6e3HODdA==", + "dev": true, + "dependencies": { + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", + "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.3.tgz", + "integrity": "sha512-0zvM5iSLKrc/NQl84pZSjGo66aTGd57C1idmlWmE87lkMcXrTxg1uXa/nXomxJytoje9trP0NDLvw4bZ/Z/XCQ==", + "dev": true, + "dependencies": { + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-factory-destination": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", + "integrity": "sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz", + "integrity": "sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz", + "integrity": "sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz", + "integrity": "sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz", + "integrity": "sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.1.0.tgz", + "integrity": "sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz", + "integrity": "sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz", + "integrity": "sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz", + "integrity": "sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz", + "integrity": "sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz", + "integrity": "sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz", + "integrity": "sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-html-tag-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz", + "integrity": "sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz", + "integrity": "sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz", + "integrity": "sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz", + "integrity": "sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz", + "integrity": "sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz", + "integrity": "sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.2.tgz", + "integrity": "sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/nopt": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.0.0.tgz", + "integrity": "sha512-e6Qw1rcrGoSxEH0hQ4GBSdUjkMOtXGhGFXdNT/3ZR0S37eR9DMj5za3dEDWE6o1T3/DP8ZOsPP4MIiky0c3QeA==", + "dev": true, + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz", + "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/prettier": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json-fast": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", + "dev": true, + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/readable-stream": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz", + "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/remark": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/remark/-/remark-14.0.2.tgz", + "integrity": "sha512-A3ARm2V4BgiRXaUo5K0dRvJ1lbogrbXnhkJRmD0yw092/Yl0kOCZt1k9ZeElEwkZsWGsMumz6qL5MfNJH9nOBA==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "remark-parse": "^10.0.0", + "remark-stringify": "^10.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-cli": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-cli/-/remark-cli-11.0.0.tgz", + "integrity": "sha512-8JEWwArXquRq1/In4Ftz7gSG9Scwb1ijT2/dEuBETW9omqhmMRxcfjZ3iKqrak3BnCJeZSXCdWEmPhFKC8+RUQ==", + "dev": true, + "dependencies": { + "remark": "^14.0.0", + "unified-args": "^10.0.0" + }, + "bin": { + "remark": "cli.js" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-footnotes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-3.0.0.tgz", + "integrity": "sha512-ZssAvH9FjGYlJ/PBVKdSmfyPc3Cz4rTWgZLI4iE/SX8Nt5l3o3oEjv3wwG5VD7xOjktzdwp5coac+kJV9l4jgg==", + "dev": true, + "dependencies": { + "mdast-util-footnote": "^0.1.0", + "micromark-extension-footnote": "^0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-frontmatter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", + "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", + "dev": true, + "dependencies": { + "mdast-util-frontmatter": "^0.2.0", + "micromark-extension-frontmatter": "^0.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-gfm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-1.0.0.tgz", + "integrity": "sha512-KfexHJCiqvrdBZVbQ6RopMZGwaXz6wFJEfByIuEwGf0arvITHjiKKZ1dpXujjH9KZdm1//XJQwgfnJ3lmXaDPA==", + "dev": true, + "dependencies": { + "mdast-util-gfm": "^0.1.0", + "micromark-extension-gfm": "^0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/remark-lint/-/remark-lint-8.0.0.tgz", + "integrity": "sha512-ESI8qJQ/TIRjABDnqoFsTiZntu+FRifZ5fJ77yX63eIDijl/arvmDvT+tAf75/Nm5BFL4R2JFUtkHRGVjzYUsg==", + "dev": true, + "dependencies": { + "remark-message-control": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-blockquote-indentation": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-blockquote-indentation/-/remark-lint-blockquote-indentation-2.0.1.tgz", + "integrity": "sha512-uJ9az/Ms9AapnkWpLSCJfawBfnBI2Tn1yUsPNqIFv6YM98ymetItUMyP6ng9NFPqDvTQBbiarulkgoEo0wcafQ==", + "dev": true, + "dependencies": { + "mdast-util-to-string": "^1.0.2", + "pluralize": "^8.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-blockquote-indentation/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-checkbox-character-style": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-checkbox-character-style/-/remark-lint-checkbox-character-style-3.0.0.tgz", + "integrity": "sha512-691OJ5RdBRXVpvnOEiBhMB4uhHJSHVttw83O4qyAkNBiqxa1Axqhsz8FgmzYgRLQbOGd2ncVUcXG1LOJt6C0DQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-checkbox-content-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-checkbox-content-indent/-/remark-lint-checkbox-content-indent-3.0.0.tgz", + "integrity": "sha512-+T4+hoY85qZE2drD2rCe14vF7fAgD3Kv2fkFd1HRvv3M5Riy148w/4YeoBI5U5BpybGTVUeEUYLCeJ8zbJLjkw==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-code-block-style": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-code-block-style/-/remark-lint-code-block-style-2.0.1.tgz", + "integrity": "sha512-eRhmnColmSxJhO61GHZkvO67SpHDshVxs2j3+Zoc5Y1a4zQT2133ZAij04XKaBFfsVLjhbY/+YOWxgvtjx2nmA==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-definition-case": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-definition-case/-/remark-lint-definition-case-2.0.1.tgz", + "integrity": "sha512-M+XlThtQwEJLQnQb5Gi6xZdkw92rGp7m2ux58WMw/Qlcg02WgHR/O0OcHPe5VO5hMJrtI+cGG5T0svsCgRZd3w==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-definition-spacing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-definition-spacing/-/remark-lint-definition-spacing-2.0.1.tgz", + "integrity": "sha512-xK9DOQO5MudITD189VyUiMHBIKltW1oc55L7Fti3i9DedXoBG7Phm+V9Mm7IdWzCVkquZVgVk63xQdqzSQRrSQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-emphasis-marker": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-emphasis-marker/-/remark-lint-emphasis-marker-2.0.1.tgz", + "integrity": "sha512-7mpbAUrSnHiWRyGkbXRL5kfSKY9Cs8cdob7Fw+Z02/pufXMF4yRWaegJ5NTUu1RE+SKlF44wtWWjvcIoyY6/aw==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-fenced-code-flag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-fenced-code-flag/-/remark-lint-fenced-code-flag-2.0.1.tgz", + "integrity": "sha512-+COnWHlS/h02FMxoZWxNlZW3Y8M0cQQpmx3aNCbG7xkyMyCKsMLg9EmRvYHHIbxQCuF3JT0WWx5AySqlc7d+NA==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-fenced-code-marker": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-fenced-code-marker/-/remark-lint-fenced-code-marker-2.0.1.tgz", + "integrity": "sha512-lujpjm04enn3ma6lITlttadld6eQ1OWAEcT3qZzvFHp+zPraC0yr0eXlvtDN/0UH8mrln/QmGiZp3i8IdbucZg==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-file-extension": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/remark-lint-file-extension/-/remark-lint-file-extension-1.0.5.tgz", + "integrity": "sha512-oVQdf5vEomwHkfQ7R/mgmsWW2H/t9kSvnrxtVoNOHr+qnOEafKKDn+AFhioN2kqtjCZBAjSSrePs6xGKmXKDTw==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-final-definition": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/remark-lint-final-definition/-/remark-lint-final-definition-2.1.0.tgz", + "integrity": "sha512-83K7n2icOHPfBzbR5Mr1o7cu8gOjD8FwJkFx/ly+rW+8SHfjCj4D3WOFGQ1xVdmHjfomBDXXDSNo2oiacADVXQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-final-newline": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/remark-lint-final-newline/-/remark-lint-final-newline-1.0.5.tgz", + "integrity": "sha512-rfLlW8+Fz2dqnaEgU4JwLA55CQF1T4mfSs/GwkkeUCGPenvEYwSkCN2KO2Gr1dy8qPoOdTFE1rSufLjmeTW5HA==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-first-heading-level": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-first-heading-level/-/remark-lint-first-heading-level-2.0.1.tgz", + "integrity": "sha512-XoK/eLfnz1VSA8QkfMbdbvlCqOwgw29MAWEGC4Cv0666nTcY9uWHlZ/SV/20YNmuEVdfCA+92v92mM486qcASQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-hard-break-spaces": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-hard-break-spaces/-/remark-lint-hard-break-spaces-2.0.1.tgz", + "integrity": "sha512-Qfn/BMQFamHhtbfLrL8Co/dbYJFLRL4PGVXZ5wumkUO5f9FkZC2RsV+MD9lisvGTkJK0ZEJrVVeaPbUIFM0OAw==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-heading-increment": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-heading-increment/-/remark-lint-heading-increment-2.0.1.tgz", + "integrity": "sha512-bYDRmv/lk3nuWXs2VSD1B4FneGT6v7a74FuVmb305hyEMmFSnneJvVgnOJxyKlbNlz12pq1IQ6MhlJBda/SFtQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-heading-style": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-heading-style/-/remark-lint-heading-style-2.0.1.tgz", + "integrity": "sha512-IrFLNs0M5Vbn9qg51AYhGUfzgLAcDOjh2hFGMz3mx664dV6zLcNZOPSdJBBJq3JQR4gKpoXcNwN1+FFaIATj+A==", + "dev": true, + "dependencies": { + "mdast-util-heading-style": "^1.0.2", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-linebreak-style": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-linebreak-style/-/remark-lint-linebreak-style-2.0.1.tgz", + "integrity": "sha512-4xp3uqJVGvIjCxM3xrTuLRZ8xYM0PZGsvRTCU10t5HYNljPCRSdtY/x98qohEAwS0uleINXz5zpZZT4FGktQnQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-link-title-style": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-link-title-style/-/remark-lint-link-title-style-2.0.1.tgz", + "integrity": "sha512-+Q7Ew8qpOQzjqbDF6sUHmn9mKgje+m2Ho8Xz7cEnGIRaKJgtJzkn/dZqQM/az0gn3zaN6rOuwTwqw4EsT5EsIg==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-list-item-bullet-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-list-item-bullet-indent/-/remark-lint-list-item-bullet-indent-3.0.0.tgz", + "integrity": "sha512-X2rleWP8XReC4LXKF7Qi5vYiPJkA4Grx5zxsjHofFrVRz6j0PYOCuz7vsO+ZzMunFMfom6FODnscSWz4zouDVw==", + "dev": true, + "dependencies": { + "pluralize": "^8.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-list-item-content-indent": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-list-item-content-indent/-/remark-lint-list-item-content-indent-2.0.1.tgz", + "integrity": "sha512-OzUMqavxyptAdG7vWvBSMc9mLW9ZlTjbW4XGayzczd3KIr6Uwp3NEFXKx6MLtYIM/vwBqMrPQUrObOC7A2uBpQ==", + "dev": true, + "dependencies": { + "pluralize": "^8.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-list-item-indent": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-list-item-indent/-/remark-lint-list-item-indent-2.0.1.tgz", + "integrity": "sha512-4IKbA9GA14Q9PzKSQI6KEHU/UGO36CSQEjaDIhmb9UOhyhuzz4vWhnSIsxyI73n9nl9GGRAMNUSGzr4pQUFwTA==", + "dev": true, + "dependencies": { + "pluralize": "^8.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-list-item-spacing": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-list-item-spacing/-/remark-lint-list-item-spacing-3.0.0.tgz", + "integrity": "sha512-SRUVonwdN3GOSFb6oIYs4IfJxIVR+rD0nynkX66qEO49/qDDT1PPvkndis6Nyew5+t+2V/Db9vqllL6SWbnEtw==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-maximum-heading-length": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-maximum-heading-length/-/remark-lint-maximum-heading-length-2.0.1.tgz", + "integrity": "sha512-1CjJ71YDqEpoOjUnc4wrwZV8ZGXWUIYRYeGoarAy3QKHepJL9M+zkdbOxZDfhc3tjVoDW/LWcgsW+DEpczgiMA==", + "dev": true, + "dependencies": { + "mdast-util-to-string": "^1.0.2", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-maximum-heading-length/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-maximum-line-length": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/remark-lint-maximum-line-length/-/remark-lint-maximum-line-length-2.0.3.tgz", + "integrity": "sha512-zyWHBFh1oPAy+gkaVFXiTHYP2WwriIeBtaarDqkweytw0+qmuikjVMJTWbQ3+XfYBreD7KKDM9SI79nkp0/IZQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-auto-link-without-protocol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-auto-link-without-protocol/-/remark-lint-no-auto-link-without-protocol-2.0.1.tgz", + "integrity": "sha512-TFcXxzucsfBb/5uMqGF1rQA+WJJqm1ZlYQXyvJEXigEZ8EAxsxZGPb/gOQARHl/y0vymAuYxMTaChavPKaBqpQ==", + "dev": true, + "dependencies": { + "mdast-util-to-string": "^1.0.2", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-auto-link-without-protocol/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-blockquote-without-marker": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-blockquote-without-marker/-/remark-lint-no-blockquote-without-marker-4.0.0.tgz", + "integrity": "sha512-Y59fMqdygRVFLk1gpx2Qhhaw5IKOR9T38Wf7pjR07bEFBGUNfcoNVIFMd1TCJfCPQxUyJzzSqfZz/KT7KdUuiQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-consecutive-blank-lines": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-consecutive-blank-lines/-/remark-lint-no-consecutive-blank-lines-3.0.0.tgz", + "integrity": "sha512-kmzLlOLrapBKEngwYFTdCZDmeOaze6adFPB7G0EdymD9V1mpAlnneINuOshRLEDKK5fAhXKiZXxdGIaMPkiXrA==", + "dev": true, + "dependencies": { + "pluralize": "^8.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-duplicate-defined-urls": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-duplicate-defined-urls/-/remark-lint-no-duplicate-defined-urls-1.0.1.tgz", + "integrity": "sha512-fUx4grm0oboxl+uwsHsRQGp3A929ujORrFoB/5eIyMDslxrgMTHKYf9ylxcC5yBRypkZi9AhFWBJ/wtVrxYEAg==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-stringify-position": "^2.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-duplicate-definitions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-duplicate-definitions/-/remark-lint-no-duplicate-definitions-2.0.1.tgz", + "integrity": "sha512-XL22benJZB01m+aOse91nsu1IMFqeWJWme9QvoJuxIcBROO1BG1VoqLOkwNcawE/M/0CkvTo5rfx0eMlcnXOIw==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-stringify-position": "^2.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-duplicate-headings": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-duplicate-headings/-/remark-lint-no-duplicate-headings-2.0.1.tgz", + "integrity": "sha512-F6AP0FJcHIlkmq0pHX0J5EGvLA9LfhuYTvnNO8y3kvflHeRjFkDyt2foz/taXR8OcLQR51n/jIJiwrrSMbiauw==", + "dev": true, + "dependencies": { + "mdast-util-to-string": "^1.0.2", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-stringify-position": "^2.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-duplicate-headings-in-section": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/remark-lint-no-duplicate-headings-in-section/-/remark-lint-no-duplicate-headings-in-section-2.0.2.tgz", + "integrity": "sha512-qtpTAvXgKkzDas7z3H3tzf/SDQIZ6zPEc9CaGZS/qMA2b5ORfQv+EC8NueK4x6+el19kbS6tX23iEnPXVYq1VQ==", + "dev": true, + "dependencies": { + "mdast-util-to-string": "^1.0.2", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-stringify-position": "^2.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-duplicate-headings-in-section/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-duplicate-headings/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-emphasis-as-heading": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-emphasis-as-heading/-/remark-lint-no-emphasis-as-heading-2.0.1.tgz", + "integrity": "sha512-z86+yWtVivtuGIxIC4g9RuATbgZgOgyLcnaleonJ7/HdGTYssjJNyqCJweaWSLoaI0akBQdDwmtJahW5iuX3/g==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-empty-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-empty-url/-/remark-lint-no-empty-url-2.0.1.tgz", + "integrity": "sha512-CBO5hgxlHWrnBPex0GfKZy6ORe2wkLrrHODVPUpLplDA72cQbDzQKedHGgh76euGDs+jvP7RO+IljozdLLfSTw==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-file-name-articles": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-articles/-/remark-lint-no-file-name-articles-1.0.5.tgz", + "integrity": "sha512-AQk5eTb3s3TAPPjiglZgqlQj4ycao+gPs8/XkdN1VCPUtewW0GgwoQe7YEuBKayJ6ioN8dGP37Kg/P/PlKaRQA==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-file-name-consecutive-dashes": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-consecutive-dashes/-/remark-lint-no-file-name-consecutive-dashes-1.0.5.tgz", + "integrity": "sha512-Mg2IDsi790/dSdAzwnBnsMYdZm3qC2QgGwqOWcr0TPABJhhjC3p8r5fX4MNMTXI5It7B7bW9+ImmCeLOZiXkLg==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-file-name-irregular-characters": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-irregular-characters/-/remark-lint-no-file-name-irregular-characters-1.0.5.tgz", + "integrity": "sha512-Oe5i99qNUKc2bxmiH421o5B/kqlf1dfjAxpHNLhi2X2dXE91zRGavrlRM/4f4oR0N9Bqb3qB9JZPyMPWrzu9XA==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-file-name-mixed-case": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-mixed-case/-/remark-lint-no-file-name-mixed-case-1.0.5.tgz", + "integrity": "sha512-ilrUCbHZin/ENwr8c3SC2chgkFsizXjBQIB/oZ7gnm1IkCkZPiMyXZAHdpwC/DjbrpGxfMYh9JmIHao4giS5+A==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-file-name-outer-dashes": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-outer-dashes/-/remark-lint-no-file-name-outer-dashes-1.0.6.tgz", + "integrity": "sha512-rT8CmcIlenegS0Yst4maYXdZfqIjBOiRUY8j/KJkORF5tKH+3O1/S07025qPGmcRihzK3w4yO0K8rgkKQw0b9w==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-heading-content-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-heading-content-indent/-/remark-lint-no-heading-content-indent-3.0.0.tgz", + "integrity": "sha512-yULDoVSIqKylLDfW6mVUbrHlyEWUSFtVFiKc+/BA412xDIhm8HZLUnP+FsuBC0OzbIZ+bO9Txy52WtO3LGnK1A==", + "dev": true, + "dependencies": { + "mdast-util-heading-style": "^1.0.2", + "pluralize": "^8.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-heading-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-heading-indent/-/remark-lint-no-heading-indent-3.0.0.tgz", + "integrity": "sha512-b8ImhLv2AnRDxtYUODplzsl/7IwQ+lqRmD1bwbZgSerEP9MLaULW3SjH37EyA6z+8rCDjvEyppKKU6zec0TCjg==", + "dev": true, + "dependencies": { + "pluralize": "^8.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-heading-like-paragraph": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-heading-like-paragraph/-/remark-lint-no-heading-like-paragraph-2.0.1.tgz", + "integrity": "sha512-9JDhpIvs4996PnHF5KUnx8/YN39MvZR0uf+EeVILdJbJ2IUL8BOlGNhMFc0CSmxajtIxobjiS+yzAvLG57pUFw==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-heading-punctuation": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-heading-punctuation/-/remark-lint-no-heading-punctuation-2.0.1.tgz", + "integrity": "sha512-lY/eF6GbMeGu4cSuxfGHyvaQQBIq/6T/o+HvAR5UfxSTxmxZFwbZneAI2lbeR1zPcqOU87NsZ5ZZzWVwdLpPBw==", + "dev": true, + "dependencies": { + "mdast-util-to-string": "^1.0.2", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-heading-punctuation/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-html": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-html/-/remark-lint-no-html-2.0.1.tgz", + "integrity": "sha512-fDISacCkZCRgl1MeCx5Fx+eWL0iS2GK1EOETR1yAA0av7LYiF8tUwsP4/iRqcxIT30YoDlYoiNRyprD2eyWsUg==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-inline-padding": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-inline-padding/-/remark-lint-no-inline-padding-3.0.0.tgz", + "integrity": "sha512-3s9uW3Yux9RFC0xV81MQX3bsYs+UY7nPnRuMxeIxgcVwxQ4E/mTJd9QjXUwBhU9kdPtJ5AalngdmOW2Tgar8Cg==", + "dev": true, + "dependencies": { + "mdast-util-to-string": "^1.0.2", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-inline-padding/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-literal-urls": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-literal-urls/-/remark-lint-no-literal-urls-2.0.1.tgz", + "integrity": "sha512-IDdKtWOMuKVQIlb1CnsgBoyoTcXU3LppelDFAIZePbRPySVHklTtuK57kacgU5grc7gPM04bZV96eliGrRU7Iw==", + "dev": true, + "dependencies": { + "mdast-util-to-string": "^1.0.2", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-literal-urls/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-missing-blank-lines": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-missing-blank-lines/-/remark-lint-no-missing-blank-lines-2.0.1.tgz", + "integrity": "sha512-gM46JM8NMFj5PG8pkxOQ0AvkRMEX1lD7UO9b/eqUgYQ6OiJaCG8dInogCd++MVSUDpMMf4FF9dksRM/AOiFgIQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-multiple-toplevel-headings": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-multiple-toplevel-headings/-/remark-lint-no-multiple-toplevel-headings-2.0.1.tgz", + "integrity": "sha512-VKSItR6c+u3OsE5pUiSmNusERNyQS9Nnji26ezoQ1uvy06k3RypIjmzQqJ/hCkSiF+hoyC3ibtrrGT8gorzCmQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-stringify-position": "^2.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-paragraph-content-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-paragraph-content-indent/-/remark-lint-no-paragraph-content-indent-3.0.0.tgz", + "integrity": "sha512-breI0QSFAxvs2osc8yAzPqWoi4VfY9ccyV+/WQKOIIU8yTj8swN/kFFqnP7wdeY4O9BSmUJ7bPdWCsmrVworXA==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-reference-like-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-reference-like-url/-/remark-lint-no-reference-like-url-2.0.1.tgz", + "integrity": "sha512-MeZtlimw30Hd74tBQOe5xlKXU9K5EGF6q/rj/VU4vfdwmCWI9LBCarxPmqHYkm7sbD3P7k9g5oB4StmWZYr5pQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-shell-dollars": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/remark-lint-no-shell-dollars/-/remark-lint-no-shell-dollars-2.0.2.tgz", + "integrity": "sha512-zhkHZOuyaD3r/TUUkkVqW0OxsR9fnSrAnHIF63nfJoAAUezPOu8D1NBsni6rX8H2DqGbPYkoeWrNsTwiKP0yow==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-shortcut-reference-image": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-shortcut-reference-image/-/remark-lint-no-shortcut-reference-image-2.0.1.tgz", + "integrity": "sha512-2jcZBdnN6ecP7u87gkOVFrvICLXIU5OsdWbo160FvS/2v3qqqwF2e/n/e7D9Jd+KTq1mR1gEVVuTqkWWuh3cig==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-shortcut-reference-link": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-shortcut-reference-link/-/remark-lint-no-shortcut-reference-link-2.0.1.tgz", + "integrity": "sha512-pTZbslG412rrwwGQkIboA8wpBvcjmGFmvugIA+UQR+GfFysKtJ5OZMPGJ98/9CYWjw9Z5m0/EktplZ5TjFjqwA==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-table-indentation": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-table-indentation/-/remark-lint-no-table-indentation-3.0.0.tgz", + "integrity": "sha512-+l7GovI6T+3LhnTtz/SmSRyOb6Fxy6tmaObKHrwb/GAebI/4MhFS1LVo3vbiP/RpPYtyQoFbbuXI55hqBG4ibQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-tabs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-tabs/-/remark-lint-no-tabs-2.0.1.tgz", + "integrity": "sha512-Fy5fMKNA8AsfhRtxyxBnHlGMpDDfns9VSSYv00RiC96qwRD82VhDRM3tYWZRBBxE+j71t6g47x9o/poGC7PThQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-undefined-references": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-undefined-references/-/remark-lint-no-undefined-references-3.0.0.tgz", + "integrity": "sha512-0hzaJS9GuzSQVOeeNdJr/s66LRQOzp618xuOQPYWHcJdd+SCaRTyWbjMrTM/cCI5L1sYjgurp410NkIBQ32Vqg==", + "dev": true, + "dependencies": { + "collapse-white-space": "^1.0.4", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.1.0", + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-unneeded-full-reference-image": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-unneeded-full-reference-image/-/remark-lint-no-unneeded-full-reference-image-2.0.1.tgz", + "integrity": "sha512-ZqkrW6l/n1EmcGdtzBFoDygG2ehd/Wx46Id9Dagg15oLzwvbhp5mJIXArXU2qGrF82w1hfainCaZzyH/OBJtEg==", + "dev": true, + "dependencies": { + "collapse-white-space": "^1.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-unneeded-full-reference-link": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-unneeded-full-reference-link/-/remark-lint-no-unneeded-full-reference-link-2.0.1.tgz", + "integrity": "sha512-OcPQiG6meVpvfydzxkxPdVc8jcXdklQW4gMjY2BevLtVoaIJ+dgNBPazyYHP/0EzpVY2RftD3CZ+5hiLW2rgpA==", + "dev": true, + "dependencies": { + "collapse-white-space": "^1.0.0", + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-no-unused-definitions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-unused-definitions/-/remark-lint-no-unused-definitions-2.0.1.tgz", + "integrity": "sha512-+BMc0BOjc364SvKYLkspmxDch8OaKPbnUGgQBvK0Bmlwy42baR4C9zhwAWBxm0SBy5Z4AyM4G4jKpLXPH40Oxg==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-ordered-list-marker-style": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-ordered-list-marker-style/-/remark-lint-ordered-list-marker-style-2.0.1.tgz", + "integrity": "sha512-Cnpw1Dn9CHn+wBjlyf4qhPciiJroFOEGmyfX008sQ8uGoPZsoBVIJx76usnHklojSONbpjEDcJCjnOvfAcWW1A==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-ordered-list-marker-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-ordered-list-marker-value/-/remark-lint-ordered-list-marker-value-2.0.1.tgz", + "integrity": "sha512-blt9rS7OKxZ2NW8tqojELeyNEwPhhTJGVa+YpUkdEH+KnrdcD7Nzhnj6zfLWOx6jFNZk3jpq5nvLFAPteHaNKg==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-rule-style": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-rule-style/-/remark-lint-rule-style-2.0.1.tgz", + "integrity": "sha512-hz4Ff9UdlYmtO6Czz99WJavCjqCer7Cav4VopXt+yVIikObw96G5bAuLYcVS7hvMUGqC9ZuM02/Y/iq9n8pkAg==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-strong-marker": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-strong-marker/-/remark-lint-strong-marker-2.0.1.tgz", + "integrity": "sha512-8X2IsW1jZ5FmW9PLfQjkL0OVy/J3xdXLcZrG1GTeQKQ91BrPFyEZqUM2oM6Y4S6LGtxWer+neZkPZNroZoRPBQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-table-cell-padding": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-table-cell-padding/-/remark-lint-table-cell-padding-3.0.0.tgz", + "integrity": "sha512-sEKrbyFZPZpxI39R8/r+CwUrin9YtyRwVn0SQkNQEZWZcIpylK+bvoKIldvLIXQPob+ZxklL0GPVRzotQMwuWQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-table-pipe-alignment": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-table-pipe-alignment/-/remark-lint-table-pipe-alignment-2.0.1.tgz", + "integrity": "sha512-O89U7bp0ja6uQkT2uQrNB76GaPvFabrHiUGhqEUnld21yEdyj7rgS57kn84lZNSuuvN1Oor6bDyCwWQGzzpoOQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-table-pipes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-table-pipes/-/remark-lint-table-pipes-3.0.0.tgz", + "integrity": "sha512-QPokSazEdl0Y8ayUV9UB0Ggn3Jos/RAQwIo0z1KDGnJlGDiF80Jc6iU9RgDNUOjlpQffSLIfSVxH5VVYF/K3uQ==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint-unordered-list-marker-style": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-unordered-list-marker-style/-/remark-lint-unordered-list-marker-style-2.0.1.tgz", + "integrity": "sha512-8KIDJNDtgbymEvl3LkrXgdxPMTOndcux3BHhNGB2lU4UnxSpYeHsxcDgirbgU6dqCAfQfvMjPvfYk19QTF9WZA==", + "dev": true, + "dependencies": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-message-control": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/remark-message-control/-/remark-message-control-6.0.0.tgz", + "integrity": "sha512-k9bt7BYc3G7YBdmeAhvd3VavrPa/XlKWR3CyHjr4sLO9xJyly8WHHT3Sp+8HPR8lEUv+/sZaffL7IjMLV0f6BA==", + "dev": true, + "dependencies": { + "mdast-comment-marker": "^1.0.0", + "unified-message-control": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.1.tgz", + "integrity": "sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-from-markdown": "^1.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-10.0.2.tgz", + "integrity": "sha512-6wV3pvbPvHkbNnWB0wdDvVFHOe1hBRAx1Q/5g/EpH4RppAII6J8Gnwe7VbHuXaoKIF6LAg6ExTel/+kNqSQ7lw==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-markdown": "^1.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/longest-streak": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", + "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/mdast-util-to-markdown": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz", + "integrity": "sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^3.0.0", + "mdast-util-to-string": "^3.0.0", + "micromark-util-decode-string": "^1.0.0", + "unist-util-visit": "^4.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/mdast-util-to-string": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.1.1.tgz", + "integrity": "sha512-tGvhT94e+cVnQt8JWE9/b3cUQZWS732TJxXHktvP+BYo62PpYD53Ls/6cC60rW21dW+txxiM4zMdc6abASvZKA==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "node_modules/rxjs": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dev": true, + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.0.tgz", + "integrity": "sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha512-VZBmZP8WU3sMOZm1bdgTadsQbcscK0UM8oKxKVBs4XAhUo2Xxzm/OFMGBkPusxw9xL3Uy8LrzEqGqJhclsr0yA==", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "dev": true + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string.prototype.padend": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz", + "integrity": "sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/to-vfile": { + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-7.2.4.tgz", + "integrity": "sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==", + "dev": true, + "dependencies": { + "is-buffer": "^2.0.0", + "vfile": "^5.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/trough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz", + "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-args": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/unified-args/-/unified-args-10.0.0.tgz", + "integrity": "sha512-PqsqxwkXpGSLiMkbjNnKU33Ffm6gso6rAvz1TlBGzMBx3gpx7ewIhViBX8HEWmy0v7pebA5PM6RkRWWaYmtfYw==", + "dev": true, + "dependencies": { + "@types/text-table": "^0.2.0", + "camelcase": "^7.0.0", + "chalk": "^5.0.0", + "chokidar": "^3.0.0", + "fault": "^2.0.0", + "json5": "^2.0.0", + "minimist": "^1.0.0", + "text-table": "^0.2.0", + "unified-engine": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-args/node_modules/chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/unified-args/node_modules/fault": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz", + "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==", + "dev": true, + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unified-engine": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-10.1.0.tgz", + "integrity": "sha512-5+JDIs4hqKfHnJcVCxTid1yBoI/++FfF/1PFdSMpaftZZZY+qg2JFruRbf7PaIwa9KgLotXQV3gSjtY0IdcFGQ==", + "dev": true, + "dependencies": { + "@types/concat-stream": "^2.0.0", + "@types/debug": "^4.0.0", + "@types/is-empty": "^1.0.0", + "@types/node": "^18.0.0", + "@types/unist": "^2.0.0", + "concat-stream": "^2.0.0", + "debug": "^4.0.0", + "fault": "^2.0.0", + "glob": "^8.0.0", + "ignore": "^5.0.0", + "is-buffer": "^2.0.0", + "is-empty": "^1.0.0", + "is-plain-obj": "^4.0.0", + "load-plugin": "^5.0.0", + "parse-json": "^6.0.0", + "to-vfile": "^7.0.0", + "trough": "^2.0.0", + "unist-util-inspect": "^7.0.0", + "vfile-message": "^3.0.0", + "vfile-reporter": "^7.0.0", + "vfile-statistics": "^2.0.0", + "yaml": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-engine/node_modules/fault": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz", + "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==", + "dev": true, + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unified-engine/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/unified-engine/node_modules/parse-json": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-6.0.2.tgz", + "integrity": "sha512-SA5aMiaIjXkAiBrW/yPgLgQAQg42f7K3ACO+2l/zOvtQBwX58DMUsFJXelW2fx3yMBmWOVkR6j1MGsdSbCA4UA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.0", + "error-ex": "^1.3.2", + "json-parse-even-better-errors": "^2.3.1", + "lines-and-columns": "^2.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unified-lint-rule": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/unified-lint-rule/-/unified-lint-rule-1.0.6.tgz", + "integrity": "sha512-YPK15YBFwnsVorDFG/u0cVVQN5G2a3V8zv5/N6KN3TCG+ajKtaALcy7u14DCSrJI+gZeyYquFL9cioJXOGXSvg==", + "dev": true, + "dependencies": { + "wrapped": "^1.0.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-message-control": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unified-message-control/-/unified-message-control-3.0.3.tgz", + "integrity": "sha512-oY5z2n8ugjpNHXOmcgrw0pQeJzavHS0VjPBP21tOcm7rc2C+5Q+kW9j5+gqtf8vfW/8sabbsK5+P+9QPwwEHDA==", + "dev": true, + "dependencies": { + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-generated": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-inspect": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/unist-util-inspect/-/unist-util-inspect-7.0.2.tgz", + "integrity": "sha512-Op0XnmHUl6C2zo/yJCwhXQSm/SmW22eDZdWP2qdf4WpGrgO1ZxFodq+5zFyeRGasFjJotAnLgfuD1jkcKqiH1Q==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", + "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/uvu": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", + "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", + "dev": true, + "dependencies": { + "dequal": "^2.0.0", + "diff": "^5.0.0", + "kleur": "^4.0.3", + "sade": "^1.7.3" + }, + "bin": { + "uvu": "bin.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-reporter": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-7.0.5.tgz", + "integrity": "sha512-NdWWXkv6gcd7AZMvDomlQbK3MqFWL1RlGzMn++/O2TI+68+nqxCPTvLugdOtfSzXmjh+xUyhp07HhlrbJjT+mw==", + "dev": true, + "dependencies": { + "@types/supports-color": "^8.0.0", + "string-width": "^5.0.0", + "supports-color": "^9.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile": "^5.0.0", + "vfile-message": "^3.0.0", + "vfile-sort": "^3.0.0", + "vfile-statistics": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-reporter/node_modules/supports-color": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.3.1.tgz", + "integrity": "sha512-knBY82pjmnIzK3NifMo3RxEIRD9E0kIzV4BKcyTZ9+9kWgLMxd4PrsTSMoFQUabgRBbF8KOLRDCyKgNV+iK44Q==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/vfile-reporter/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-sort": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-sort/-/vfile-sort-3.0.1.tgz", + "integrity": "sha512-1os1733XY6y0D5x0ugqSeaVJm9lYgj0j5qdcZQFyxlZOSy1jYarL77lLyb5gK4Wqr1d5OxmuyflSO3zKyFnTFw==", + "dev": true, + "dependencies": { + "vfile": "^5.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-statistics": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/vfile-statistics/-/vfile-statistics-2.0.1.tgz", + "integrity": "sha512-W6dkECZmP32EG/l+dp2jCLdYzmnDBIw6jwiLZSER81oR5AHRcVqL+k3Z+pfH1R73le6ayDkJRMk0sutj1bMVeg==", + "dev": true, + "dependencies": { + "vfile": "^5.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/walk-up-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", + "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", + "dev": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrapped": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wrapped/-/wrapped-1.0.1.tgz", + "integrity": "sha512-ZTKuqiTu3WXtL72UKCCnQLRax2IScKH7oQ+mvjbpvNE+NJxIWIemDqqM2GxNr4N16NCjOYpIgpin5pStM7kM5g==", + "dev": true, + "dependencies": { + "co": "3.1.0", + "sliced": "^1.0.1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.1.tgz", + "integrity": "sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, + "node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + } +} diff --git a/vim/.config/vim/plugged/nord-vim/package.json b/vim/.config/vim/plugged/nord-vim/package.json new file mode 100644 index 0000000..2000b96 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/package.json @@ -0,0 +1,39 @@ +{ + "name": "@nordtheme/vim", + "version": "0.19.0", + "description": "An arctic, north-bluish clean and elegant Vim theme", + "author": "Sven Greb (https://www.svengreb.de)", + "homepage": "https://www.nordtheme.com/ports/vim", + "repository": { + "type": "git", + "url": "git+https://github.com/nordtheme/vim.git" + }, + "bugs": { + "url": "https://github.com/nordtheme/vim/issues" + }, + "license": "MIT", + "private": true, + "engines": { + "node": ">=15.13", + "npm": ">=7.7" + }, + "scripts": { + "format": "run-s format:pretty", + "format:pretty": "prettier --write .", + "lint": "run-s lint:md lint:pretty", + "lint:ci": "run-s lint:md lint:ci:*", + "lint:ci:pretty": "prettier --loglevel silent --check .", + "lint:md": "remark --no-stdout .", + "lint:pretty": "prettier --check .", + "prepare:husky": "husky install", + "prepare": "run-s prepare:*" + }, + "devDependencies": { + "@arcticicestudio/remark-preset-lint": ">=0.4.0 <1.0.0", + "husky": "8.0.3", + "lint-staged": "13.1.2", + "npm-run-all": "4.1.5", + "prettier": "^2.8.4", + "remark-cli": "11.0.0" + } +} diff --git a/vim/.config/vim/plugged/nord-vim/readme.md b/vim/.config/vim/plugged/nord-vim/readme.md new file mode 100644 index 0000000..57cd7e8 --- /dev/null +++ b/vim/.config/vim/plugged/nord-vim/readme.md @@ -0,0 +1,150 @@ +

+ + + + + + +

+ +

+ + + + + + + + + +

+ +

+ + + + + + +

+ +

An arctic, north-bluish clean and elegant Vim color theme.

+ +

Designed for a fluent and clear workflow based on the Nord color palette.

+ +

+ + + + + +

+ +Build for Vim's terminal- and GUI mode with _true colors_ with support for many third-party syntax and UI plugins including bundled themes for [lightline.vim][1] and [vim-airline][4]. + +## Getting Started + +Visit the [official website][23] to learn all about the [syntax highlighting][27] features, details and elements of [UI and editor elements][25], the [various theme configurations][24] and the [support for many plugins][26]. + +Learn about the [installation and activation][20], how to [configure][18] and [customize][19] the theme from the [official documentations][22]. + +### Quick Start + +Thanks to existing plugin/_runtimepath_ managers for Vim, Nord Vim can be installed for all platforms and the various variants/forks of Vim in a uniform way within a few lines of codes. The recommended manager is [vim-plug][2], but any other manager like [pathogen][3] or [Vundle][5] can also be used. + +To automatically download and activate Nord Vim, follow the install instructions for [vim-plug][2] and + +1. add `Plug 'nordtheme/vim'` to your [`vimrc`][28] within _vim-plug_'s plugin loading function +2. run the `:PlugInstall` command in Vim +3. activate the theme by adding `colorscheme nord` to the [vimrc][28] or change it on-the-fly by running `:colorscheme nord` + +

+ + + +

+ +See the Nord Vim's documentation for [more installation options][20] and how to [set it up manually][21]. + +## Features + +

+ A unified UI and editor syntax element design provides a clutter-free and fluidly merging appearance.
+ + + +

+ +

+ Small details with unobtrusive styles for popular and common code editor features like search result marker and brace matching — designed to get out of your way with a visually attractive appearance.
+ + + +

+ +

+ Support for a wide range of programming languages — from bundled plugins up to many popular syntax and UI third-party plugins.
+ + + +

+ +## Contributing + +Nord is an open source project and we love to receive contributions from the [community][6]! + +There are many ways to contribute, from [writing- and improving documentation and tutorials][9], [reporting bugs][8], [submitting enhancement suggestions][10] that can be added to Nord by [submitting pull requests][14]. + +Please take a moment to read Nord's full [contributing guide][17] to learn about the development process, the project's used [styleguides][15], [branch organization][7] and [versioning][16] model. + +The guide also includes information about [minimal, complete, and verifiable examples][13] and other ways to contribute to the project like [improving existing issues][12] and [giving feedback on issues and pull requests][11]. + +

+ + + + + +

+ +

+ Copyright © 2016-present Sven Greb +

+ +

+ + + + + + +

+ +[1]: https://github.com/itchyny/lightline.vim +[2]: https://github.com/junegunn/vim-plug +[3]: https://github.com/tpope/vim-pathogen +[4]: https://github.com/vim-airline/vim-airline +[5]: https://github.com/tpope/vim-pathogen +[6]: https://www.nordtheme.com/community +[7]: https://github.com/nordtheme/.github/blob/main/contributing.md#branch-organization +[8]: https://github.com/nordtheme/.github/blob/main/contributing.md#bug-reports +[9]: https://github.com/nordtheme/.github/blob/main/contributing.md#documentations +[10]: https://github.com/nordtheme/.github/blob/main/contributing.md#enhancement-suggestions +[11]: https://github.com/nordtheme/.github/blob/main/contributing.md#feedback +[12]: https://github.com/nordtheme/.github/blob/main/contributing.md#improve-issues +[13]: https://github.com/nordtheme/.github/blob/main/contributing.md#mcve +[14]: https://github.com/nordtheme/.github/blob/main/contributing.md#pull-requests +[15]: https://github.com/nordtheme/.github/blob/main/contributing.md#style-guides +[16]: https://github.com/nordtheme/.github/blob/main/contributing.md#versioning +[17]: https://github.com/nordtheme/.github/blob/main/contributing.md +[18]: https://www.nordtheme.com/docs/ports/vim/configuration +[19]: https://www.nordtheme.com/docs/ports/vim/customization +[20]: https://www.nordtheme.com/docs/ports/vim/installation +[21]: https://www.nordtheme.com/docs/ports/vim/installation#manual +[22]: https://www.nordtheme.com/docs/ports/vim +[23]: https://www.nordtheme.com/ports/vim +[24]: https://www.nordtheme.com/ports/vim#configurations +[25]: https://www.nordtheme.com/ports/vim#editor-details +[26]: https://www.nordtheme.com/ports/vim#plugin-support +[27]: https://www.nordtheme.com/ports/vim#syntax +[28]: https://vimhelp.org/starting.txt.html#vimrc diff --git a/vim/.config/vim/plugged/taglist b/vim/.config/vim/plugged/taglist new file mode 160000 index 0000000..64456ad --- /dev/null +++ b/vim/.config/vim/plugged/taglist @@ -0,0 +1 @@ +Subproject commit 64456adf09b406734f00fe1dd7f9d0f9424d7aa7000000000000000000000000 diff --git a/vim/.config/vim/plugged/vim-SyntaxRange b/vim/.config/vim/plugged/vim-SyntaxRange new file mode 160000 index 0000000..3a7fd9f --- /dev/null +++ b/vim/.config/vim/plugged/vim-SyntaxRange @@ -0,0 +1 @@ +Subproject commit 3a7fd9ff50fabafe61df12522ed2f275c8e2f45e000000000000000000000000 diff --git a/vim/.config/vim/plugged/vim-airline b/vim/.config/vim/plugged/vim-airline new file mode 160000 index 0000000..ff7352e --- /dev/null +++ b/vim/.config/vim/plugged/vim-airline @@ -0,0 +1 @@ +Subproject commit ff7352e4bff02eb600a136b6fd741404f3195371000000000000000000000000 diff --git a/vim/.config/vim/plugged/vim-airline-themes b/vim/.config/vim/plugged/vim-airline-themes new file mode 160000 index 0000000..a9aa25c --- /dev/null +++ b/vim/.config/vim/plugged/vim-airline-themes @@ -0,0 +1 @@ +Subproject commit a9aa25ce323b2dd04a52706f4d1b044f4feb7617000000000000000000000000 diff --git a/vim/.config/vim/plugged/vim-css-color/.gitattributes b/vim/.config/vim/plugged/vim-css-color/.gitattributes new file mode 100644 index 0000000..4dcc011 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/.gitattributes @@ -0,0 +1,5 @@ +/autoload/css_color.vim export-subst +/.gitattributes export-ignore +/README.md export-ignore +/LICENSE export-ignore +/tests export-ignore diff --git a/vim/.config/vim/plugged/vim-css-color/LICENSE b/vim/.config/vim/plugged/vim-css-color/LICENSE new file mode 100644 index 0000000..49bcde4 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Aristotle Pagaltzis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/vim/.config/vim/plugged/vim-css-color/README.md b/vim/.config/vim/plugged/vim-css-color/README.md new file mode 100644 index 0000000..1e59c5e --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/README.md @@ -0,0 +1,16 @@ +

CSS Color

+ +
+A very fast, multi-syntax context-sensitive color name highlighter
+ + + +
#  Install:  If you use a plugin manager then follow its instructions.  Otherwise:     
+git clone https://github.com/ap/vim-css-color.git ~/.vim/pack/css-color/start/css-color
+

+ +
+ +Inspired +by [Niklas Hofer](http://www.vim.org/scripts/script.php?script_id=2150) +and [Max Vasiliev](https://github.com/skammer/vim-css-color). diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/c.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/c.vim new file mode 100644 index 0000000..0715551 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/c.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'cComment,cCommentL,cString,cCppString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/cfg.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/cfg.vim new file mode 100644 index 0000000..6bf2641 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/cfg.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'CfgComment,CfgString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/clojure.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/clojure.vim new file mode 100644 index 0000000..ada6846 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/clojure.vim @@ -0,0 +1,2 @@ +let [type, keywords] = expand('%:e') ==? 'cljs' ? ['css', 'extended'] : ['hex', 'none'] +call css_color#init(type, keywords, 'clojureComment,clojureString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/csh.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/csh.vim new file mode 100644 index 0000000..c8ecc61 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/csh.vim @@ -0,0 +1,4 @@ +syn match cshCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=cshComment +call css_color#init( 'hex', 'none' + \, 'cshDblQuote,cshSnglQuote,cshHereDoc,' + \. 'cshCommentColor' ) diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/css.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/css.vim new file mode 100644 index 0000000..5134d23 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/css.vim @@ -0,0 +1 @@ +call css_color#init('css', 'extended', 'cssMediaBlock,cssFunction,cssDefinition,cssAttrRegion,cssComment') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/dosini.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/dosini.vim new file mode 100644 index 0000000..31ae9f8 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/dosini.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'dosiniValue') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/elm.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/elm.vim new file mode 100644 index 0000000..301500b --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/elm.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'elmLineComment,elmString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/fish.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/fish.vim new file mode 100644 index 0000000..bd79512 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/fish.vim @@ -0,0 +1,3 @@ +" https://github.com/dag/vim-fish (and presumably its various forks) +syn match fishCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=fishComment +call css_color#init( 'hex', 'none', 'fishString,fishCommentColor' ) diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/go.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/go.vim new file mode 100644 index 0000000..65bcaa8 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/go.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'goComment,goString,goRawString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/html.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/html.vim new file mode 100644 index 0000000..6cc6459 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/html.vim @@ -0,0 +1,2 @@ +" default html syntax should already be including the css syntax +call css_color#init('none', 'none', 'htmlString,htmlCommentPart') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/i3.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/i3.vim new file mode 100644 index 0000000..540520c --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/i3.vim @@ -0,0 +1,4 @@ +" see also: i3config.vim for the stock Vim 8.2+ syntax +" Colour => https://github.com/moon-musick/vim-i3-config-syntax +" i3* => https://github.com/PotatoesMaster/i3-vim-syntax +call css_color#init('hex', 'none', 'Colour,i3SimpleString,i3Color1st,i3Color2nd,i3ColorLast') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/i3config.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/i3config.vim new file mode 100644 index 0000000..3fda772 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/i3config.vim @@ -0,0 +1,3 @@ +" i3ConfigColor => stock Vim syntax and recent https://github.com/mboughaba/i3config.vim +" Color => https://github.com/mboughaba/i3config.vim prior to dff3b177ebaf6aae35591cd4c9c734fff9ed7145 +call css_color#init('hex', 'none', 'i3ConfigColor,Color') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/javascript.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/javascript.vim new file mode 100644 index 0000000..e94b6f7 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/javascript.vim @@ -0,0 +1,14 @@ +" ft=coffee includes javascript, but mostly sets up own syntax groups +" so until it has specific support there's no point in loading anyway +" and for some reason the W3C syntax color keywords break its highlighting +" (this refers to the https://github.com/kchmck/vim-coffee-script plugin) +if &syntax =~# '\(^\|\.\)coffee\($\|\.\)' | finish | endif + +" javaScriptX = default Vim syntax +" jsX = https://github.com/pangloss/vim-javascript +" javascriptX = https://github.com/othree/yajs.vim +call css_color#init('hex', 'extended' + \, 'javaScriptComment,javaScriptLineComment,javaScriptStringS,javaScriptStringD,javaScriptStringT' + \. ',jsComment,jsString,jsTemplateString,jsObjectKeyString,jsObjectStringKey,jsClassStringKey' + \. ',javascriptComment,javascriptLineComment,javascriptLineComment,javascriptString,javascriptTemplate' + \) diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/json.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/json.vim new file mode 100644 index 0000000..244f941 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/json.vim @@ -0,0 +1 @@ +call css_color#init('css', 'none', 'jsonString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/jsx.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/jsx.vim new file mode 100644 index 0000000..e2f0d36 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/jsx.vim @@ -0,0 +1,3 @@ +" jsx syntax should already be including the javascript and xml syntaxes +" but those only use `hex` parsing; JSX needs `css` for inline CSS styles +call css_color#init('css', 'none', '') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/kitty.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/kitty.vim new file mode 100644 index 0000000..78ce6a7 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/kitty.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'kittyColor,kittyComment') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/less.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/less.vim new file mode 100644 index 0000000..443ad6a --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/less.vim @@ -0,0 +1,8 @@ +" variable | property | multiline | end-of-line | plugin +" -----------------------+----------------+----------------+-------------+--------- +" lessCssAttribute | lessCssComment | lessComment | https://github.com/genoma/vim-less +" lessAttribute | lessCssComment | lessComment | https://github.com/KohPoll/vim-less +" lessVariableValue | lessDefinition | cssComment | lessComment | https://github.com/groenewege/vim-less +" lessVariableDefinition | cssDefinition | cssComment | lessComment | https://github.com/lunaru/vim-less + +call css_color#init('css', 'extended', 'lessVariableValue,lessVariableDefinition,lessDefinition,lessCssAttribute,lessAttribute,cssDefinition,cssComment,lessCssComment,lessComment') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/moon.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/moon.vim new file mode 100644 index 0000000..6cde606 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/moon.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'extended', 'moonComment,moonString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/nix.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/nix.vim new file mode 100644 index 0000000..8e969c6 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/nix.vim @@ -0,0 +1,2 @@ +" https://github.com/LnL7/vim-nix +call css_color#init('hex', 'none', 'nixComment,nixString,nixSimpleString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/perl.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/perl.vim new file mode 100644 index 0000000..aea285f --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/perl.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'perlComment,perlDATA,perlString,perlStringUnexpanded,perlQQ,perlHereDoc') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/php.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/php.vim new file mode 100644 index 0000000..024a03b --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/php.vim @@ -0,0 +1 @@ +call css_color#init('css', 'basic', 'phpComment,phpStringSingle,phpStringDouble') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/python.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/python.vim new file mode 100644 index 0000000..ac57926 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/python.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'pythonComment,pythonString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/qml.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/qml.vim new file mode 100644 index 0000000..1658a39 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/qml.vim @@ -0,0 +1 @@ +call css_color#init('css', 'extended', 'qmlStringD') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/r.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/r.vim new file mode 100644 index 0000000..b172e55 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/r.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'extended', 'rComment,rString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/rasi.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/rasi.vim new file mode 100644 index 0000000..9f413b3 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/rasi.vim @@ -0,0 +1,4 @@ +" https://github.com/Fymyte/rasi.vim +call css_color#init('css', 'extended' + \, 'rasiHexColor,rasiRGBColor,rasiRGBAColor,rasiHSLColor,rasiHSLAColor,rasiNamedColor' + \. ',rasiPropertyVal,rasiComment,rasiCommentL,rasiEnvVar,rasiVarReference') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/ruby.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/ruby.vim new file mode 100644 index 0000000..d9d647a --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/ruby.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'rubyComment,rubyData,rubyString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/sass.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/sass.vim new file mode 100644 index 0000000..7eb2f07 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/sass.vim @@ -0,0 +1 @@ +call css_color#init('css', 'extended', 'sassCssAttribute,sassComment,sassCssComment') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/scss.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/scss.vim new file mode 100644 index 0000000..7f9f968 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/scss.vim @@ -0,0 +1 @@ +call css_color#init('css', 'extended', 'scssAttribute,scssComment,scssVariableValue,scssMap,scssMapValue,sassCssAttribute,cssComment') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/sh.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/sh.vim new file mode 100644 index 0000000..5535905 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/sh.vim @@ -0,0 +1,6 @@ +syn match shCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=shQuickComment,shBQComment,shComment +call css_color#init( 'hex', 'none' + \, 'shSingleQuote,shDoubleQuote,shHereDoc,' + \. 'shTestSingleQuote,shTestDoubleQuote,' + \. 'shEchoQuote,shEmbeddedEcho,shEcho,' + \. 'shCommentColor' ) diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/stylus.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/stylus.vim new file mode 100644 index 0000000..6404ea8 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/stylus.vim @@ -0,0 +1 @@ +call css_color#init('css', 'extended', 'stylusCssAttribute,stylusComment,cssComment') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/tcsh.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/tcsh.vim new file mode 100644 index 0000000..1616b12 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/tcsh.vim @@ -0,0 +1,4 @@ +syn match tcshCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=tcshComment +call css_color#init( 'hex', 'none' + \, 'tcshSQuote,tcshDQuote,tcshHereDoc,' + \. 'tcshCommentColor' ) diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/tmux.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/tmux.vim new file mode 100644 index 0000000..53d1c74 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/tmux.vim @@ -0,0 +1 @@ +call css_color#init('css', 'none', 'tmuxString,tmuxComment') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/typescript.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/typescript.vim new file mode 100644 index 0000000..93669be --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/typescript.vim @@ -0,0 +1,6 @@ +" https://github.com/HerringtonDarkholme/yats.vim (stock Vim syntax) +" https://github.com/leafgarland/typescript-vim +call css_color#init('css', 'extended' + \, 'typescriptString,typescriptStringProperty,typescriptStringS,typescriptStringD,typescriptStringB,' + \. 'typescriptComment,typescriptLineComment,typescriptCommentSkip,typescriptDocComment' + \) diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/typescriptreact.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/typescriptreact.vim new file mode 100644 index 0000000..32a203b --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/typescriptreact.vim @@ -0,0 +1 @@ +runtime after/syntax/typescript.vim diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/vala.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/vala.vim new file mode 100644 index 0000000..2fc5d2c --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/vala.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'extended', 'valaString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/vim.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/vim.vim new file mode 100644 index 0000000..304ffad --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/vim.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'vimHiGuiRgb,vimString,vimComment,vimLineComment') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/xdefaults.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/xdefaults.vim new file mode 100644 index 0000000..9da7bba --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/xdefaults.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'extended', 'xdefaultsValue') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/xml.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/xml.vim new file mode 100644 index 0000000..b23e3be --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/xml.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'none', 'xmlComment,xmlCommentPart,xmlString') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/yaml.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/yaml.vim new file mode 100644 index 0000000..ec110a7 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/yaml.vim @@ -0,0 +1 @@ +call css_color#init('hex', 'extended', 'yamlComment,yamlFlowString,yamlPlainScalar') diff --git a/vim/.config/vim/plugged/vim-css-color/after/syntax/zsh.vim b/vim/.config/vim/plugged/vim-css-color/after/syntax/zsh.vim new file mode 100644 index 0000000..0bb3654 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/after/syntax/zsh.vim @@ -0,0 +1,4 @@ +syn match zshCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=zshComment +call css_color#init( 'hex', 'none' + \, 'zshString,zshPOSIXString,zshHereDoc,' + \. 'zshCommentColor' ) diff --git a/vim/.config/vim/plugged/vim-css-color/autoload/css_color.vim b/vim/.config/vim/plugged/vim-css-color/autoload/css_color.vim new file mode 100644 index 0000000..f7769b0 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/autoload/css_color.vim @@ -0,0 +1,320 @@ +" Language: Colorful CSS Color Preview +" Author: Aristotle Pagaltzis +" Commit: $Format:%H$ +" Licence: The MIT License (MIT) + +if ! ( v:version >= 700 && has('syntax') && ( has('gui_running') || has('nvim') || &t_Co == 256 ) ) + function! css_color#init(type, keywords, groups) + endfunction + function! css_color#extend(groups) + endfunction + finish +endif + +function! s:rgb2color(r,g,b) + " Convert 80% -> 204, 100% -> 255, etc. + let rgb = map( [a:r,a:g,a:b], 'v:val =~ "%$" ? ( 255 * v:val ) / 100 : v:val' ) + return printf( '%02x%02x%02x', rgb[0], rgb[1], rgb[2] ) +endfunction + +function! s:hsl2color(h,s,l) + " Convert 80% -> 0.8, 100% -> 1.0, etc. + let [s,l] = map( [a:s, a:l], 'v:val =~ "%$" ? v:val / 100.0 : v:val + 0.0' ) + " algorithm transcoded to vim from http://www.w3.org/TR/css3-color/#hsl-color + let hh = ( a:h % 360 ) / 360.0 + let m2 = l <= 0.5 ? l * ( s + 1 ) : l + s - l * s + let m1 = l * 2 - m2 + let rgb = [] + for h in [ hh + (1/3.0), hh, hh - (1/3.0) ] + let h = h < 0 ? h + 1 : h > 1 ? h - 1 : h + let v = + \ h * 6 < 1 ? m1 + ( m2 - m1 ) * h * 6 : + \ h * 2 < 1 ? m2 : + \ h * 3 < 2 ? m1 + ( m2 - m1 ) * ( 2/3.0 - h ) * 6 : + \ m1 + if v > 1.0 | return '' | endif + let rgb += [ float2nr( 255 * v ) ] + endfor + return printf( '%02x%02x%02x', rgb[0], rgb[1], rgb[2] ) +endfunction + +let s:_1_3 = 1.0/3 +let s:_16_116 = 16.0/116.0 +let s:cos16 = cos(16*(180/atan2(0,-1))) +let s:sin16 = sin(16*(180/atan2(0,-1))) + +function s:rgb2din99(rgb) + let [r,g,b] = map( copy(a:rgb), 'v:val > 0.04045 ? pow((v:val + 0.055) / 1.055, 2.4) : v:val / 12.92' ) + + let x = r * 0.4124 + g * 0.3576 + b * 0.1805 + let y = r * 0.2126 + g * 0.7152 + b * 0.0722 + let z = r * 0.0193 + g * 0.1192 + b * 0.9505 + + " Observer 2°, Illuminant D65 + let x = ( x * 100 ) / 95.0489 + let z = ( z * 100 ) / 108.8840 + + let [x,y,z] = map( [x,y,z], 'v:val > 0.008856 ? pow(v:val, s:_1_3) : 7.787 * v:val + s:_16_116' ) + + let [L,a,b] = [ (116 * y) - 16, 500 * (x - y), 200 * (y - z) ] + + let L99 = 105.51 * log(1 + 0.0158 * L) + + let e = a * s:cos16 + b * s:sin16 + let f = 0.7 * (b * s:cos16 - a * s:sin16) + + let g = 0.045 * sqrt(e*e + f*f) + if g == 0 + let [a99, b99] = [0.0, 0.0] + else + let k = log(1 + g) / g + let a99 = k * e + let b99 = k * f + endif + + return [L99, a99, b99] +endfunction + +let s:hex={} +for i in range(0, 255) + let s:hex[ printf( '%02x', i ) ] = i +endfor + +let s:exe=[] +function! s:flush_exe() + if len(s:exe) | exe join( remove( s:exe, 0, -1 ), ' | ' ) | endif +endfunction + +if has('gui_running') + function! s:create_highlight(color, is_bright) + call add( s:exe, 'hi BG'.a:color.' guibg=#'.a:color.' guifg=#'.( a:is_bright ? '000000' : 'ffffff' ) ) + endfunction +else + " the 16 vt100 colors are not defined consistently + let s:xtermcolor = repeat( [''], 16 ) + + " the 6 values used in the xterm color cube + " 0 95 135 175 215 255 + let s:cubergb = [ 0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF ] + for s:rrr in s:cubergb + for s:ggg in s:cubergb + for s:bbb in s:cubergb + call add( s:xtermcolor, [ s:rrr, s:ggg, s:bbb ] ) + endfor + endfor + endfor + + " grayscale ramp + let s:xtermcolor += map( range(24), 'repeat( [10 * v:val + 8], 3 )' ) + + for idx in range( 16, len(s:xtermcolor) - 1 ) + let s:xtermcolor[idx] = s:rgb2din99( map(s:xtermcolor[idx], 'v:val / 255.0') ) + endfor + + " selects the nearest xterm color for a rgb value like #FF0000 + function! s:rgb2xterm(color) + let best_match=0 + let smallest_distance = 10000000000 + let color = tolower(a:color) + let r = s:hex[color[0:1]] + let g = s:hex[color[2:3]] + let b = s:hex[color[4:5]] + + let [L1,a1,b1] = s:rgb2din99([ r/255.0, g/255.0, b/255.0 ]) + + for idx in range( 16, len(s:xtermcolor) - 1 ) + let [L2,a2,b2] = s:xtermcolor[idx] + let dL = L1 - L2 + let da = a1 - a2 + let db = b1 - b2 + let distance = dL*dL + da*da + db*db + if distance == 0 | return idx | endif + if distance > smallest_distance | continue | endif + let smallest_distance = distance + let best_match = idx + endfor + return best_match + endfunction + + let s:color_idx = {} + function! s:create_highlight(color, is_bright) + let color_idx = get( s:color_idx, a:color, -1 ) + if color_idx == -1 + let color_idx = s:rgb2xterm(a:color) + let s:color_idx[a:color] = color_idx + endif + call add( s:exe, + \ 'hi BG'.a:color + \ . ' guibg=#' .a:color .' guifg=#' .( a:is_bright ? '000000' : 'ffffff' ) + \ . ' ctermbg='.color_idx.' ctermfg='.( a:is_bright ? 0 : 15 ) + \ ) + endfunction +endif + +function! s:recreate_highlights() + call filter( copy( b:css_color_hi ), 's:create_highlight( v:key, v:val )' ) +endfunction + +let s:pattern_color = {} +let s:color_bright = {} +function! s:create_syn_match() + + let pattern = submatch(0) + + if has_key( b:css_color_syn, pattern ) | return | endif + let b:css_color_syn[pattern] = 1 + + let rgb_color = get( s:pattern_color, pattern, '' ) + + if ! strlen( rgb_color ) + let hex = submatch(1) + let funcname = submatch(2) + + let rgb_color + \ = funcname == 'rgb' ? s:rgb2color(submatch(3),submatch(4),submatch(5)) + \ : funcname == 'hsl' ? s:hsl2color(submatch(3),submatch(4),submatch(5)) + \ : strlen(hex) >= 6 ? tolower(hex[0:5]) + \ : strlen(hex) >= 3 ? tolower(hex[0].hex[0].hex[1].hex[1].hex[2].hex[2]) + \ : '' + + if rgb_color == '' | throw 'css_color: create_syn_match invoked on bad match data' | endif + let s:pattern_color[pattern] = rgb_color + endif + + if ! has_key( b:css_color_hi, rgb_color ) + let is_bright = get( s:color_bright, rgb_color, -1 ) + if is_bright == -1 + let r = s:hex[rgb_color[0:1]] + let g = s:hex[rgb_color[2:3]] + let b = s:hex[rgb_color[4:5]] + let is_bright = r*30 + g*59 + b*11 > 12000 + let s:color_bright[rgb_color] = is_bright + endif + + call s:create_highlight( rgb_color, is_bright ) + let b:css_color_hi[rgb_color] = is_bright + endif + + " iff pattern ends on word character, require word break to match + if pattern =~ '\>$' | let pattern .= '\>' | endif + call add( s:exe, 'syn match BG'.rgb_color.' /'.escape(pattern, '/').'/ contained containedin=@colorableGroup' ) + + return '' +endfunction + +function! s:clear_matches() + call map(get(w:, 'css_color_match_id', []), 'matchdelete(v:val)') + let w:css_color_match_id = [] +endfunction + +function! s:create_matches() + call s:clear_matches() + if ! &l:cursorline | return | endif + " adds matches based that duplicate the highlighted colors on the current line + let lnr = line('.') + let group = '' + let groupstart = 0 + let endcol = &l:synmaxcol ? &l:synmaxcol : col('$') + for col in range( 1, endcol ) + let nextgroup = col < endcol ? synIDattr( synID( lnr, col, 1 ), 'name' ) : '' + if group == nextgroup | continue | endif + if group =~ '^BG\x\{6}$' + let regex = '\%'.lnr.'l\%'.groupstart.'c'.repeat( '.', col - groupstart ) + let w:css_color_match_id += [ matchadd( group, regex, -1 ) ] + endif + let group = nextgroup + let groupstart = col + endfor +endfunction + +let s:_hexcolor = '#\(\x\{3}\%(\>\|\x\{3}\>\)\)' " submatch 1 +let s:_rgbacolor = '#\(\x\{3}\%(\>\|\x\%(\>\|\x\{2}\%(\>\|\x\{2}\>\)\)\)\)' " submatch 1 +let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2 +let s:_ws_ = '\s*' +let s:_numval = s:_ws_ . '\(\d\{1,3}%\?\)' " submatch 3,4,5 +let s:_listsep = s:_ws_ . ',' +let s:_otherargs_ = '\%(,[^)]*\)\?' +let s:_funcexpr = s:_funcname . '[(]' . s:_numval . s:_listsep . s:_numval . s:_listsep . s:_numval . s:_ws_ . s:_otherargs_ . '[)]' +let s:_csscolor = s:_rgbacolor . '\|' . s:_funcexpr +" N.B. sloppy heuristic constants for performance reasons: +" a) start somewhere left of screen in case of partially visible colorref +" b) take some multiple of &columns to handle multibyte chars etc +" N.B. these substitute() calls are here just for the side effect +" of invoking s:create_syn_match during substitution -- because +" match() and friends do not allow finding all matches in a single +" scan without examining the start of the string over and over +function! s:parse_screen() + let leftcol = winsaveview().leftcol + let left = max([ leftcol - 15, 0 ]) + let width = &columns * 4 + call filter( range( line('w0'), line('w$') ), 'substitute( strpart( getline(v:val), col([v:val, left]), width ), b:css_color_pat, ''\=s:create_syn_match()'', ''g'' )' ) + call s:flush_exe() +endfunction + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +function! css_color#reinit() + call s:recreate_highlights() + call s:flush_exe() +endfunction + +function! css_color#enable() + if ! b:css_color_off | return | endif + if len( b:css_color_grp ) | exe 'syn cluster colorableGroup add=' . join( b:css_color_grp, ',' ) | endif + augroup CSSColor + autocmd! * + if has('nvim-0.3.1') + autocmd CursorMoved,CursorMovedI call s:parse_screen() + else + autocmd CursorMoved,CursorMovedI call s:parse_screen() | call s:create_matches() + autocmd BufWinEnter call s:create_matches() + autocmd BufWinLeave call s:clear_matches() + endif + autocmd ColorScheme call css_color#reinit() + augroup END + let b:css_color_off = 0 + doautocmd CSSColor CursorMoved +endfunction + +function! css_color#disable() + if b:css_color_off | return | endif + if len( b:css_color_grp ) | exe 'syn cluster colorableGroup remove=' . join( b:css_color_grp, ',' ) | endif + autocmd! CSSColor * + let b:css_color_off = 1 +endfunction + +function! css_color#toggle() + if b:css_color_off | call css_color#enable() + else | call css_color#disable() + endif +endfunction + +let s:type = [ 'none', 'hex', 'rgba', 'css', 'none' ] " with wraparound for index() == -1 +let s:pat_for_type = [ '^$', s:_hexcolor, s:_rgbacolor, s:_csscolor, '^$' ] + +function! css_color#init(type, keywords, groups) + let new_type = index( s:type, a:type ) + let old_type = index( s:pat_for_type, get( b:, 'css_color_pat', '$^' ) ) + + let b:css_color_pat = s:pat_for_type[ max( [ old_type, new_type ] ) ] + let b:css_color_grp = extend( get( b:, 'css_color_grp', [] ), split( a:groups, ',' ), 0 ) + let b:css_color_hi = {} + let b:css_color_syn = {} + let b:css_color_off = 1 + + call css_color#enable() + + if a:keywords != 'none' + exe 'syntax include syntax/colornames/'.a:keywords.'.vim' + call extend( s:color_bright, b:css_color_hi ) + endif +endfunction + +" utility function for development use +function! css_color#dump_highlights() + call s:recreate_highlights() + let cmd = join( sort( remove( s:exe, 0, -1 ) ), "\n" ) + let cmd = substitute( cmd, '#......', '\U&', 'g' ) + let cmd = substitute( cmd, 'ctermbg=\zs\d\+', '\=printf("%-3d",submatch(0))', 'g' ) + return cmd +endfunction diff --git a/vim/.config/vim/plugged/vim-css-color/syntax/colornames/basic.vim b/vim/.config/vim/plugged/vim-css-color/syntax/colornames/basic.vim new file mode 100644 index 0000000..6fd41b8 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/syntax/colornames/basic.vim @@ -0,0 +1,47 @@ +" Language: Colorful CSS Color Preview +" Author: Aristotle Pagaltzis +" Commit: $Format:%H$ +" Licence: The MIT License (MIT) + +" W3C basic colors + +hi BG000000 guibg=#000000 guifg=#FFFFFF ctermbg=16 ctermfg=15 +hi BGc0c0c0 guibg=#C0C0C0 guifg=#000000 ctermbg=250 ctermfg=0 +hi BG808080 guibg=#808080 guifg=#000000 ctermbg=244 ctermfg=0 +hi BGffffff guibg=#FFFFFF guifg=#000000 ctermbg=231 ctermfg=0 +hi BG800000 guibg=#800000 guifg=#FFFFFF ctermbg=88 ctermfg=15 +hi BGff0000 guibg=#FF0000 guifg=#FFFFFF ctermbg=196 ctermfg=15 +hi BG800080 guibg=#800080 guifg=#FFFFFF ctermbg=90 ctermfg=15 +hi BGff00ff guibg=#FF00FF guifg=#FFFFFF ctermbg=201 ctermfg=15 +hi BG008000 guibg=#008000 guifg=#FFFFFF ctermbg=28 ctermfg=15 +hi BG00ff00 guibg=#00FF00 guifg=#000000 ctermbg=46 ctermfg=0 +hi BG808000 guibg=#808000 guifg=#FFFFFF ctermbg=100 ctermfg=15 +hi BGffff00 guibg=#FFFF00 guifg=#000000 ctermbg=226 ctermfg=0 +hi BG000080 guibg=#000080 guifg=#FFFFFF ctermbg=18 ctermfg=15 +hi BG0000ff guibg=#0000FF guifg=#FFFFFF ctermbg=21 ctermfg=15 +hi BG008080 guibg=#008080 guifg=#FFFFFF ctermbg=30 ctermfg=15 +hi BG00ffff guibg=#00FFFF guifg=#000000 ctermbg=51 ctermfg=0 + +call extend( b:css_color_hi, + \{'000000':0,'c0c0c0':1,'808080':1,'ffffff':1,'800000':0,'ff0000':0 + \,'800080':0,'ff00ff':0,'008000':0,'00ff00':1,'808000':0,'ffff00':1 + \,'000080':0,'0000ff':0,'008080':0,'00ffff':1} ) + +syn case ignore + +syn keyword BG000000 black contained containedin=@colorableGroup +syn keyword BGc0c0c0 silver contained containedin=@colorableGroup +syn keyword BG808080 gray contained containedin=@colorableGroup +syn match BGffffff "\c\" contained containedin=@colorableGroup +syn keyword BG800000 maroon contained containedin=@colorableGroup +syn keyword BGff0000 red contained containedin=@colorableGroup +syn keyword BG800080 purple contained containedin=@colorableGroup +syn keyword BGff00ff fuchsia contained containedin=@colorableGroup +syn keyword BG008000 green contained containedin=@colorableGroup +syn keyword BG00ff00 lime contained containedin=@colorableGroup +syn keyword BG808000 olive contained containedin=@colorableGroup +syn keyword BGffff00 yellow contained containedin=@colorableGroup +syn keyword BG000080 navy contained containedin=@colorableGroup +syn keyword BG0000ff blue contained containedin=@colorableGroup +syn keyword BG008080 teal contained containedin=@colorableGroup +syn keyword BG00ffff aqua contained containedin=@colorableGroup diff --git a/vim/.config/vim/plugged/vim-css-color/syntax/colornames/extended.vim b/vim/.config/vim/plugged/vim-css-color/syntax/colornames/extended.vim new file mode 100644 index 0000000..92c130a --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/syntax/colornames/extended.vim @@ -0,0 +1,290 @@ +" Language: Colorful CSS Color Preview +" Author: Aristotle Pagaltzis +" Commit: $Format:%H$ +" Licence: The MIT License (MIT) + +" W3C extended colors + +syntax include syntax/colornames/basic.vim + +hi BG00008b guibg=#00008B guifg=#FFFFFF ctermbg=18 ctermfg=15 +hi BG0000cd guibg=#0000CD guifg=#FFFFFF ctermbg=20 ctermfg=15 +hi BG006400 guibg=#006400 guifg=#FFFFFF ctermbg=22 ctermfg=15 +hi BG008b8b guibg=#008B8B guifg=#FFFFFF ctermbg=30 ctermfg=15 +hi BG00bfff guibg=#00BFFF guifg=#000000 ctermbg=74 ctermfg=0 +hi BG00ced1 guibg=#00CED1 guifg=#000000 ctermbg=6 ctermfg=0 +hi BG00fa9a guibg=#00FA9A guifg=#000000 ctermbg=49 ctermfg=0 +hi BG00ff7f guibg=#00FF7F guifg=#000000 ctermbg=48 ctermfg=0 +hi BG191970 guibg=#191970 guifg=#FFFFFF ctermbg=18 ctermfg=15 +hi BG1e90ff guibg=#1E90FF guifg=#000000 ctermbg=33 ctermfg=0 +hi BG20b2aa guibg=#20B2AA guifg=#000000 ctermbg=37 ctermfg=0 +hi BG228b22 guibg=#228B22 guifg=#FFFFFF ctermbg=28 ctermfg=15 +hi BG2e8b57 guibg=#2E8B57 guifg=#FFFFFF ctermbg=29 ctermfg=15 +hi BG2f4f4f guibg=#2F4F4F guifg=#FFFFFF ctermbg=23 ctermfg=15 +hi BG32cd32 guibg=#32CD32 guifg=#000000 ctermbg=2 ctermfg=0 +hi BG3cb371 guibg=#3CB371 guifg=#000000 ctermbg=35 ctermfg=0 +hi BG40e0d0 guibg=#40E0D0 guifg=#000000 ctermbg=44 ctermfg=0 +hi BG4169e1 guibg=#4169E1 guifg=#FFFFFF ctermbg=62 ctermfg=15 +hi BG4682b4 guibg=#4682B4 guifg=#FFFFFF ctermbg=67 ctermfg=15 +hi BG483d8b guibg=#483D8B guifg=#FFFFFF ctermbg=90 ctermfg=15 +hi BG48d1cc guibg=#48D1CC guifg=#000000 ctermbg=44 ctermfg=0 +hi BG4b0082 guibg=#4B0082 guifg=#FFFFFF ctermbg=54 ctermfg=15 +hi BG556b2f guibg=#556B2F guifg=#FFFFFF ctermbg=58 ctermfg=15 +hi BG5f9ea0 guibg=#5F9EA0 guifg=#000000 ctermbg=73 ctermfg=0 +hi BG6495ed guibg=#6495ED guifg=#000000 ctermbg=68 ctermfg=0 +hi BG663399 guibg=#663399 guifg=#FFFFFF ctermbg=91 ctermfg=15 +hi BG66cdaa guibg=#66CDAA guifg=#000000 ctermbg=79 ctermfg=0 +hi BG696969 guibg=#696969 guifg=#FFFFFF ctermbg=242 ctermfg=15 +hi BG6a5acd guibg=#6A5ACD guifg=#FFFFFF ctermbg=62 ctermfg=15 +hi BG6b8e23 guibg=#6B8E23 guifg=#FFFFFF ctermbg=64 ctermfg=15 +hi BG708090 guibg=#708090 guifg=#000000 ctermbg=8 ctermfg=0 +hi BG778899 guibg=#778899 guifg=#000000 ctermbg=67 ctermfg=0 +hi BG7b68ee guibg=#7B68EE guifg=#000000 ctermbg=98 ctermfg=0 +hi BG7cfc00 guibg=#7CFC00 guifg=#000000 ctermbg=118 ctermfg=0 +hi BG7fff00 guibg=#7FFF00 guifg=#000000 ctermbg=118 ctermfg=0 +hi BG7fffd4 guibg=#7FFFD4 guifg=#000000 ctermbg=122 ctermfg=0 +hi BG87ceeb guibg=#87CEEB guifg=#000000 ctermbg=117 ctermfg=0 +hi BG87cefa guibg=#87CEFA guifg=#000000 ctermbg=117 ctermfg=0 +hi BG8a2be2 guibg=#8A2BE2 guifg=#FFFFFF ctermbg=93 ctermfg=15 +hi BG8b0000 guibg=#8B0000 guifg=#FFFFFF ctermbg=88 ctermfg=15 +hi BG8b008b guibg=#8B008B guifg=#FFFFFF ctermbg=90 ctermfg=15 +hi BG8b4513 guibg=#8B4513 guifg=#FFFFFF ctermbg=130 ctermfg=15 +hi BG8fbc8f guibg=#8FBC8F guifg=#000000 ctermbg=108 ctermfg=0 +hi BG90ee90 guibg=#90EE90 guifg=#000000 ctermbg=120 ctermfg=0 +hi BG9370d8 guibg=#9370D8 guifg=#000000 ctermbg=134 ctermfg=0 +hi BG9400d3 guibg=#9400D3 guifg=#FFFFFF ctermbg=92 ctermfg=15 +hi BG98fb98 guibg=#98FB98 guifg=#000000 ctermbg=120 ctermfg=0 +hi BG9932cc guibg=#9932CC guifg=#FFFFFF ctermbg=128 ctermfg=15 +hi BG9acd32 guibg=#9ACD32 guifg=#000000 ctermbg=112 ctermfg=0 +hi BGa0522d guibg=#A0522D guifg=#FFFFFF ctermbg=130 ctermfg=15 +hi BGa52a2a guibg=#A52A2A guifg=#FFFFFF ctermbg=124 ctermfg=15 +hi BGa9a9a9 guibg=#A9A9A9 guifg=#000000 ctermbg=248 ctermfg=0 +hi BGadd8e6 guibg=#ADD8E6 guifg=#000000 ctermbg=152 ctermfg=0 +hi BGadff2f guibg=#ADFF2F guifg=#000000 ctermbg=154 ctermfg=0 +hi BGafeeee guibg=#AFEEEE guifg=#000000 ctermbg=159 ctermfg=0 +hi BGb0c4de guibg=#B0C4DE guifg=#000000 ctermbg=153 ctermfg=0 +hi BGb0e0e6 guibg=#B0E0E6 guifg=#000000 ctermbg=152 ctermfg=0 +hi BGb22222 guibg=#B22222 guifg=#FFFFFF ctermbg=124 ctermfg=15 +hi BGb8860b guibg=#B8860B guifg=#000000 ctermbg=136 ctermfg=0 +hi BGba55d3 guibg=#BA55D3 guifg=#000000 ctermbg=134 ctermfg=0 +hi BGbc8f8f guibg=#BC8F8F guifg=#000000 ctermbg=138 ctermfg=0 +hi BGbdb76b guibg=#BDB76B guifg=#000000 ctermbg=143 ctermfg=0 +hi BGc71585 guibg=#C71585 guifg=#FFFFFF ctermbg=162 ctermfg=15 +hi BGcd5c5c guibg=#CD5C5C guifg=#000000 ctermbg=167 ctermfg=0 +hi BGcd853f guibg=#CD853F guifg=#000000 ctermbg=172 ctermfg=0 +hi BGd2691e guibg=#D2691E guifg=#000000 ctermbg=166 ctermfg=0 +hi BGd2b48c guibg=#D2B48C guifg=#000000 ctermbg=180 ctermfg=0 +hi BGd3d3d3 guibg=#D3D3D3 guifg=#000000 ctermbg=252 ctermfg=0 +hi BGd87093 guibg=#D87093 guifg=#000000 ctermbg=168 ctermfg=0 +hi BGd8bfd8 guibg=#D8BFD8 guifg=#000000 ctermbg=182 ctermfg=0 +hi BGda70d6 guibg=#DA70D6 guifg=#000000 ctermbg=170 ctermfg=0 +hi BGdaa520 guibg=#DAA520 guifg=#000000 ctermbg=178 ctermfg=0 +hi BGdc143c guibg=#DC143C guifg=#FFFFFF ctermbg=197 ctermfg=15 +hi BGdcdcdc guibg=#DCDCDC guifg=#000000 ctermbg=253 ctermfg=0 +hi BGdda0dd guibg=#DDA0DD guifg=#000000 ctermbg=183 ctermfg=0 +hi BGdeb887 guibg=#DEB887 guifg=#000000 ctermbg=180 ctermfg=0 +hi BGe0ffff guibg=#E0FFFF guifg=#000000 ctermbg=195 ctermfg=0 +hi BGe6e6fa guibg=#E6E6FA guifg=#000000 ctermbg=189 ctermfg=0 +hi BGe9967a guibg=#E9967A guifg=#000000 ctermbg=209 ctermfg=0 +hi BGee82ee guibg=#EE82EE guifg=#000000 ctermbg=213 ctermfg=0 +hi BGeee8aa guibg=#EEE8AA guifg=#000000 ctermbg=229 ctermfg=0 +hi BGf08080 guibg=#F08080 guifg=#000000 ctermbg=210 ctermfg=0 +hi BGf0e68c guibg=#F0E68C guifg=#000000 ctermbg=186 ctermfg=0 +hi BGf0f8ff guibg=#F0F8FF guifg=#000000 ctermbg=231 ctermfg=0 +hi BGf0fff0 guibg=#F0FFF0 guifg=#000000 ctermbg=195 ctermfg=0 +hi BGf0ffff guibg=#F0FFFF guifg=#000000 ctermbg=231 ctermfg=0 +hi BGf4a460 guibg=#F4A460 guifg=#000000 ctermbg=215 ctermfg=0 +hi BGf5deb3 guibg=#F5DEB3 guifg=#000000 ctermbg=223 ctermfg=0 +hi BGf5f5dc guibg=#F5F5DC guifg=#000000 ctermbg=230 ctermfg=0 +hi BGf5f5f5 guibg=#F5F5F5 guifg=#000000 ctermbg=255 ctermfg=0 +hi BGf5fffa guibg=#F5FFFA guifg=#000000 ctermbg=231 ctermfg=0 +hi BGf8f8ff guibg=#F8F8FF guifg=#000000 ctermbg=231 ctermfg=0 +hi BGfa8072 guibg=#FA8072 guifg=#000000 ctermbg=210 ctermfg=0 +hi BGfaebd7 guibg=#FAEBD7 guifg=#000000 ctermbg=255 ctermfg=0 +hi BGfaf0e6 guibg=#FAF0E6 guifg=#000000 ctermbg=255 ctermfg=0 +hi BGfafad2 guibg=#FAFAD2 guifg=#000000 ctermbg=230 ctermfg=0 +hi BGfdf5e6 guibg=#FDF5E6 guifg=#000000 ctermbg=255 ctermfg=0 +hi BGff1493 guibg=#FF1493 guifg=#FFFFFF ctermbg=198 ctermfg=15 +hi BGff4500 guibg=#FF4500 guifg=#FFFFFF ctermbg=202 ctermfg=15 +hi BGff6347 guibg=#FF6347 guifg=#000000 ctermbg=203 ctermfg=0 +hi BGff69b4 guibg=#FF69B4 guifg=#000000 ctermbg=205 ctermfg=0 +hi BGff7f50 guibg=#FF7F50 guifg=#000000 ctermbg=209 ctermfg=0 +hi BGff8c00 guibg=#FF8C00 guifg=#000000 ctermbg=208 ctermfg=0 +hi BGffa07a guibg=#FFA07A guifg=#000000 ctermbg=216 ctermfg=0 +hi BGffa500 guibg=#FFA500 guifg=#000000 ctermbg=214 ctermfg=0 +hi BGffb6c1 guibg=#FFB6C1 guifg=#000000 ctermbg=217 ctermfg=0 +hi BGffc0cb guibg=#FFC0CB guifg=#000000 ctermbg=217 ctermfg=0 +hi BGffd700 guibg=#FFD700 guifg=#000000 ctermbg=220 ctermfg=0 +hi BGffdab9 guibg=#FFDAB9 guifg=#000000 ctermbg=223 ctermfg=0 +hi BGffdead guibg=#FFDEAD guifg=#000000 ctermbg=223 ctermfg=0 +hi BGffe4b5 guibg=#FFE4B5 guifg=#000000 ctermbg=223 ctermfg=0 +hi BGffe4c4 guibg=#FFE4C4 guifg=#000000 ctermbg=223 ctermfg=0 +hi BGffe4e1 guibg=#FFE4E1 guifg=#000000 ctermbg=224 ctermfg=0 +hi BGffebcd guibg=#FFEBCD guifg=#000000 ctermbg=223 ctermfg=0 +hi BGffefd5 guibg=#FFEFD5 guifg=#000000 ctermbg=230 ctermfg=0 +hi BGfff0f5 guibg=#FFF0F5 guifg=#000000 ctermbg=255 ctermfg=0 +hi BGfff5ee guibg=#FFF5EE guifg=#000000 ctermbg=231 ctermfg=0 +hi BGfff8dc guibg=#FFF8DC guifg=#000000 ctermbg=230 ctermfg=0 +hi BGfffacd guibg=#FFFACD guifg=#000000 ctermbg=230 ctermfg=0 +hi BGfffaf0 guibg=#FFFAF0 guifg=#000000 ctermbg=231 ctermfg=0 +hi BGfffafa guibg=#FFFAFA guifg=#000000 ctermbg=231 ctermfg=0 +hi BGffffe0 guibg=#FFFFE0 guifg=#000000 ctermbg=230 ctermfg=0 +hi BGfffff0 guibg=#FFFFF0 guifg=#000000 ctermbg=231 ctermfg=0 + +call extend( b:css_color_hi, + \{'00008b':0,'0000cd':0,'006400':0,'008b8b':0,'00bfff':1,'00ced1':1 + \,'00fa9a':1,'00ff7f':1,'191970':0,'1e90ff':1,'20b2aa':1,'228b22':0 + \,'2e8b57':0,'2f4f4f':0,'32cd32':1,'3cb371':1,'40e0d0':1,'4169e1':0 + \,'4682b4':0,'483d8b':0,'48d1cc':1,'4b0082':0,'556b2f':0,'5f9ea0':1 + \,'6495ed':1,'66cdaa':1,'696969':0,'6a5acd':0,'6b8e23':0,'708090':1 + \,'778899':1,'7b68ee':1,'7cfc00':1,'7fff00':1,'7fffd4':1,'87ceeb':1 + \,'87cefa':1,'8a2be2':0,'8b0000':0,'8b008b':0,'8b4513':0,'8fbc8f':1 + \,'90ee90':1,'9370d8':1,'9400d3':0,'98fb98':1,'9932cc':0,'9acd32':1 + \,'a0522d':0,'a52a2a':0,'a9a9a9':1,'add8e6':1,'adff2f':1,'afeeee':1 + \,'b0c4de':1,'b0e0e6':1,'b22222':0,'b8860b':1,'ba55d3':1,'bc8f8f':1 + \,'bdb76b':1,'c71585':0,'cd5c5c':1,'cd853f':1,'d2691e':1,'d2b48c':1 + \,'d3d3d3':1,'d87093':1,'d8bfd8':1,'da70d6':1,'daa520':1,'dc143c':0 + \,'dcdcdc':1,'dda0dd':1,'deb887':1,'e0ffff':1,'e6e6fa':1,'e9967a':1 + \,'ee82ee':1,'eee8aa':1,'f08080':1,'f0e68c':1,'f0f8ff':1,'f0fff0':1 + \,'f0ffff':1,'f4a460':1,'f5deb3':1,'f5f5dc':1,'f5f5f5':1,'f5fffa':1 + \,'f8f8ff':1,'fa8072':1,'faebd7':1,'faf0e6':1,'fafad2':1,'fdf5e6':1 + \,'ff1493':0,'ff4500':0,'ff6347':1,'ff69b4':1,'ff7f50':1,'ff8c00':1 + \,'ffa07a':1,'ffa500':1,'ffb6c1':1,'ffc0cb':1,'ffd700':1,'ffdab9':1 + \,'ffdead':1,'ffe4b5':1,'ffe4c4':1,'ffe4e1':1,'ffebcd':1,'ffefd5':1 + \,'fff0f5':1,'fff5ee':1,'fff8dc':1,'fffacd':1,'fffaf0':1,'fffafa':1 + \,'ffffe0':1,'fffff0':1} ) + +syn case ignore + +syn keyword BGf0f8ff AliceBlue contained containedin=@colorableGroup +syn keyword BGfaebd7 AntiqueWhite contained containedin=@colorableGroup +syn keyword BG7fffd4 Aquamarine contained containedin=@colorableGroup +syn keyword BGf0ffff Azure contained containedin=@colorableGroup +syn keyword BGf5f5dc Beige contained containedin=@colorableGroup +syn keyword BGffe4c4 Bisque contained containedin=@colorableGroup +syn keyword BGffebcd BlanchedAlmond contained containedin=@colorableGroup +syn keyword BG8a2be2 BlueViolet contained containedin=@colorableGroup +syn keyword BGa52a2a Brown contained containedin=@colorableGroup +syn keyword BGdeb887 BurlyWood contained containedin=@colorableGroup +syn keyword BG5f9ea0 CadetBlue contained containedin=@colorableGroup +syn keyword BG7fff00 Chartreuse contained containedin=@colorableGroup +syn keyword BGd2691e Chocolate contained containedin=@colorableGroup +syn keyword BGff7f50 Coral contained containedin=@colorableGroup +syn keyword BG6495ed CornflowerBlue contained containedin=@colorableGroup +syn keyword BGfff8dc Cornsilk contained containedin=@colorableGroup +syn keyword BGdc143c Crimson contained containedin=@colorableGroup +syn keyword BG00ffff Cyan contained containedin=@colorableGroup +syn keyword BG00008b DarkBlue contained containedin=@colorableGroup +syn keyword BG008b8b DarkCyan contained containedin=@colorableGroup +syn keyword BGb8860b DarkGoldenRod contained containedin=@colorableGroup +syn keyword BGa9a9a9 DarkGray contained containedin=@colorableGroup +syn keyword BG006400 DarkGreen contained containedin=@colorableGroup +syn keyword BGa9a9a9 DarkGrey contained containedin=@colorableGroup +syn keyword BGbdb76b DarkKhaki contained containedin=@colorableGroup +syn keyword BG8b008b DarkMagenta contained containedin=@colorableGroup +syn keyword BG556b2f DarkOliveGreen contained containedin=@colorableGroup +syn keyword BG9932cc DarkOrchid contained containedin=@colorableGroup +syn keyword BG8b0000 DarkRed contained containedin=@colorableGroup +syn keyword BGe9967a DarkSalmon contained containedin=@colorableGroup +syn keyword BG8fbc8f DarkSeaGreen contained containedin=@colorableGroup +syn keyword BG483d8b DarkSlateBlue contained containedin=@colorableGroup +syn keyword BG2f4f4f DarkSlateGray contained containedin=@colorableGroup +syn keyword BG2f4f4f DarkSlateGrey contained containedin=@colorableGroup +syn keyword BG00ced1 DarkTurquoise contained containedin=@colorableGroup +syn keyword BG9400d3 DarkViolet contained containedin=@colorableGroup +syn keyword BGff8c00 Darkorange contained containedin=@colorableGroup +syn keyword BGff1493 DeepPink contained containedin=@colorableGroup +syn keyword BG00bfff DeepSkyBlue contained containedin=@colorableGroup +syn keyword BG696969 DimGray contained containedin=@colorableGroup +syn keyword BG696969 DimGrey contained containedin=@colorableGroup +syn keyword BG1e90ff DodgerBlue contained containedin=@colorableGroup +syn keyword BGb22222 FireBrick contained containedin=@colorableGroup +syn keyword BGfffaf0 FloralWhite contained containedin=@colorableGroup +syn keyword BG228b22 ForestGreen contained containedin=@colorableGroup +syn keyword BGdcdcdc Gainsboro contained containedin=@colorableGroup +syn keyword BGf8f8ff GhostWhite contained containedin=@colorableGroup +syn keyword BGffd700 Gold contained containedin=@colorableGroup +syn keyword BGdaa520 GoldenRod contained containedin=@colorableGroup +syn keyword BGadff2f GreenYellow contained containedin=@colorableGroup +syn keyword BG808080 Grey contained containedin=@colorableGroup +syn keyword BGf0fff0 HoneyDew contained containedin=@colorableGroup +syn keyword BGff69b4 HotPink contained containedin=@colorableGroup +syn keyword BGcd5c5c IndianRed contained containedin=@colorableGroup +syn keyword BG4b0082 Indigo contained containedin=@colorableGroup +syn keyword BGfffff0 Ivory contained containedin=@colorableGroup +syn keyword BGf0e68c Khaki contained containedin=@colorableGroup +syn keyword BGe6e6fa Lavender contained containedin=@colorableGroup +syn keyword BGfff0f5 LavenderBlush contained containedin=@colorableGroup +syn keyword BG7cfc00 LawnGreen contained containedin=@colorableGroup +syn keyword BGfffacd LemonChiffon contained containedin=@colorableGroup +syn keyword BGadd8e6 LightBlue contained containedin=@colorableGroup +syn keyword BGf08080 LightCoral contained containedin=@colorableGroup +syn keyword BGe0ffff LightCyan contained containedin=@colorableGroup +syn keyword BGfafad2 LightGoldenRodYellow contained containedin=@colorableGroup +syn keyword BGd3d3d3 LightGray contained containedin=@colorableGroup +syn keyword BG90ee90 LightGreen contained containedin=@colorableGroup +syn keyword BGd3d3d3 LightGrey contained containedin=@colorableGroup +syn keyword BGffb6c1 LightPink contained containedin=@colorableGroup +syn keyword BGffa07a LightSalmon contained containedin=@colorableGroup +syn keyword BG20b2aa LightSeaGreen contained containedin=@colorableGroup +syn keyword BG87cefa LightSkyBlue contained containedin=@colorableGroup +syn keyword BG778899 LightSlateGray contained containedin=@colorableGroup +syn keyword BG778899 LightSlateGrey contained containedin=@colorableGroup +syn keyword BGb0c4de LightSteelBlue contained containedin=@colorableGroup +syn keyword BGffffe0 LightYellow contained containedin=@colorableGroup +syn keyword BG32cd32 LimeGreen contained containedin=@colorableGroup +syn keyword BGfaf0e6 Linen contained containedin=@colorableGroup +syn keyword BGff00ff Magenta contained containedin=@colorableGroup +syn keyword BG66cdaa MediumAquaMarine contained containedin=@colorableGroup +syn keyword BG0000cd MediumBlue contained containedin=@colorableGroup +syn keyword BGba55d3 MediumOrchid contained containedin=@colorableGroup +syn keyword BG9370d8 MediumPurple contained containedin=@colorableGroup +syn keyword BG3cb371 MediumSeaGreen contained containedin=@colorableGroup +syn keyword BG7b68ee MediumSlateBlue contained containedin=@colorableGroup +syn keyword BG00fa9a MediumSpringGreen contained containedin=@colorableGroup +syn keyword BG48d1cc MediumTurquoise contained containedin=@colorableGroup +syn keyword BGc71585 MediumVioletRed contained containedin=@colorableGroup +syn keyword BG191970 MidnightBlue contained containedin=@colorableGroup +syn keyword BGf5fffa MintCream contained containedin=@colorableGroup +syn keyword BGffe4e1 MistyRose contained containedin=@colorableGroup +syn keyword BGffe4b5 Moccasin contained containedin=@colorableGroup +syn keyword BGffdead NavajoWhite contained containedin=@colorableGroup +syn keyword BGfdf5e6 OldLace contained containedin=@colorableGroup +syn keyword BG6b8e23 OliveDrab contained containedin=@colorableGroup +syn keyword BGffa500 Orange contained containedin=@colorableGroup +syn keyword BGff4500 OrangeRed contained containedin=@colorableGroup +syn keyword BGda70d6 Orchid contained containedin=@colorableGroup +syn keyword BGeee8aa PaleGoldenRod contained containedin=@colorableGroup +syn keyword BG98fb98 PaleGreen contained containedin=@colorableGroup +syn keyword BGafeeee PaleTurquoise contained containedin=@colorableGroup +syn keyword BGd87093 PaleVioletRed contained containedin=@colorableGroup +syn keyword BGffefd5 PapayaWhip contained containedin=@colorableGroup +syn keyword BGffdab9 PeachPuff contained containedin=@colorableGroup +syn keyword BGcd853f Peru contained containedin=@colorableGroup +syn keyword BGffc0cb Pink contained containedin=@colorableGroup +syn keyword BGdda0dd Plum contained containedin=@colorableGroup +syn keyword BGb0e0e6 PowderBlue contained containedin=@colorableGroup +syn keyword BGbc8f8f RosyBrown contained containedin=@colorableGroup +syn keyword BG4169e1 RoyalBlue contained containedin=@colorableGroup +syn keyword BG663399 RebeccaPurple contained containedin=@colorableGroup +syn keyword BG8b4513 SaddleBrown contained containedin=@colorableGroup +syn keyword BGfa8072 Salmon contained containedin=@colorableGroup +syn keyword BGf4a460 SandyBrown contained containedin=@colorableGroup +syn keyword BG2e8b57 SeaGreen contained containedin=@colorableGroup +syn keyword BGfff5ee SeaShell contained containedin=@colorableGroup +syn keyword BGa0522d Sienna contained containedin=@colorableGroup +syn keyword BG87ceeb SkyBlue contained containedin=@colorableGroup +syn keyword BG6a5acd SlateBlue contained containedin=@colorableGroup +syn keyword BG708090 SlateGray contained containedin=@colorableGroup +syn keyword BG708090 SlateGrey contained containedin=@colorableGroup +syn keyword BGfffafa Snow contained containedin=@colorableGroup +syn keyword BG00ff7f SpringGreen contained containedin=@colorableGroup +syn keyword BG4682b4 SteelBlue contained containedin=@colorableGroup +syn keyword BGd2b48c Tan contained containedin=@colorableGroup +syn keyword BGd8bfd8 Thistle contained containedin=@colorableGroup +syn keyword BGff6347 Tomato contained containedin=@colorableGroup +syn keyword BG40e0d0 Turquoise contained containedin=@colorableGroup +syn keyword BGee82ee Violet contained containedin=@colorableGroup +syn keyword BGf5deb3 Wheat contained containedin=@colorableGroup +syn keyword BGf5f5f5 WhiteSmoke contained containedin=@colorableGroup +syn keyword BG9acd32 YellowGreen contained containedin=@colorableGroup diff --git a/vim/.config/vim/plugged/vim-css-color/tests/bench b/vim/.config/vim/plugged/vim-css-color/tests/bench new file mode 100755 index 0000000..07d52bb --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/bench @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +s=startuptime.txt +vim --startuptime $s -o -c qa "$@" +perl -lane'$sum += $F[1] if m!/\.vim/after/syntax/css\.vim$!; END {print $sum}' $s +rm $s diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.csh b/vim/.config/vim/plugged/vim-css-color/tests/example.csh new file mode 100644 index 0000000..0fa895d --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.csh @@ -0,0 +1,13 @@ +# TODO #0f0 should show up green +# TODO f00 should not show up red + +set word = '#0f0' +echo "#0f0" +echo #f00 +#f00 +##0f0 +# TODO #0f0 +# TODO #0f0 TODO +cat < Hi! ; + } +}); diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.less b/vim/.config/vim/plugged/vim-css-color/tests/example.less new file mode 100644 index 0000000..adb1486 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.less @@ -0,0 +1,24 @@ +i { background: #359 } +b { background: #335599 } +u { background: rgba(144, 0, 0, .5) } +s { background: hsl(0, 100%, 50%) } + +@color1: #359; +@color1: #335599; +@color3: rgba(144, 0, 0, .5); +@color4: hsl(0, 100%, 50%); + +/* + * #123, #456 + */ + +// #123456 + +ul { + color: white; + + li { + color: yellow; + background: black; + } +} diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.nix b/vim/.config/vim/plugged/vim-css-color/tests/example.nix new file mode 100644 index 0000000..24a5b22 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.nix @@ -0,0 +1,69 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.colorscheme.nord; + hexColor = types.str // { + check = (x: hasPrefix "#" x && builtins.stringLength x == 7); + description = "hexadecimal color"; + }; + mkHexColorOption = name: default: + mkOption { + type = hexColor; + default = default; + description = name; + }; +in { + ## POLAR NIGHT + # The origin color or the Polar Night palette. + nord0 = mkHexColorOption "nord0" "#2E3440"; + + # A brighter shade color based on nord0. + nord1 = mkHexColorOption "nord1" "#3B4252"; + + # An even more brighter shade color of nord0. + nord2 = mkHexColorOption "nord2" "#434C5E"; + + # The brightest shade color based on nord0. + nord3 = mkHexColorOption "nord3" "#4C566A"; + + ## SNOW STORM + # The origin color or the Snow Storm palette. + nord4 = mkHexColorOption "nord4" "#D8DEE9"; + + # A brighter shade color of nord4. + nord5 = mkHexColorOption "nord5" "#E5E9F0"; + + # The brightest shade color based on nord4. + nord6 = mkHexColorOption "nord6" "#ECEFF4"; + + ## FROST + # A calm and highly contrasted color reminiscent of frozen polar water. + nord7 = mkHexColorOption "nord7" "#8FBCBB"; + + # The bright and shiny primary accent color reminiscent of pure and clear ice. + nord8 = mkHexColorOption "nord8" "#88C0D0"; + + # A more darkened and less saturated color reminiscent of arctic waters. + nord9 = mkHexColorOption "nord9" "#81A1C1"; + + # A dark and intensive color reminiscent of the deep arctic ocean. + nord10 = mkHexColorOption "nord10" "#5E81AC"; + + ## AURORA + # RED + nord11 = mkHexColorOption "nord11" "#BF616A"; + + # ORANGE + nord12 = mkHexColorOption "nord12" "#D08770"; + + # YELLOW + nord13 = mkHexColorOption "nord13" "#EBCB8B"; + + # GREEN + nord14 = mkHexColorOption "nord14" "#A3BE8C"; + + # PURPLE + nord15 = mkHexColorOption "nord15" "#B48EAD"; +} diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.sass b/vim/.config/vim/plugged/vim-css-color/tests/example.sass new file mode 100644 index 0000000..30a3949 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.sass @@ -0,0 +1,25 @@ +i + background: #359 +b + background: #335599 +u + background: rgba(144, 0, 0, .5) +s + background: hsl(0, 100%, 50%) + +!color1 = #359 +!color2 = #335599 +!color3 = rgba(144, 0, 0, .5) +!color4 = hsl(0, 100%, 50%) + +/* + * #123, #456 + */ + +// #123456 + +ul + color = white + li + color = yellow + background = black diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.scss b/vim/.config/vim/plugged/vim-css-color/tests/example.scss new file mode 100644 index 0000000..bb68767 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.scss @@ -0,0 +1,24 @@ +i { background: #359 } +b { background: #335599 } +u { background: rgba(144, 0, 0, .5) } +s { background: hsl(0, 100%, 50%) } + +$color1: #359; +$color2: #335599; +$color3: rgba(144, 0, 0, .5); +$color4: hsl(0, 100%, 50%); + +/* + * #123, #456 + */ + +// #123456 + +ul { + color: white; + + li { + color: yellow; + background: black; + } +} diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.sh b/vim/.config/vim/plugged/vim-css-color/tests/example.sh new file mode 100644 index 0000000..f857e08 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.sh @@ -0,0 +1,26 @@ +# XXX #0f0 should show up green +# XXX f00 should not show up red +# FIXME ff0 should show up yellow but are known not to + +echo '#0f0' +echo ##0f0 +echo \#ff0 +echo #f00 +echo ##0f0 +echo # #0f0 +cmd '#0f0' +cmd "#0f0" +cmd \#ff0 +cmd #f00 +cmd ##0f0 +cmd # #0f0 +echo `foo # #0f0` +for (( x = '#0f0' )) ; do : ; done +for (( x = "#0f0" )) ; do : ; done +#f00 +##0f0 XXX +# #0f0 XXX +# XXX #0f0 XXX +cat << '' +#0f0 + diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.stylus b/vim/.config/vim/plugged/vim-css-color/tests/example.stylus new file mode 100644 index 0000000..6d1f524 --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.stylus @@ -0,0 +1,28 @@ +i + background #359 +b + background #335599 +u + background rgba(144, 0, 0, .5) +s + background hsl(0, 100%, 50%) + +color1 = #359 +color2 = #335599 +color3 = rgba(144, 0, 0, .5) +color4 = hsl(0, 100%, 50%) + +/* + * #123, #456 + */ + +// #123456 + +ul { + color: white; + + li { + color: yellow; + background: black; + } +} diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.tcsh b/vim/.config/vim/plugged/vim-css-color/tests/example.tcsh new file mode 100644 index 0000000..0fa895d --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.tcsh @@ -0,0 +1,13 @@ +# TODO #0f0 should show up green +# TODO f00 should not show up red + +set word = '#0f0' +echo "#0f0" +echo #f00 +#f00 +##0f0 +# TODO #0f0 +# TODO #0f0 TODO +cat < { + static id: string = "search-result-row"; + + render(): b.INode { + return ( + + {this.data.name} + {this.data.pH} + + ); + } + + private rowColorStyle(ph: number): b.IStyle { + let backgroundColor = "#00000000"; + let color = "whitesmoke"; + if (ph >= 9) { + backgroundColor = "#ac39ac"; + } else if (ph >= 8.5) { + backgroundColor = "#d279d2"; + } else if (ph >= 8.25) { + backgroundColor = "#e6b3e6"; + } else if (ph >= 8) { + backgroundColor = "#80bfff"; + } else if (ph >= 7.75) { + backgroundColor = "#77b300"; + } else if (ph >= 7.5) { + backgroundColor = "#5cd65c"; + } else if (ph >= 7.25) { + backgroundColor = "#00e600"; + } else if (ph >= 7) { + backgroundColor = "#ffff33"; + } else if (ph >= 6.5) { + backgroundColor = "#ffcc00"; + } else if (ph >= 6.25) { + backgroundColor = "#ff8000"; + } else if (ph >= 6) { + backgroundColor = "#ff6600"; + } else if (ph >= 5.5) { + backgroundColor = "#ff1a1a"; + } else if (ph >= 5) { + backgroundColor = "#cc0000"; + color = "#ffffff"; + } else if (ph >= 4.5) { + backgroundColor = "#990000"; + color = "#ffffff"; + } else { + backgroundColor = "#660000"; + color = "#ffffff"; + } + + return { backgroundColor, color }; + } +} diff --git a/vim/.config/vim/plugged/vim-css-color/tests/example.zsh b/vim/.config/vim/plugged/vim-css-color/tests/example.zsh new file mode 100644 index 0000000..1d639ed --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/example.zsh @@ -0,0 +1,23 @@ +# XXX #0f0 should show up green +# XXX f00 should not show up red +# FIXME ff0 should show up yellow but are known not to + +echo '#0f0' +echo ##0f0 +echo \#ff0 +echo #f00 +echo ##0f0 +echo # #0f0 +cmd '#0f0' +cmd "#0f0" +cmd \#ff0 +cmd #f00 +cmd ##0f0 +cmd # #0f0 +#f00 +##0f0 XXX +# #0f0 XXX +# XXX #0f0 XXX +cat << '' +#0f0 + diff --git a/vim/.config/vim/plugged/vim-css-color/tests/torture.css b/vim/.config/vim/plugged/vim-css-color/tests/torture.css new file mode 100644 index 0000000..8e4e90f --- /dev/null +++ b/vim/.config/vim/plugged/vim-css-color/tests/torture.css @@ -0,0 +1,256 @@ +p { color: #300000; color: #300001; color: #300002; color: #300003; color: #300004; color: #300005; color: #300006; color: #300007; color: #300008; color: #300009; color: #30000a; color: #30000b; color: #30000c; color: #30000d; color: #30000e; color: #30000f; +color: #300100; color: #300101; color: #300102; color: #300103; color: #300104; color: #300105; color: #300106; color: #300107; color: #300108; color: #300109; color: #30010a; color: #30010b; color: #30010c; color: #30010d; color: #30010e; color: #30010f; +color: #300200; color: #300201; color: #300202; color: #300203; color: #300204; color: #300205; color: #300206; color: #300207; color: #300208; color: #300209; color: #30020a; color: #30020b; color: #30020c; color: #30020d; color: #30020e; color: #30020f; +color: #300300; color: #300301; color: #300302; color: #300303; color: #300304; color: #300305; color: #300306; color: #300307; color: #300308; color: #300309; color: #30030a; color: #30030b; color: #30030c; color: #30030d; color: #30030e; color: #30030f; +color: #300400; color: #300401; color: #300402; color: #300403; color: #300404; color: #300405; color: #300406; color: #300407; color: #300408; color: #300409; color: #30040a; color: #30040b; color: #30040c; color: #30040d; color: #30040e; color: #30040f; +color: #300500; color: #300501; color: #300502; color: #300503; color: #300504; color: #300505; color: #300506; color: #300507; color: #300508; color: #300509; color: #30050a; color: #30050b; color: #30050c; color: #30050d; color: #30050e; color: #30050f; +color: #300600; color: #300601; color: #300602; color: #300603; color: #300604; color: #300605; color: #300606; color: #300607; color: #300608; color: #300609; color: #30060a; color: #30060b; color: #30060c; color: #30060d; color: #30060e; color: #30060f; +color: #300700; color: #300701; color: #300702; color: #300703; color: #300704; color: #300705; color: #300706; color: #300707; color: #300708; color: #300709; color: #30070a; color: #30070b; color: #30070c; color: #30070d; color: #30070e; color: #30070f; +color: #300800; color: #300801; color: #300802; color: #300803; color: #300804; color: #300805; color: #300806; color: #300807; color: #300808; color: #300809; color: #30080a; color: #30080b; color: #30080c; color: #30080d; color: #30080e; color: #30080f; +color: #300900; color: #300901; color: #300902; color: #300903; color: #300904; color: #300905; color: #300906; color: #300907; color: #300908; color: #300909; color: #30090a; color: #30090b; color: #30090c; color: #30090d; color: #30090e; color: #30090f; +color: #300a00; color: #300a01; color: #300a02; color: #300a03; color: #300a04; color: #300a05; color: #300a06; color: #300a07; color: #300a08; color: #300a09; color: #300a0a; color: #300a0b; color: #300a0c; color: #300a0d; color: #300a0e; color: #300a0f; +color: #300b00; color: #300b01; color: #300b02; color: #300b03; color: #300b04; color: #300b05; color: #300b06; color: #300b07; color: #300b08; color: #300b09; color: #300b0a; color: #300b0b; color: #300b0c; color: #300b0d; color: #300b0e; color: #300b0f; +color: #300c00; color: #300c01; color: #300c02; color: #300c03; color: #300c04; color: #300c05; color: #300c06; color: #300c07; color: #300c08; color: #300c09; color: #300c0a; color: #300c0b; color: #300c0c; color: #300c0d; color: #300c0e; color: #300c0f; +color: #300d00; color: #300d01; color: #300d02; color: #300d03; color: #300d04; color: #300d05; color: #300d06; color: #300d07; color: #300d08; color: #300d09; color: #300d0a; color: #300d0b; color: #300d0c; color: #300d0d; color: #300d0e; color: #300d0f; +color: #300e00; color: #300e01; color: #300e02; color: #300e03; color: #300e04; color: #300e05; color: #300e06; color: #300e07; color: #300e08; color: #300e09; color: #300e0a; color: #300e0b; color: #300e0c; color: #300e0d; color: #300e0e; color: #300e0f; +color: #300f00; color: #300f01; color: #300f02; color: #300f03; color: #300f04; color: #300f05; color: #300f06; color: #300f07; color: #300f08; color: #300f09; color: #300f0a; color: #300f0b; color: #300f0c; color: #300f0d; color: #300f0e; color: #300f0f; +color: #301000; color: #301001; color: #301002; color: #301003; color: #301004; color: #301005; color: #301006; color: #301007; color: #301008; color: #301009; color: #30100a; color: #30100b; color: #30100c; color: #30100d; color: #30100e; color: #30100f; +color: #301100; color: #301101; color: #301102; color: #301103; color: #301104; color: #301105; color: #301106; color: #301107; color: #301108; color: #301109; color: #30110a; color: #30110b; color: #30110c; color: #30110d; color: #30110e; color: #30110f; +color: #301200; color: #301201; color: #301202; color: #301203; color: #301204; color: #301205; color: #301206; color: #301207; color: #301208; color: #301209; color: #30120a; color: #30120b; color: #30120c; color: #30120d; color: #30120e; color: #30120f; +color: #301300; color: #301301; color: #301302; color: #301303; color: #301304; color: #301305; color: #301306; color: #301307; color: #301308; color: #301309; color: #30130a; color: #30130b; color: #30130c; color: #30130d; color: #30130e; color: #30130f; +color: #301400; color: #301401; color: #301402; color: #301403; color: #301404; color: #301405; color: #301406; color: #301407; color: #301408; color: #301409; color: #30140a; color: #30140b; color: #30140c; color: #30140d; color: #30140e; color: #30140f; +color: #301500; color: #301501; color: #301502; color: #301503; color: #301504; color: #301505; color: #301506; color: #301507; color: #301508; color: #301509; color: #30150a; color: #30150b; color: #30150c; color: #30150d; color: #30150e; color: #30150f; +color: #301600; color: #301601; color: #301602; color: #301603; color: #301604; color: #301605; color: #301606; color: #301607; color: #301608; color: #301609; color: #30160a; color: #30160b; color: #30160c; color: #30160d; color: #30160e; color: #30160f; +color: #301700; color: #301701; color: #301702; color: #301703; color: #301704; color: #301705; color: #301706; color: #301707; color: #301708; color: #301709; color: #30170a; color: #30170b; color: #30170c; color: #30170d; color: #30170e; color: #30170f; +color: #301800; color: #301801; color: #301802; color: #301803; color: #301804; color: #301805; color: #301806; color: #301807; color: #301808; color: #301809; color: #30180a; color: #30180b; color: #30180c; color: #30180d; color: #30180e; color: #30180f; +color: #301900; color: #301901; color: #301902; color: #301903; color: #301904; color: #301905; color: #301906; color: #301907; color: #301908; color: #301909; color: #30190a; color: #30190b; color: #30190c; color: #30190d; color: #30190e; color: #30190f; +color: #301a00; color: #301a01; color: #301a02; color: #301a03; color: #301a04; color: #301a05; color: #301a06; color: #301a07; color: #301a08; color: #301a09; color: #301a0a; color: #301a0b; color: #301a0c; color: #301a0d; color: #301a0e; color: #301a0f; +color: #301b00; color: #301b01; color: #301b02; color: #301b03; color: #301b04; color: #301b05; color: #301b06; color: #301b07; color: #301b08; color: #301b09; color: #301b0a; color: #301b0b; color: #301b0c; color: #301b0d; color: #301b0e; color: #301b0f; +color: #301c00; color: #301c01; color: #301c02; color: #301c03; color: #301c04; color: #301c05; color: #301c06; color: #301c07; color: #301c08; color: #301c09; color: #301c0a; color: #301c0b; color: #301c0c; color: #301c0d; color: #301c0e; color: #301c0f; +color: #301d00; color: #301d01; color: #301d02; color: #301d03; color: #301d04; color: #301d05; color: #301d06; color: #301d07; color: #301d08; color: #301d09; color: #301d0a; color: #301d0b; color: #301d0c; color: #301d0d; color: #301d0e; color: #301d0f; +color: #301e00; color: #301e01; color: #301e02; color: #301e03; color: #301e04; color: #301e05; color: #301e06; color: #301e07; color: #301e08; color: #301e09; color: #301e0a; color: #301e0b; color: #301e0c; color: #301e0d; color: #301e0e; color: #301e0f; +color: #301f00; color: #301f01; color: #301f02; color: #301f03; color: #301f04; color: #301f05; color: #301f06; color: #301f07; color: #301f08; color: #301f09; color: #301f0a; color: #301f0b; color: #301f0c; color: #301f0d; color: #301f0e; color: #301f0f; +color: #302000; color: #302001; color: #302002; color: #302003; color: #302004; color: #302005; color: #302006; color: #302007; color: #302008; color: #302009; color: #30200a; color: #30200b; color: #30200c; color: #30200d; color: #30200e; color: #30200f; +color: #302100; color: #302101; color: #302102; color: #302103; color: #302104; color: #302105; color: #302106; color: #302107; color: #302108; color: #302109; color: #30210a; color: #30210b; color: #30210c; color: #30210d; color: #30210e; color: #30210f; +color: #302200; color: #302201; color: #302202; color: #302203; color: #302204; color: #302205; color: #302206; color: #302207; color: #302208; color: #302209; color: #30220a; color: #30220b; color: #30220c; color: #30220d; color: #30220e; color: #30220f; +color: #302300; color: #302301; color: #302302; color: #302303; color: #302304; color: #302305; color: #302306; color: #302307; color: #302308; color: #302309; color: #30230a; color: #30230b; color: #30230c; color: #30230d; color: #30230e; color: #30230f; +color: #302400; color: #302401; color: #302402; color: #302403; color: #302404; color: #302405; color: #302406; color: #302407; color: #302408; color: #302409; color: #30240a; color: #30240b; color: #30240c; color: #30240d; color: #30240e; color: #30240f; +color: #302500; color: #302501; color: #302502; color: #302503; color: #302504; color: #302505; color: #302506; color: #302507; color: #302508; color: #302509; color: #30250a; color: #30250b; color: #30250c; color: #30250d; color: #30250e; color: #30250f; +color: #302600; color: #302601; color: #302602; color: #302603; color: #302604; color: #302605; color: #302606; color: #302607; color: #302608; color: #302609; color: #30260a; color: #30260b; color: #30260c; color: #30260d; color: #30260e; color: #30260f; +color: #302700; color: #302701; color: #302702; color: #302703; color: #302704; color: #302705; color: #302706; color: #302707; color: #302708; color: #302709; color: #30270a; color: #30270b; color: #30270c; color: #30270d; color: #30270e; color: #30270f; +color: #302800; color: #302801; color: #302802; color: #302803; color: #302804; color: #302805; color: #302806; color: #302807; color: #302808; color: #302809; color: #30280a; color: #30280b; color: #30280c; color: #30280d; color: #30280e; color: #30280f; +color: #302900; color: #302901; color: #302902; color: #302903; color: #302904; color: #302905; color: #302906; color: #302907; color: #302908; color: #302909; color: #30290a; color: #30290b; color: #30290c; color: #30290d; color: #30290e; color: #30290f; +color: #302a00; color: #302a01; color: #302a02; color: #302a03; color: #302a04; color: #302a05; color: #302a06; color: #302a07; color: #302a08; color: #302a09; color: #302a0a; color: #302a0b; color: #302a0c; color: #302a0d; color: #302a0e; color: #302a0f; +color: #302b00; color: #302b01; color: #302b02; color: #302b03; color: #302b04; color: #302b05; color: #302b06; color: #302b07; color: #302b08; color: #302b09; color: #302b0a; color: #302b0b; color: #302b0c; color: #302b0d; color: #302b0e; color: #302b0f; +color: #302c00; color: #302c01; color: #302c02; color: #302c03; color: #302c04; color: #302c05; color: #302c06; color: #302c07; color: #302c08; color: #302c09; color: #302c0a; color: #302c0b; color: #302c0c; color: #302c0d; color: #302c0e; color: #302c0f; +color: #302d00; color: #302d01; color: #302d02; color: #302d03; color: #302d04; color: #302d05; color: #302d06; color: #302d07; color: #302d08; color: #302d09; color: #302d0a; color: #302d0b; color: #302d0c; color: #302d0d; color: #302d0e; color: #302d0f; +color: #302e00; color: #302e01; color: #302e02; color: #302e03; color: #302e04; color: #302e05; color: #302e06; color: #302e07; color: #302e08; color: #302e09; color: #302e0a; color: #302e0b; color: #302e0c; color: #302e0d; color: #302e0e; color: #302e0f; +color: #302f00; color: #302f01; color: #302f02; color: #302f03; color: #302f04; color: #302f05; color: #302f06; color: #302f07; color: #302f08; color: #302f09; color: #302f0a; color: #302f0b; color: #302f0c; color: #302f0d; color: #302f0e; color: #302f0f; +color: #303000; color: #303001; color: #303002; color: #303003; color: #303004; color: #303005; color: #303006; color: #303007; color: #303008; color: #303009; color: #30300a; color: #30300b; color: #30300c; color: #30300d; color: #30300e; color: #30300f; +color: #303100; color: #303101; color: #303102; color: #303103; color: #303104; color: #303105; color: #303106; color: #303107; color: #303108; color: #303109; color: #30310a; color: #30310b; color: #30310c; color: #30310d; color: #30310e; color: #30310f; +color: #303200; color: #303201; color: #303202; color: #303203; color: #303204; color: #303205; color: #303206; color: #303207; color: #303208; color: #303209; color: #30320a; color: #30320b; color: #30320c; color: #30320d; color: #30320e; color: #30320f; +color: #303300; color: #303301; color: #303302; color: #303303; color: #303304; color: #303305; color: #303306; color: #303307; color: #303308; color: #303309; color: #30330a; color: #30330b; color: #30330c; color: #30330d; color: #30330e; color: #30330f; +color: #303400; color: #303401; color: #303402; color: #303403; color: #303404; color: #303405; color: #303406; color: #303407; color: #303408; color: #303409; color: #30340a; color: #30340b; color: #30340c; color: #30340d; color: #30340e; color: #30340f; +color: #303500; color: #303501; color: #303502; color: #303503; color: #303504; color: #303505; color: #303506; color: #303507; color: #303508; color: #303509; color: #30350a; color: #30350b; color: #30350c; color: #30350d; color: #30350e; color: #30350f; +color: #303600; color: #303601; color: #303602; color: #303603; color: #303604; color: #303605; color: #303606; color: #303607; color: #303608; color: #303609; color: #30360a; color: #30360b; color: #30360c; color: #30360d; color: #30360e; color: #30360f; +color: #303700; color: #303701; color: #303702; color: #303703; color: #303704; color: #303705; color: #303706; color: #303707; color: #303708; color: #303709; color: #30370a; color: #30370b; color: #30370c; color: #30370d; color: #30370e; color: #30370f; +color: #303800; color: #303801; color: #303802; color: #303803; color: #303804; color: #303805; color: #303806; color: #303807; color: #303808; color: #303809; color: #30380a; color: #30380b; color: #30380c; color: #30380d; color: #30380e; color: #30380f; +color: #303900; color: #303901; color: #303902; color: #303903; color: #303904; color: #303905; color: #303906; color: #303907; color: #303908; color: #303909; color: #30390a; color: #30390b; color: #30390c; color: #30390d; color: #30390e; color: #30390f; +color: #303a00; color: #303a01; color: #303a02; color: #303a03; color: #303a04; color: #303a05; color: #303a06; color: #303a07; color: #303a08; color: #303a09; color: #303a0a; color: #303a0b; color: #303a0c; color: #303a0d; color: #303a0e; color: #303a0f; +color: #303b00; color: #303b01; color: #303b02; color: #303b03; color: #303b04; color: #303b05; color: #303b06; color: #303b07; color: #303b08; color: #303b09; color: #303b0a; color: #303b0b; color: #303b0c; color: #303b0d; color: #303b0e; color: #303b0f; +color: #303c00; color: #303c01; color: #303c02; color: #303c03; color: #303c04; color: #303c05; color: #303c06; color: #303c07; color: #303c08; color: #303c09; color: #303c0a; color: #303c0b; color: #303c0c; color: #303c0d; color: #303c0e; color: #303c0f; +color: #303d00; color: #303d01; color: #303d02; color: #303d03; color: #303d04; color: #303d05; color: #303d06; color: #303d07; color: #303d08; color: #303d09; color: #303d0a; color: #303d0b; color: #303d0c; color: #303d0d; color: #303d0e; color: #303d0f; +color: #303e00; color: #303e01; color: #303e02; color: #303e03; color: #303e04; color: #303e05; color: #303e06; color: #303e07; color: #303e08; color: #303e09; color: #303e0a; color: #303e0b; color: #303e0c; color: #303e0d; color: #303e0e; color: #303e0f; +color: #303f00; color: #303f01; color: #303f02; color: #303f03; color: #303f04; color: #303f05; color: #303f06; color: #303f07; color: #303f08; color: #303f09; color: #303f0a; color: #303f0b; color: #303f0c; color: #303f0d; color: #303f0e; color: #303f0f; +color: #304000; color: #304001; color: #304002; color: #304003; color: #304004; color: #304005; color: #304006; color: #304007; color: #304008; color: #304009; color: #30400a; color: #30400b; color: #30400c; color: #30400d; color: #30400e; color: #30400f; +color: #304100; color: #304101; color: #304102; color: #304103; color: #304104; color: #304105; color: #304106; color: #304107; color: #304108; color: #304109; color: #30410a; color: #30410b; color: #30410c; color: #30410d; color: #30410e; color: #30410f; +color: #304200; color: #304201; color: #304202; color: #304203; color: #304204; color: #304205; color: #304206; color: #304207; color: #304208; color: #304209; color: #30420a; color: #30420b; color: #30420c; color: #30420d; color: #30420e; color: #30420f; +color: #304300; color: #304301; color: #304302; color: #304303; color: #304304; color: #304305; color: #304306; color: #304307; color: #304308; color: #304309; color: #30430a; color: #30430b; color: #30430c; color: #30430d; color: #30430e; color: #30430f; +color: #304400; color: #304401; color: #304402; color: #304403; color: #304404; color: #304405; color: #304406; color: #304407; color: #304408; color: #304409; color: #30440a; color: #30440b; color: #30440c; color: #30440d; color: #30440e; color: #30440f; +color: #304500; color: #304501; color: #304502; color: #304503; color: #304504; color: #304505; color: #304506; color: #304507; color: #304508; color: #304509; color: #30450a; color: #30450b; color: #30450c; color: #30450d; color: #30450e; color: #30450f; +color: #304600; color: #304601; color: #304602; color: #304603; color: #304604; color: #304605; color: #304606; color: #304607; color: #304608; color: #304609; color: #30460a; color: #30460b; color: #30460c; color: #30460d; color: #30460e; color: #30460f; +color: #304700; color: #304701; color: #304702; color: #304703; color: #304704; color: #304705; color: #304706; color: #304707; color: #304708; color: #304709; color: #30470a; color: #30470b; color: #30470c; color: #30470d; color: #30470e; color: #30470f; +color: #304800; color: #304801; color: #304802; color: #304803; color: #304804; color: #304805; color: #304806; color: #304807; color: #304808; color: #304809; color: #30480a; color: #30480b; color: #30480c; color: #30480d; color: #30480e; color: #30480f; +color: #304900; color: #304901; color: #304902; color: #304903; color: #304904; color: #304905; color: #304906; color: #304907; color: #304908; color: #304909; color: #30490a; color: #30490b; color: #30490c; color: #30490d; color: #30490e; color: #30490f; +color: #304a00; color: #304a01; color: #304a02; color: #304a03; color: #304a04; color: #304a05; color: #304a06; color: #304a07; color: #304a08; color: #304a09; color: #304a0a; color: #304a0b; color: #304a0c; color: #304a0d; color: #304a0e; color: #304a0f; +color: #304b00; color: #304b01; color: #304b02; color: #304b03; color: #304b04; color: #304b05; color: #304b06; color: #304b07; color: #304b08; color: #304b09; color: #304b0a; color: #304b0b; color: #304b0c; color: #304b0d; color: #304b0e; color: #304b0f; +color: #304c00; color: #304c01; color: #304c02; color: #304c03; color: #304c04; color: #304c05; color: #304c06; color: #304c07; color: #304c08; color: #304c09; color: #304c0a; color: #304c0b; color: #304c0c; color: #304c0d; color: #304c0e; color: #304c0f; +color: #304d00; color: #304d01; color: #304d02; color: #304d03; color: #304d04; color: #304d05; color: #304d06; color: #304d07; color: #304d08; color: #304d09; color: #304d0a; color: #304d0b; color: #304d0c; color: #304d0d; color: #304d0e; color: #304d0f; +color: #304e00; color: #304e01; color: #304e02; color: #304e03; color: #304e04; color: #304e05; color: #304e06; color: #304e07; color: #304e08; color: #304e09; color: #304e0a; color: #304e0b; color: #304e0c; color: #304e0d; color: #304e0e; color: #304e0f; +color: #304f00; color: #304f01; color: #304f02; color: #304f03; color: #304f04; color: #304f05; color: #304f06; color: #304f07; color: #304f08; color: #304f09; color: #304f0a; color: #304f0b; color: #304f0c; color: #304f0d; color: #304f0e; color: #304f0f; +color: #305000; color: #305001; color: #305002; color: #305003; color: #305004; color: #305005; color: #305006; color: #305007; color: #305008; color: #305009; color: #30500a; color: #30500b; color: #30500c; color: #30500d; color: #30500e; color: #30500f; +color: #305100; color: #305101; color: #305102; color: #305103; color: #305104; color: #305105; color: #305106; color: #305107; color: #305108; color: #305109; color: #30510a; color: #30510b; color: #30510c; color: #30510d; color: #30510e; color: #30510f; +color: #305200; color: #305201; color: #305202; color: #305203; color: #305204; color: #305205; color: #305206; color: #305207; color: #305208; color: #305209; color: #30520a; color: #30520b; color: #30520c; color: #30520d; color: #30520e; color: #30520f; +color: #305300; color: #305301; color: #305302; color: #305303; color: #305304; color: #305305; color: #305306; color: #305307; color: #305308; color: #305309; color: #30530a; color: #30530b; color: #30530c; color: #30530d; color: #30530e; color: #30530f; +color: #305400; color: #305401; color: #305402; color: #305403; color: #305404; color: #305405; color: #305406; color: #305407; color: #305408; color: #305409; color: #30540a; color: #30540b; color: #30540c; color: #30540d; color: #30540e; color: #30540f; +color: #305500; color: #305501; color: #305502; color: #305503; color: #305504; color: #305505; color: #305506; color: #305507; color: #305508; color: #305509; color: #30550a; color: #30550b; color: #30550c; color: #30550d; color: #30550e; color: #30550f; +color: #305600; color: #305601; color: #305602; color: #305603; color: #305604; color: #305605; color: #305606; color: #305607; color: #305608; color: #305609; color: #30560a; color: #30560b; color: #30560c; color: #30560d; color: #30560e; color: #30560f; +color: #305700; color: #305701; color: #305702; color: #305703; color: #305704; color: #305705; color: #305706; color: #305707; color: #305708; color: #305709; color: #30570a; color: #30570b; color: #30570c; color: #30570d; color: #30570e; color: #30570f; +color: #305800; color: #305801; color: #305802; color: #305803; color: #305804; color: #305805; color: #305806; color: #305807; color: #305808; color: #305809; color: #30580a; color: #30580b; color: #30580c; color: #30580d; color: #30580e; color: #30580f; +color: #305900; color: #305901; color: #305902; color: #305903; color: #305904; color: #305905; color: #305906; color: #305907; color: #305908; color: #305909; color: #30590a; color: #30590b; color: #30590c; color: #30590d; color: #30590e; color: #30590f; +color: #305a00; color: #305a01; color: #305a02; color: #305a03; color: #305a04; color: #305a05; color: #305a06; color: #305a07; color: #305a08; color: #305a09; color: #305a0a; color: #305a0b; color: #305a0c; color: #305a0d; color: #305a0e; color: #305a0f; +color: #305b00; color: #305b01; color: #305b02; color: #305b03; color: #305b04; color: #305b05; color: #305b06; color: #305b07; color: #305b08; color: #305b09; color: #305b0a; color: #305b0b; color: #305b0c; color: #305b0d; color: #305b0e; color: #305b0f; +color: #305c00; color: #305c01; color: #305c02; color: #305c03; color: #305c04; color: #305c05; color: #305c06; color: #305c07; color: #305c08; color: #305c09; color: #305c0a; color: #305c0b; color: #305c0c; color: #305c0d; color: #305c0e; color: #305c0f; +color: #305d00; color: #305d01; color: #305d02; color: #305d03; color: #305d04; color: #305d05; color: #305d06; color: #305d07; color: #305d08; color: #305d09; color: #305d0a; color: #305d0b; color: #305d0c; color: #305d0d; color: #305d0e; color: #305d0f; +color: #305e00; color: #305e01; color: #305e02; color: #305e03; color: #305e04; color: #305e05; color: #305e06; color: #305e07; color: #305e08; color: #305e09; color: #305e0a; color: #305e0b; color: #305e0c; color: #305e0d; color: #305e0e; color: #305e0f; +color: #305f00; color: #305f01; color: #305f02; color: #305f03; color: #305f04; color: #305f05; color: #305f06; color: #305f07; color: #305f08; color: #305f09; color: #305f0a; color: #305f0b; color: #305f0c; color: #305f0d; color: #305f0e; color: #305f0f; +color: #306000; color: #306001; color: #306002; color: #306003; color: #306004; color: #306005; color: #306006; color: #306007; color: #306008; color: #306009; color: #30600a; color: #30600b; color: #30600c; color: #30600d; color: #30600e; color: #30600f; +color: #306100; color: #306101; color: #306102; color: #306103; color: #306104; color: #306105; color: #306106; color: #306107; color: #306108; color: #306109; color: #30610a; color: #30610b; color: #30610c; color: #30610d; color: #30610e; color: #30610f; +color: #306200; color: #306201; color: #306202; color: #306203; color: #306204; color: #306205; color: #306206; color: #306207; color: #306208; color: #306209; color: #30620a; color: #30620b; color: #30620c; color: #30620d; color: #30620e; color: #30620f; +color: #306300; color: #306301; color: #306302; color: #306303; color: #306304; color: #306305; color: #306306; color: #306307; color: #306308; color: #306309; color: #30630a; color: #30630b; color: #30630c; color: #30630d; color: #30630e; color: #30630f; +color: #306400; color: #306401; color: #306402; color: #306403; color: #306404; color: #306405; color: #306406; color: #306407; color: #306408; color: #306409; color: #30640a; color: #30640b; color: #30640c; color: #30640d; color: #30640e; color: #30640f; +color: #306500; color: #306501; color: #306502; color: #306503; color: #306504; color: #306505; color: #306506; color: #306507; color: #306508; color: #306509; color: #30650a; color: #30650b; color: #30650c; color: #30650d; color: #30650e; color: #30650f; +color: #306600; color: #306601; color: #306602; color: #306603; color: #306604; color: #306605; color: #306606; color: #306607; color: #306608; color: #306609; color: #30660a; color: #30660b; color: #30660c; color: #30660d; color: #30660e; color: #30660f; +color: #306700; color: #306701; color: #306702; color: #306703; color: #306704; color: #306705; color: #306706; color: #306707; color: #306708; color: #306709; color: #30670a; color: #30670b; color: #30670c; color: #30670d; color: #30670e; color: #30670f; +color: #306800; color: #306801; color: #306802; color: #306803; color: #306804; color: #306805; color: #306806; color: #306807; color: #306808; color: #306809; color: #30680a; color: #30680b; color: #30680c; color: #30680d; color: #30680e; color: #30680f; +color: #306900; color: #306901; color: #306902; color: #306903; color: #306904; color: #306905; color: #306906; color: #306907; color: #306908; color: #306909; color: #30690a; color: #30690b; color: #30690c; color: #30690d; color: #30690e; color: #30690f; +color: #306a00; color: #306a01; color: #306a02; color: #306a03; color: #306a04; color: #306a05; color: #306a06; color: #306a07; color: #306a08; color: #306a09; color: #306a0a; color: #306a0b; color: #306a0c; color: #306a0d; color: #306a0e; color: #306a0f; +color: #306b00; color: #306b01; color: #306b02; color: #306b03; color: #306b04; color: #306b05; color: #306b06; color: #306b07; color: #306b08; color: #306b09; color: #306b0a; color: #306b0b; color: #306b0c; color: #306b0d; color: #306b0e; color: #306b0f; +color: #306c00; color: #306c01; color: #306c02; color: #306c03; color: #306c04; color: #306c05; color: #306c06; color: #306c07; color: #306c08; color: #306c09; color: #306c0a; color: #306c0b; color: #306c0c; color: #306c0d; color: #306c0e; color: #306c0f; +color: #306d00; color: #306d01; color: #306d02; color: #306d03; color: #306d04; color: #306d05; color: #306d06; color: #306d07; color: #306d08; color: #306d09; color: #306d0a; color: #306d0b; color: #306d0c; color: #306d0d; color: #306d0e; color: #306d0f; +color: #306e00; color: #306e01; color: #306e02; color: #306e03; color: #306e04; color: #306e05; color: #306e06; color: #306e07; color: #306e08; color: #306e09; color: #306e0a; color: #306e0b; color: #306e0c; color: #306e0d; color: #306e0e; color: #306e0f; +color: #306f00; color: #306f01; color: #306f02; color: #306f03; color: #306f04; color: #306f05; color: #306f06; color: #306f07; color: #306f08; color: #306f09; color: #306f0a; color: #306f0b; color: #306f0c; color: #306f0d; color: #306f0e; color: #306f0f; +color: #307000; color: #307001; color: #307002; color: #307003; color: #307004; color: #307005; color: #307006; color: #307007; color: #307008; color: #307009; color: #30700a; color: #30700b; color: #30700c; color: #30700d; color: #30700e; color: #30700f; +color: #307100; color: #307101; color: #307102; color: #307103; color: #307104; color: #307105; color: #307106; color: #307107; color: #307108; color: #307109; color: #30710a; color: #30710b; color: #30710c; color: #30710d; color: #30710e; color: #30710f; +color: #307200; color: #307201; color: #307202; color: #307203; color: #307204; color: #307205; color: #307206; color: #307207; color: #307208; color: #307209; color: #30720a; color: #30720b; color: #30720c; color: #30720d; color: #30720e; color: #30720f; +color: #307300; color: #307301; color: #307302; color: #307303; color: #307304; color: #307305; color: #307306; color: #307307; color: #307308; color: #307309; color: #30730a; color: #30730b; color: #30730c; color: #30730d; color: #30730e; color: #30730f; +color: #307400; color: #307401; color: #307402; color: #307403; color: #307404; color: #307405; color: #307406; color: #307407; color: #307408; color: #307409; color: #30740a; color: #30740b; color: #30740c; color: #30740d; color: #30740e; color: #30740f; +color: #307500; color: #307501; color: #307502; color: #307503; color: #307504; color: #307505; color: #307506; color: #307507; color: #307508; color: #307509; color: #30750a; color: #30750b; color: #30750c; color: #30750d; color: #30750e; color: #30750f; +color: #307600; color: #307601; color: #307602; color: #307603; color: #307604; color: #307605; color: #307606; color: #307607; color: #307608; color: #307609; color: #30760a; color: #30760b; color: #30760c; color: #30760d; color: #30760e; color: #30760f; +color: #307700; color: #307701; color: #307702; color: #307703; color: #307704; color: #307705; color: #307706; color: #307707; color: #307708; color: #307709; color: #30770a; color: #30770b; color: #30770c; color: #30770d; color: #30770e; color: #30770f; +color: #307800; color: #307801; color: #307802; color: #307803; color: #307804; color: #307805; color: #307806; color: #307807; color: #307808; color: #307809; color: #30780a; color: #30780b; color: #30780c; color: #30780d; color: #30780e; color: #30780f; +color: #307900; color: #307901; color: #307902; color: #307903; color: #307904; color: #307905; color: #307906; color: #307907; color: #307908; color: #307909; color: #30790a; color: #30790b; color: #30790c; color: #30790d; color: #30790e; color: #30790f; +color: #307a00; color: #307a01; color: #307a02; color: #307a03; color: #307a04; color: #307a05; color: #307a06; color: #307a07; color: #307a08; color: #307a09; color: #307a0a; color: #307a0b; color: #307a0c; color: #307a0d; color: #307a0e; color: #307a0f; +color: #307b00; color: #307b01; color: #307b02; color: #307b03; color: #307b04; color: #307b05; color: #307b06; color: #307b07; color: #307b08; color: #307b09; color: #307b0a; color: #307b0b; color: #307b0c; color: #307b0d; color: #307b0e; color: #307b0f; +color: #307c00; color: #307c01; color: #307c02; color: #307c03; color: #307c04; color: #307c05; color: #307c06; color: #307c07; color: #307c08; color: #307c09; color: #307c0a; color: #307c0b; color: #307c0c; color: #307c0d; color: #307c0e; color: #307c0f; +color: #307d00; color: #307d01; color: #307d02; color: #307d03; color: #307d04; color: #307d05; color: #307d06; color: #307d07; color: #307d08; color: #307d09; color: #307d0a; color: #307d0b; color: #307d0c; color: #307d0d; color: #307d0e; color: #307d0f; +color: #307e00; color: #307e01; color: #307e02; color: #307e03; color: #307e04; color: #307e05; color: #307e06; color: #307e07; color: #307e08; color: #307e09; color: #307e0a; color: #307e0b; color: #307e0c; color: #307e0d; color: #307e0e; color: #307e0f; +color: #307f00; color: #307f01; color: #307f02; color: #307f03; color: #307f04; color: #307f05; color: #307f06; color: #307f07; color: #307f08; color: #307f09; color: #307f0a; color: #307f0b; color: #307f0c; color: #307f0d; color: #307f0e; color: #307f0f; +color: #308000; color: #308001; color: #308002; color: #308003; color: #308004; color: #308005; color: #308006; color: #308007; color: #308008; color: #308009; color: #30800a; color: #30800b; color: #30800c; color: #30800d; color: #30800e; color: #30800f; +color: #308100; color: #308101; color: #308102; color: #308103; color: #308104; color: #308105; color: #308106; color: #308107; color: #308108; color: #308109; color: #30810a; color: #30810b; color: #30810c; color: #30810d; color: #30810e; color: #30810f; +color: #308200; color: #308201; color: #308202; color: #308203; color: #308204; color: #308205; color: #308206; color: #308207; color: #308208; color: #308209; color: #30820a; color: #30820b; color: #30820c; color: #30820d; color: #30820e; color: #30820f; +color: #308300; color: #308301; color: #308302; color: #308303; color: #308304; color: #308305; color: #308306; color: #308307; color: #308308; color: #308309; color: #30830a; color: #30830b; color: #30830c; color: #30830d; color: #30830e; color: #30830f; +color: #308400; color: #308401; color: #308402; color: #308403; color: #308404; color: #308405; color: #308406; color: #308407; color: #308408; color: #308409; color: #30840a; color: #30840b; color: #30840c; color: #30840d; color: #30840e; color: #30840f; +color: #308500; color: #308501; color: #308502; color: #308503; color: #308504; color: #308505; color: #308506; color: #308507; color: #308508; color: #308509; color: #30850a; color: #30850b; color: #30850c; color: #30850d; color: #30850e; color: #30850f; +color: #308600; color: #308601; color: #308602; color: #308603; color: #308604; color: #308605; color: #308606; color: #308607; color: #308608; color: #308609; color: #30860a; color: #30860b; color: #30860c; color: #30860d; color: #30860e; color: #30860f; +color: #308700; color: #308701; color: #308702; color: #308703; color: #308704; color: #308705; color: #308706; color: #308707; color: #308708; color: #308709; color: #30870a; color: #30870b; color: #30870c; color: #30870d; color: #30870e; color: #30870f; +color: #308800; color: #308801; color: #308802; color: #308803; color: #308804; color: #308805; color: #308806; color: #308807; color: #308808; color: #308809; color: #30880a; color: #30880b; color: #30880c; color: #30880d; color: #30880e; color: #30880f; +color: #308900; color: #308901; color: #308902; color: #308903; color: #308904; color: #308905; color: #308906; color: #308907; color: #308908; color: #308909; color: #30890a; color: #30890b; color: #30890c; color: #30890d; color: #30890e; color: #30890f; +color: #308a00; color: #308a01; color: #308a02; color: #308a03; color: #308a04; color: #308a05; color: #308a06; color: #308a07; color: #308a08; color: #308a09; color: #308a0a; color: #308a0b; color: #308a0c; color: #308a0d; color: #308a0e; color: #308a0f; +color: #308b00; color: #308b01; color: #308b02; color: #308b03; color: #308b04; color: #308b05; color: #308b06; color: #308b07; color: #308b08; color: #308b09; color: #308b0a; color: #308b0b; color: #308b0c; color: #308b0d; color: #308b0e; color: #308b0f; +color: #308c00; color: #308c01; color: #308c02; color: #308c03; color: #308c04; color: #308c05; color: #308c06; color: #308c07; color: #308c08; color: #308c09; color: #308c0a; color: #308c0b; color: #308c0c; color: #308c0d; color: #308c0e; color: #308c0f; +color: #308d00; color: #308d01; color: #308d02; color: #308d03; color: #308d04; color: #308d05; color: #308d06; color: #308d07; color: #308d08; color: #308d09; color: #308d0a; color: #308d0b; color: #308d0c; color: #308d0d; color: #308d0e; color: #308d0f; +color: #308e00; color: #308e01; color: #308e02; color: #308e03; color: #308e04; color: #308e05; color: #308e06; color: #308e07; color: #308e08; color: #308e09; color: #308e0a; color: #308e0b; color: #308e0c; color: #308e0d; color: #308e0e; color: #308e0f; +color: #308f00; color: #308f01; color: #308f02; color: #308f03; color: #308f04; color: #308f05; color: #308f06; color: #308f07; color: #308f08; color: #308f09; color: #308f0a; color: #308f0b; color: #308f0c; color: #308f0d; color: #308f0e; color: #308f0f; +color: #309000; color: #309001; color: #309002; color: #309003; color: #309004; color: #309005; color: #309006; color: #309007; color: #309008; color: #309009; color: #30900a; color: #30900b; color: #30900c; color: #30900d; color: #30900e; color: #30900f; +color: #309100; color: #309101; color: #309102; color: #309103; color: #309104; color: #309105; color: #309106; color: #309107; color: #309108; color: #309109; color: #30910a; color: #30910b; color: #30910c; color: #30910d; color: #30910e; color: #30910f; +color: #309200; color: #309201; color: #309202; color: #309203; color: #309204; color: #309205; color: #309206; color: #309207; color: #309208; color: #309209; color: #30920a; color: #30920b; color: #30920c; color: #30920d; color: #30920e; color: #30920f; +color: #309300; color: #309301; color: #309302; color: #309303; color: #309304; color: #309305; color: #309306; color: #309307; color: #309308; color: #309309; color: #30930a; color: #30930b; color: #30930c; color: #30930d; color: #30930e; color: #30930f; +color: #309400; color: #309401; color: #309402; color: #309403; color: #309404; color: #309405; color: #309406; color: #309407; color: #309408; color: #309409; color: #30940a; color: #30940b; color: #30940c; color: #30940d; color: #30940e; color: #30940f; +color: #309500; color: #309501; color: #309502; color: #309503; color: #309504; color: #309505; color: #309506; color: #309507; color: #309508; color: #309509; color: #30950a; color: #30950b; color: #30950c; color: #30950d; color: #30950e; color: #30950f; +color: #309600; color: #309601; color: #309602; color: #309603; color: #309604; color: #309605; color: #309606; color: #309607; color: #309608; color: #309609; color: #30960a; color: #30960b; color: #30960c; color: #30960d; color: #30960e; color: #30960f; +color: #309700; color: #309701; color: #309702; color: #309703; color: #309704; color: #309705; color: #309706; color: #309707; color: #309708; color: #309709; color: #30970a; color: #30970b; color: #30970c; color: #30970d; color: #30970e; color: #30970f; +color: #309800; color: #309801; color: #309802; color: #309803; color: #309804; color: #309805; color: #309806; color: #309807; color: #309808; color: #309809; color: #30980a; color: #30980b; color: #30980c; color: #30980d; color: #30980e; color: #30980f; +color: #309900; color: #309901; color: #309902; color: #309903; color: #309904; color: #309905; color: #309906; color: #309907; color: #309908; color: #309909; color: #30990a; color: #30990b; color: #30990c; color: #30990d; color: #30990e; color: #30990f; +color: #309a00; color: #309a01; color: #309a02; color: #309a03; color: #309a04; color: #309a05; color: #309a06; color: #309a07; color: #309a08; color: #309a09; color: #309a0a; color: #309a0b; color: #309a0c; color: #309a0d; color: #309a0e; color: #309a0f; +color: #309b00; color: #309b01; color: #309b02; color: #309b03; color: #309b04; color: #309b05; color: #309b06; color: #309b07; color: #309b08; color: #309b09; color: #309b0a; color: #309b0b; color: #309b0c; color: #309b0d; color: #309b0e; color: #309b0f; +color: #309c00; color: #309c01; color: #309c02; color: #309c03; color: #309c04; color: #309c05; color: #309c06; color: #309c07; color: #309c08; color: #309c09; color: #309c0a; color: #309c0b; color: #309c0c; color: #309c0d; color: #309c0e; color: #309c0f; +color: #309d00; color: #309d01; color: #309d02; color: #309d03; color: #309d04; color: #309d05; color: #309d06; color: #309d07; color: #309d08; color: #309d09; color: #309d0a; color: #309d0b; color: #309d0c; color: #309d0d; color: #309d0e; color: #309d0f; +color: #309e00; color: #309e01; color: #309e02; color: #309e03; color: #309e04; color: #309e05; color: #309e06; color: #309e07; color: #309e08; color: #309e09; color: #309e0a; color: #309e0b; color: #309e0c; color: #309e0d; color: #309e0e; color: #309e0f; +color: #309f00; color: #309f01; color: #309f02; color: #309f03; color: #309f04; color: #309f05; color: #309f06; color: #309f07; color: #309f08; color: #309f09; color: #309f0a; color: #309f0b; color: #309f0c; color: #309f0d; color: #309f0e; color: #309f0f; +color: #30a000; color: #30a001; color: #30a002; color: #30a003; color: #30a004; color: #30a005; color: #30a006; color: #30a007; color: #30a008; color: #30a009; color: #30a00a; color: #30a00b; color: #30a00c; color: #30a00d; color: #30a00e; color: #30a00f; +color: #30a100; color: #30a101; color: #30a102; color: #30a103; color: #30a104; color: #30a105; color: #30a106; color: #30a107; color: #30a108; color: #30a109; color: #30a10a; color: #30a10b; color: #30a10c; color: #30a10d; color: #30a10e; color: #30a10f; +color: #30a200; color: #30a201; color: #30a202; color: #30a203; color: #30a204; color: #30a205; color: #30a206; color: #30a207; color: #30a208; color: #30a209; color: #30a20a; color: #30a20b; color: #30a20c; color: #30a20d; color: #30a20e; color: #30a20f; +color: #30a300; color: #30a301; color: #30a302; color: #30a303; color: #30a304; color: #30a305; color: #30a306; color: #30a307; color: #30a308; color: #30a309; color: #30a30a; color: #30a30b; color: #30a30c; color: #30a30d; color: #30a30e; color: #30a30f; +color: #30a400; color: #30a401; color: #30a402; color: #30a403; color: #30a404; color: #30a405; color: #30a406; color: #30a407; color: #30a408; color: #30a409; color: #30a40a; color: #30a40b; color: #30a40c; color: #30a40d; color: #30a40e; color: #30a40f; +color: #30a500; color: #30a501; color: #30a502; color: #30a503; color: #30a504; color: #30a505; color: #30a506; color: #30a507; color: #30a508; color: #30a509; color: #30a50a; color: #30a50b; color: #30a50c; color: #30a50d; color: #30a50e; color: #30a50f; +color: #30a600; color: #30a601; color: #30a602; color: #30a603; color: #30a604; color: #30a605; color: #30a606; color: #30a607; color: #30a608; color: #30a609; color: #30a60a; color: #30a60b; color: #30a60c; color: #30a60d; color: #30a60e; color: #30a60f; +color: #30a700; color: #30a701; color: #30a702; color: #30a703; color: #30a704; color: #30a705; color: #30a706; color: #30a707; color: #30a708; color: #30a709; color: #30a70a; color: #30a70b; color: #30a70c; color: #30a70d; color: #30a70e; color: #30a70f; +color: #30a800; color: #30a801; color: #30a802; color: #30a803; color: #30a804; color: #30a805; color: #30a806; color: #30a807; color: #30a808; color: #30a809; color: #30a80a; color: #30a80b; color: #30a80c; color: #30a80d; color: #30a80e; color: #30a80f; +color: #30a900; color: #30a901; color: #30a902; color: #30a903; color: #30a904; color: #30a905; color: #30a906; color: #30a907; color: #30a908; color: #30a909; color: #30a90a; color: #30a90b; color: #30a90c; color: #30a90d; color: #30a90e; color: #30a90f; +color: #30aa00; color: #30aa01; color: #30aa02; color: #30aa03; color: #30aa04; color: #30aa05; color: #30aa06; color: #30aa07; color: #30aa08; color: #30aa09; color: #30aa0a; color: #30aa0b; color: #30aa0c; color: #30aa0d; color: #30aa0e; color: #30aa0f; +color: #30ab00; color: #30ab01; color: #30ab02; color: #30ab03; color: #30ab04; color: #30ab05; color: #30ab06; color: #30ab07; color: #30ab08; color: #30ab09; color: #30ab0a; color: #30ab0b; color: #30ab0c; color: #30ab0d; color: #30ab0e; color: #30ab0f; +color: #30ac00; color: #30ac01; color: #30ac02; color: #30ac03; color: #30ac04; color: #30ac05; color: #30ac06; color: #30ac07; color: #30ac08; color: #30ac09; color: #30ac0a; color: #30ac0b; color: #30ac0c; color: #30ac0d; color: #30ac0e; color: #30ac0f; +color: #30ad00; color: #30ad01; color: #30ad02; color: #30ad03; color: #30ad04; color: #30ad05; color: #30ad06; color: #30ad07; color: #30ad08; color: #30ad09; color: #30ad0a; color: #30ad0b; color: #30ad0c; color: #30ad0d; color: #30ad0e; color: #30ad0f; +color: #30ae00; color: #30ae01; color: #30ae02; color: #30ae03; color: #30ae04; color: #30ae05; color: #30ae06; color: #30ae07; color: #30ae08; color: #30ae09; color: #30ae0a; color: #30ae0b; color: #30ae0c; color: #30ae0d; color: #30ae0e; color: #30ae0f; +color: #30af00; color: #30af01; color: #30af02; color: #30af03; color: #30af04; color: #30af05; color: #30af06; color: #30af07; color: #30af08; color: #30af09; color: #30af0a; color: #30af0b; color: #30af0c; color: #30af0d; color: #30af0e; color: #30af0f; +color: #30b000; color: #30b001; color: #30b002; color: #30b003; color: #30b004; color: #30b005; color: #30b006; color: #30b007; color: #30b008; color: #30b009; color: #30b00a; color: #30b00b; color: #30b00c; color: #30b00d; color: #30b00e; color: #30b00f; +color: #30b100; color: #30b101; color: #30b102; color: #30b103; color: #30b104; color: #30b105; color: #30b106; color: #30b107; color: #30b108; color: #30b109; color: #30b10a; color: #30b10b; color: #30b10c; color: #30b10d; color: #30b10e; color: #30b10f; +color: #30b200; color: #30b201; color: #30b202; color: #30b203; color: #30b204; color: #30b205; color: #30b206; color: #30b207; color: #30b208; color: #30b209; color: #30b20a; color: #30b20b; color: #30b20c; color: #30b20d; color: #30b20e; color: #30b20f; +color: #30b300; color: #30b301; color: #30b302; color: #30b303; color: #30b304; color: #30b305; color: #30b306; color: #30b307; color: #30b308; color: #30b309; color: #30b30a; color: #30b30b; color: #30b30c; color: #30b30d; color: #30b30e; color: #30b30f; +color: #30b400; color: #30b401; color: #30b402; color: #30b403; color: #30b404; color: #30b405; color: #30b406; color: #30b407; color: #30b408; color: #30b409; color: #30b40a; color: #30b40b; color: #30b40c; color: #30b40d; color: #30b40e; color: #30b40f; +color: #30b500; color: #30b501; color: #30b502; color: #30b503; color: #30b504; color: #30b505; color: #30b506; color: #30b507; color: #30b508; color: #30b509; color: #30b50a; color: #30b50b; color: #30b50c; color: #30b50d; color: #30b50e; color: #30b50f; +color: #30b600; color: #30b601; color: #30b602; color: #30b603; color: #30b604; color: #30b605; color: #30b606; color: #30b607; color: #30b608; color: #30b609; color: #30b60a; color: #30b60b; color: #30b60c; color: #30b60d; color: #30b60e; color: #30b60f; +color: #30b700; color: #30b701; color: #30b702; color: #30b703; color: #30b704; color: #30b705; color: #30b706; color: #30b707; color: #30b708; color: #30b709; color: #30b70a; color: #30b70b; color: #30b70c; color: #30b70d; color: #30b70e; color: #30b70f; +color: #30b800; color: #30b801; color: #30b802; color: #30b803; color: #30b804; color: #30b805; color: #30b806; color: #30b807; color: #30b808; color: #30b809; color: #30b80a; color: #30b80b; color: #30b80c; color: #30b80d; color: #30b80e; color: #30b80f; +color: #30b900; color: #30b901; color: #30b902; color: #30b903; color: #30b904; color: #30b905; color: #30b906; color: #30b907; color: #30b908; color: #30b909; color: #30b90a; color: #30b90b; color: #30b90c; color: #30b90d; color: #30b90e; color: #30b90f; +color: #30ba00; color: #30ba01; color: #30ba02; color: #30ba03; color: #30ba04; color: #30ba05; color: #30ba06; color: #30ba07; color: #30ba08; color: #30ba09; color: #30ba0a; color: #30ba0b; color: #30ba0c; color: #30ba0d; color: #30ba0e; color: #30ba0f; +color: #30bb00; color: #30bb01; color: #30bb02; color: #30bb03; color: #30bb04; color: #30bb05; color: #30bb06; color: #30bb07; color: #30bb08; color: #30bb09; color: #30bb0a; color: #30bb0b; color: #30bb0c; color: #30bb0d; color: #30bb0e; color: #30bb0f; +color: #30bc00; color: #30bc01; color: #30bc02; color: #30bc03; color: #30bc04; color: #30bc05; color: #30bc06; color: #30bc07; color: #30bc08; color: #30bc09; color: #30bc0a; color: #30bc0b; color: #30bc0c; color: #30bc0d; color: #30bc0e; color: #30bc0f; +color: #30bd00; color: #30bd01; color: #30bd02; color: #30bd03; color: #30bd04; color: #30bd05; color: #30bd06; color: #30bd07; color: #30bd08; color: #30bd09; color: #30bd0a; color: #30bd0b; color: #30bd0c; color: #30bd0d; color: #30bd0e; color: #30bd0f; +color: #30be00; color: #30be01; color: #30be02; color: #30be03; color: #30be04; color: #30be05; color: #30be06; color: #30be07; color: #30be08; color: #30be09; color: #30be0a; color: #30be0b; color: #30be0c; color: #30be0d; color: #30be0e; color: #30be0f; +color: #30bf00; color: #30bf01; color: #30bf02; color: #30bf03; color: #30bf04; color: #30bf05; color: #30bf06; color: #30bf07; color: #30bf08; color: #30bf09; color: #30bf0a; color: #30bf0b; color: #30bf0c; color: #30bf0d; color: #30bf0e; color: #30bf0f; +color: #30c000; color: #30c001; color: #30c002; color: #30c003; color: #30c004; color: #30c005; color: #30c006; color: #30c007; color: #30c008; color: #30c009; color: #30c00a; color: #30c00b; color: #30c00c; color: #30c00d; color: #30c00e; color: #30c00f; +color: #30c100; color: #30c101; color: #30c102; color: #30c103; color: #30c104; color: #30c105; color: #30c106; color: #30c107; color: #30c108; color: #30c109; color: #30c10a; color: #30c10b; color: #30c10c; color: #30c10d; color: #30c10e; color: #30c10f; +color: #30c200; color: #30c201; color: #30c202; color: #30c203; color: #30c204; color: #30c205; color: #30c206; color: #30c207; color: #30c208; color: #30c209; color: #30c20a; color: #30c20b; color: #30c20c; color: #30c20d; color: #30c20e; color: #30c20f; +color: #30c300; color: #30c301; color: #30c302; color: #30c303; color: #30c304; color: #30c305; color: #30c306; color: #30c307; color: #30c308; color: #30c309; color: #30c30a; color: #30c30b; color: #30c30c; color: #30c30d; color: #30c30e; color: #30c30f; +color: #30c400; color: #30c401; color: #30c402; color: #30c403; color: #30c404; color: #30c405; color: #30c406; color: #30c407; color: #30c408; color: #30c409; color: #30c40a; color: #30c40b; color: #30c40c; color: #30c40d; color: #30c40e; color: #30c40f; +color: #30c500; color: #30c501; color: #30c502; color: #30c503; color: #30c504; color: #30c505; color: #30c506; color: #30c507; color: #30c508; color: #30c509; color: #30c50a; color: #30c50b; color: #30c50c; color: #30c50d; color: #30c50e; color: #30c50f; +color: #30c600; color: #30c601; color: #30c602; color: #30c603; color: #30c604; color: #30c605; color: #30c606; color: #30c607; color: #30c608; color: #30c609; color: #30c60a; color: #30c60b; color: #30c60c; color: #30c60d; color: #30c60e; color: #30c60f; +color: #30c700; color: #30c701; color: #30c702; color: #30c703; color: #30c704; color: #30c705; color: #30c706; color: #30c707; color: #30c708; color: #30c709; color: #30c70a; color: #30c70b; color: #30c70c; color: #30c70d; color: #30c70e; color: #30c70f; +color: #30c800; color: #30c801; color: #30c802; color: #30c803; color: #30c804; color: #30c805; color: #30c806; color: #30c807; color: #30c808; color: #30c809; color: #30c80a; color: #30c80b; color: #30c80c; color: #30c80d; color: #30c80e; color: #30c80f; +color: #30c900; color: #30c901; color: #30c902; color: #30c903; color: #30c904; color: #30c905; color: #30c906; color: #30c907; color: #30c908; color: #30c909; color: #30c90a; color: #30c90b; color: #30c90c; color: #30c90d; color: #30c90e; color: #30c90f; +color: #30ca00; color: #30ca01; color: #30ca02; color: #30ca03; color: #30ca04; color: #30ca05; color: #30ca06; color: #30ca07; color: #30ca08; color: #30ca09; color: #30ca0a; color: #30ca0b; color: #30ca0c; color: #30ca0d; color: #30ca0e; color: #30ca0f; +color: #30cb00; color: #30cb01; color: #30cb02; color: #30cb03; color: #30cb04; color: #30cb05; color: #30cb06; color: #30cb07; color: #30cb08; color: #30cb09; color: #30cb0a; color: #30cb0b; color: #30cb0c; color: #30cb0d; color: #30cb0e; color: #30cb0f; +color: #30cc00; color: #30cc01; color: #30cc02; color: #30cc03; color: #30cc04; color: #30cc05; color: #30cc06; color: #30cc07; color: #30cc08; color: #30cc09; color: #30cc0a; color: #30cc0b; color: #30cc0c; color: #30cc0d; color: #30cc0e; color: #30cc0f; +color: #30cd00; color: #30cd01; color: #30cd02; color: #30cd03; color: #30cd04; color: #30cd05; color: #30cd06; color: #30cd07; color: #30cd08; color: #30cd09; color: #30cd0a; color: #30cd0b; color: #30cd0c; color: #30cd0d; color: #30cd0e; color: #30cd0f; +color: #30ce00; color: #30ce01; color: #30ce02; color: #30ce03; color: #30ce04; color: #30ce05; color: #30ce06; color: #30ce07; color: #30ce08; color: #30ce09; color: #30ce0a; color: #30ce0b; color: #30ce0c; color: #30ce0d; color: #30ce0e; color: #30ce0f; +color: #30cf00; color: #30cf01; color: #30cf02; color: #30cf03; color: #30cf04; color: #30cf05; color: #30cf06; color: #30cf07; color: #30cf08; color: #30cf09; color: #30cf0a; color: #30cf0b; color: #30cf0c; color: #30cf0d; color: #30cf0e; color: #30cf0f; +color: #30d000; color: #30d001; color: #30d002; color: #30d003; color: #30d004; color: #30d005; color: #30d006; color: #30d007; color: #30d008; color: #30d009; color: #30d00a; color: #30d00b; color: #30d00c; color: #30d00d; color: #30d00e; color: #30d00f; +color: #30d100; color: #30d101; color: #30d102; color: #30d103; color: #30d104; color: #30d105; color: #30d106; color: #30d107; color: #30d108; color: #30d109; color: #30d10a; color: #30d10b; color: #30d10c; color: #30d10d; color: #30d10e; color: #30d10f; +color: #30d200; color: #30d201; color: #30d202; color: #30d203; color: #30d204; color: #30d205; color: #30d206; color: #30d207; color: #30d208; color: #30d209; color: #30d20a; color: #30d20b; color: #30d20c; color: #30d20d; color: #30d20e; color: #30d20f; +color: #30d300; color: #30d301; color: #30d302; color: #30d303; color: #30d304; color: #30d305; color: #30d306; color: #30d307; color: #30d308; color: #30d309; color: #30d30a; color: #30d30b; color: #30d30c; color: #30d30d; color: #30d30e; color: #30d30f; +color: #30d400; color: #30d401; color: #30d402; color: #30d403; color: #30d404; color: #30d405; color: #30d406; color: #30d407; color: #30d408; color: #30d409; color: #30d40a; color: #30d40b; color: #30d40c; color: #30d40d; color: #30d40e; color: #30d40f; +color: #30d500; color: #30d501; color: #30d502; color: #30d503; color: #30d504; color: #30d505; color: #30d506; color: #30d507; color: #30d508; color: #30d509; color: #30d50a; color: #30d50b; color: #30d50c; color: #30d50d; color: #30d50e; color: #30d50f; +color: #30d600; color: #30d601; color: #30d602; color: #30d603; color: #30d604; color: #30d605; color: #30d606; color: #30d607; color: #30d608; color: #30d609; color: #30d60a; color: #30d60b; color: #30d60c; color: #30d60d; color: #30d60e; color: #30d60f; +color: #30d700; color: #30d701; color: #30d702; color: #30d703; color: #30d704; color: #30d705; color: #30d706; color: #30d707; color: #30d708; color: #30d709; color: #30d70a; color: #30d70b; color: #30d70c; color: #30d70d; color: #30d70e; color: #30d70f; +color: #30d800; color: #30d801; color: #30d802; color: #30d803; color: #30d804; color: #30d805; color: #30d806; color: #30d807; color: #30d808; color: #30d809; color: #30d80a; color: #30d80b; color: #30d80c; color: #30d80d; color: #30d80e; color: #30d80f; +color: #30d900; color: #30d901; color: #30d902; color: #30d903; color: #30d904; color: #30d905; color: #30d906; color: #30d907; color: #30d908; color: #30d909; color: #30d90a; color: #30d90b; color: #30d90c; color: #30d90d; color: #30d90e; color: #30d90f; +color: #30da00; color: #30da01; color: #30da02; color: #30da03; color: #30da04; color: #30da05; color: #30da06; color: #30da07; color: #30da08; color: #30da09; color: #30da0a; color: #30da0b; color: #30da0c; color: #30da0d; color: #30da0e; color: #30da0f; +color: #30db00; color: #30db01; color: #30db02; color: #30db03; color: #30db04; color: #30db05; color: #30db06; color: #30db07; color: #30db08; color: #30db09; color: #30db0a; color: #30db0b; color: #30db0c; color: #30db0d; color: #30db0e; color: #30db0f; +color: #30dc00; color: #30dc01; color: #30dc02; color: #30dc03; color: #30dc04; color: #30dc05; color: #30dc06; color: #30dc07; color: #30dc08; color: #30dc09; color: #30dc0a; color: #30dc0b; color: #30dc0c; color: #30dc0d; color: #30dc0e; color: #30dc0f; +color: #30dd00; color: #30dd01; color: #30dd02; color: #30dd03; color: #30dd04; color: #30dd05; color: #30dd06; color: #30dd07; color: #30dd08; color: #30dd09; color: #30dd0a; color: #30dd0b; color: #30dd0c; color: #30dd0d; color: #30dd0e; color: #30dd0f; +color: #30de00; color: #30de01; color: #30de02; color: #30de03; color: #30de04; color: #30de05; color: #30de06; color: #30de07; color: #30de08; color: #30de09; color: #30de0a; color: #30de0b; color: #30de0c; color: #30de0d; color: #30de0e; color: #30de0f; +color: #30df00; color: #30df01; color: #30df02; color: #30df03; color: #30df04; color: #30df05; color: #30df06; color: #30df07; color: #30df08; color: #30df09; color: #30df0a; color: #30df0b; color: #30df0c; color: #30df0d; color: #30df0e; color: #30df0f; +color: #30e000; color: #30e001; color: #30e002; color: #30e003; color: #30e004; color: #30e005; color: #30e006; color: #30e007; color: #30e008; color: #30e009; color: #30e00a; color: #30e00b; color: #30e00c; color: #30e00d; color: #30e00e; color: #30e00f; +color: #30e100; color: #30e101; color: #30e102; color: #30e103; color: #30e104; color: #30e105; color: #30e106; color: #30e107; color: #30e108; color: #30e109; color: #30e10a; color: #30e10b; color: #30e10c; color: #30e10d; color: #30e10e; color: #30e10f; +color: #30e200; color: #30e201; color: #30e202; color: #30e203; color: #30e204; color: #30e205; color: #30e206; color: #30e207; color: #30e208; color: #30e209; color: #30e20a; color: #30e20b; color: #30e20c; color: #30e20d; color: #30e20e; color: #30e20f; +color: #30e300; color: #30e301; color: #30e302; color: #30e303; color: #30e304; color: #30e305; color: #30e306; color: #30e307; color: #30e308; color: #30e309; color: #30e30a; color: #30e30b; color: #30e30c; color: #30e30d; color: #30e30e; color: #30e30f; +color: #30e400; color: #30e401; color: #30e402; color: #30e403; color: #30e404; color: #30e405; color: #30e406; color: #30e407; color: #30e408; color: #30e409; color: #30e40a; color: #30e40b; color: #30e40c; color: #30e40d; color: #30e40e; color: #30e40f; +color: #30e500; color: #30e501; color: #30e502; color: #30e503; color: #30e504; color: #30e505; color: #30e506; color: #30e507; color: #30e508; color: #30e509; color: #30e50a; color: #30e50b; color: #30e50c; color: #30e50d; color: #30e50e; color: #30e50f; +color: #30e600; color: #30e601; color: #30e602; color: #30e603; color: #30e604; color: #30e605; color: #30e606; color: #30e607; color: #30e608; color: #30e609; color: #30e60a; color: #30e60b; color: #30e60c; color: #30e60d; color: #30e60e; color: #30e60f; +color: #30e700; color: #30e701; color: #30e702; color: #30e703; color: #30e704; color: #30e705; color: #30e706; color: #30e707; color: #30e708; color: #30e709; color: #30e70a; color: #30e70b; color: #30e70c; color: #30e70d; color: #30e70e; color: #30e70f; +color: #30e800; color: #30e801; color: #30e802; color: #30e803; color: #30e804; color: #30e805; color: #30e806; color: #30e807; color: #30e808; color: #30e809; color: #30e80a; color: #30e80b; color: #30e80c; color: #30e80d; color: #30e80e; color: #30e80f; +color: #30e900; color: #30e901; color: #30e902; color: #30e903; color: #30e904; color: #30e905; color: #30e906; color: #30e907; color: #30e908; color: #30e909; color: #30e90a; color: #30e90b; color: #30e90c; color: #30e90d; color: #30e90e; color: #30e90f; +color: #30ea00; color: #30ea01; color: #30ea02; color: #30ea03; color: #30ea04; color: #30ea05; color: #30ea06; color: #30ea07; color: #30ea08; color: #30ea09; color: #30ea0a; color: #30ea0b; color: #30ea0c; color: #30ea0d; color: #30ea0e; color: #30ea0f; +color: #30eb00; color: #30eb01; color: #30eb02; color: #30eb03; color: #30eb04; color: #30eb05; color: #30eb06; color: #30eb07; color: #30eb08; color: #30eb09; color: #30eb0a; color: #30eb0b; color: #30eb0c; color: #30eb0d; color: #30eb0e; color: #30eb0f; +color: #30ec00; color: #30ec01; color: #30ec02; color: #30ec03; color: #30ec04; color: #30ec05; color: #30ec06; color: #30ec07; color: #30ec08; color: #30ec09; color: #30ec0a; color: #30ec0b; color: #30ec0c; color: #30ec0d; color: #30ec0e; color: #30ec0f; +color: #30ed00; color: #30ed01; color: #30ed02; color: #30ed03; color: #30ed04; color: #30ed05; color: #30ed06; color: #30ed07; color: #30ed08; color: #30ed09; color: #30ed0a; color: #30ed0b; color: #30ed0c; color: #30ed0d; color: #30ed0e; color: #30ed0f; +color: #30ee00; color: #30ee01; color: #30ee02; color: #30ee03; color: #30ee04; color: #30ee05; color: #30ee06; color: #30ee07; color: #30ee08; color: #30ee09; color: #30ee0a; color: #30ee0b; color: #30ee0c; color: #30ee0d; color: #30ee0e; color: #30ee0f; +color: #30ef00; color: #30ef01; color: #30ef02; color: #30ef03; color: #30ef04; color: #30ef05; color: #30ef06; color: #30ef07; color: #30ef08; color: #30ef09; color: #30ef0a; color: #30ef0b; color: #30ef0c; color: #30ef0d; color: #30ef0e; color: #30ef0f; +color: #30f000; color: #30f001; color: #30f002; color: #30f003; color: #30f004; color: #30f005; color: #30f006; color: #30f007; color: #30f008; color: #30f009; color: #30f00a; color: #30f00b; color: #30f00c; color: #30f00d; color: #30f00e; color: #30f00f; +color: #30f100; color: #30f101; color: #30f102; color: #30f103; color: #30f104; color: #30f105; color: #30f106; color: #30f107; color: #30f108; color: #30f109; color: #30f10a; color: #30f10b; color: #30f10c; color: #30f10d; color: #30f10e; color: #30f10f; +color: #30f200; color: #30f201; color: #30f202; color: #30f203; color: #30f204; color: #30f205; color: #30f206; color: #30f207; color: #30f208; color: #30f209; color: #30f20a; color: #30f20b; color: #30f20c; color: #30f20d; color: #30f20e; color: #30f20f; +color: #30f300; color: #30f301; color: #30f302; color: #30f303; color: #30f304; color: #30f305; color: #30f306; color: #30f307; color: #30f308; color: #30f309; color: #30f30a; color: #30f30b; color: #30f30c; color: #30f30d; color: #30f30e; color: #30f30f; +color: #30f400; color: #30f401; color: #30f402; color: #30f403; color: #30f404; color: #30f405; color: #30f406; color: #30f407; color: #30f408; color: #30f409; color: #30f40a; color: #30f40b; color: #30f40c; color: #30f40d; color: #30f40e; color: #30f40f; +color: #30f500; color: #30f501; color: #30f502; color: #30f503; color: #30f504; color: #30f505; color: #30f506; color: #30f507; color: #30f508; color: #30f509; color: #30f50a; color: #30f50b; color: #30f50c; color: #30f50d; color: #30f50e; color: #30f50f; +color: #30f600; color: #30f601; color: #30f602; color: #30f603; color: #30f604; color: #30f605; color: #30f606; color: #30f607; color: #30f608; color: #30f609; color: #30f60a; color: #30f60b; color: #30f60c; color: #30f60d; color: #30f60e; color: #30f60f; +color: #30f700; color: #30f701; color: #30f702; color: #30f703; color: #30f704; color: #30f705; color: #30f706; color: #30f707; color: #30f708; color: #30f709; color: #30f70a; color: #30f70b; color: #30f70c; color: #30f70d; color: #30f70e; color: #30f70f; +color: #30f800; color: #30f801; color: #30f802; color: #30f803; color: #30f804; color: #30f805; color: #30f806; color: #30f807; color: #30f808; color: #30f809; color: #30f80a; color: #30f80b; color: #30f80c; color: #30f80d; color: #30f80e; color: #30f80f; +color: #30f900; color: #30f901; color: #30f902; color: #30f903; color: #30f904; color: #30f905; color: #30f906; color: #30f907; color: #30f908; color: #30f909; color: #30f90a; color: #30f90b; color: #30f90c; color: #30f90d; color: #30f90e; color: #30f90f; +color: #30fa00; color: #30fa01; color: #30fa02; color: #30fa03; color: #30fa04; color: #30fa05; color: #30fa06; color: #30fa07; color: #30fa08; color: #30fa09; color: #30fa0a; color: #30fa0b; color: #30fa0c; color: #30fa0d; color: #30fa0e; color: #30fa0f; +color: #30fb00; color: #30fb01; color: #30fb02; color: #30fb03; color: #30fb04; color: #30fb05; color: #30fb06; color: #30fb07; color: #30fb08; color: #30fb09; color: #30fb0a; color: #30fb0b; color: #30fb0c; color: #30fb0d; color: #30fb0e; color: #30fb0f; +color: #30fc00; color: #30fc01; color: #30fc02; color: #30fc03; color: #30fc04; color: #30fc05; color: #30fc06; color: #30fc07; color: #30fc08; color: #30fc09; color: #30fc0a; color: #30fc0b; color: #30fc0c; color: #30fc0d; color: #30fc0e; color: #30fc0f; +color: #30fd00; color: #30fd01; color: #30fd02; color: #30fd03; color: #30fd04; color: #30fd05; color: #30fd06; color: #30fd07; color: #30fd08; color: #30fd09; color: #30fd0a; color: #30fd0b; color: #30fd0c; color: #30fd0d; color: #30fd0e; color: #30fd0f; +color: #30fe00; color: #30fe01; color: #30fe02; color: #30fe03; color: #30fe04; color: #30fe05; color: #30fe06; color: #30fe07; color: #30fe08; color: #30fe09; color: #30fe0a; color: #30fe0b; color: #30fe0c; color: #30fe0d; color: #30fe0e; color: #30fe0f; +color: #30ff00; color: #30ff01; color: #30ff02; color: #30ff03; color: #30ff04; color: #30ff05; color: #30ff06; color: #30ff07; color: #30ff08; color: #30ff09; color: #30ff0a; color: #30ff0b; color: #30ff0c; color: #30ff0d; color: #30ff0e; color: #30ff0f; } diff --git a/vim/.config/vim/plugged/vim-easy-align/.gitattributes b/vim/.config/vim/plugged/vim-easy-align/.gitattributes new file mode 100644 index 0000000..b47a957 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/.gitattributes @@ -0,0 +1,7 @@ +.travis.yml export-ignore +.gitattributes export-ignore +.gitignore export-ignore +doc/tags export-ignore +*.md export-ignore +zip export-ignore +test/* export-ignore diff --git a/vim/.config/vim/plugged/vim-easy-align/.gitignore b/vim/.config/vim/plugged/vim-easy-align/.gitignore new file mode 100644 index 0000000..9c798fd --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/.gitignore @@ -0,0 +1,2 @@ +doc/tags +*.zip diff --git a/vim/.config/vim/plugged/vim-easy-align/.travis.yml b/vim/.config/vim/plugged/vim-easy-align/.travis.yml new file mode 100644 index 0000000..4ae28e5 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/.travis.yml @@ -0,0 +1,15 @@ +language: vim + +before_script: | + git clone https://github.com/junegunn/vader.vim.git + git clone https://github.com/tpope/vim-repeat + +script: | + vim -Nu <(cat << VIMRC + filetype off + set rtp+=vader.vim + set rtp+=vim-repeat + set rtp+=. + filetype plugin indent on + syntax enable + VIMRC) -c 'Vader! test/*' > /dev/null diff --git a/vim/.config/vim/plugged/vim-easy-align/EXAMPLES.md b/vim/.config/vim/plugged/vim-easy-align/EXAMPLES.md new file mode 100644 index 0000000..2fe5fc3 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/EXAMPLES.md @@ -0,0 +1,416 @@ +easy-align examples +=================== + +Open this document in your Vim and try it yourself. + +This document assumes that you have the following mappings in your .vimrc. + +```vim +" Start interactive EasyAlign in visual mode (e.g. vipga) +xmap ga (EasyAlign) + +" Start interactive EasyAlign for a motion/text object (e.g. gaip) +nmap ga (EasyAlign) +``` + +You can use either of the maps. Place the cursor on the paragraph and press + +- `gaip` "(ga) start easy-align on (i)nner (p)aragraph" +- or `vipga` "(v)isual-select (i)nner (p)aragraph and (ga) start easy-align" + +To enable syntax highlighting in the code blocks, define and call the following +function. + +```vim +function! GFM() + let langs = ['ruby', 'yaml', 'vim', 'c'] + + for lang in langs + unlet b:current_syntax + silent! exec printf("syntax include @%s syntax/%s.vim", lang, lang) + exec printf("syntax region %sSnip matchgroup=Snip start='```%s' end='```' contains=@%s", + \ lang, lang, lang) + endfor + let b:current_syntax='mkd' + + syntax sync fromstart +endfunction +``` + +Alignment around whitespaces +---------------------------- + +You can align text around whitespaces with `` delimiter key. + +Start the interactive mode as described above (`gaip` or `vipga`) and try +these commands: + +- `` +- `2` +- `*` +- `-` +- `-2` +- `` +- `*` +- `*` + +### Example + +``` + +Paul McCartney 1942 +George Harrison 1943 +Ringo Starr 1940 +Pete Best 1941 + +``` + +Formatting table +---------------- + +Again, start the interactive mode and try these commands: + +- `*|` +- `**|` +- `*|` +- `**|` +- `*|` + +### Example + +``` + +| Option| Type | Default | Description | +|--|--|--|--| +| threads | Fixnum | 1 | number of threads in the thread pool | +|queues |Fixnum | 1 | number of concurrent queues | +|queue_size | Fixnum | 1000 | size of each queue | +| interval | Numeric | 0 | dispatcher interval for batch processing | +|batch | Boolean | false | enables batch processing mode | + |batch_size | Fixnum | nil | number of maximum items to be assigned at once | + |logger | Logger | nil | logger instance for debug logs | + +``` + + +Alignment around = +------------------ + +The default rule for delimiter key `=` aligns around a whole family of +operators containing `=` character. + +Try these commands in the interactive mode. + +- `=` +- `*=` +- `**=` +- `**=` +- `*=` + +### Example + +```ruby + +a = +a = 1 +bbbb = 2 +ccccccc = 3 +ccccccccccccccc +ddd = 4 +eeee === eee = eee = eee=f +fff = ggg += gg &&= gg +g != hhhhhhhh == 888 +i := 5 +i %= 5 +i *= 5 +j =~ 5 +j >= 5 +aa => 123 +aa <<= 123 +aa >>= 123 +bbb => 123 +c => 1233123 +d => 123 +dddddd &&= 123 +dddddd ||= 123 +dddddd /= 123 +gg <=> ee + +``` + +Formatting YAML (or JSON) +------------------------- + +You can use `:`-rule here to align text around only the first occurrences of +colons. In this case, you don't want to align around all the colons: `*:`. + +```yaml +mysql: + # JDBC driver for MySQL database: + driver: com.mysql.jdbc.Driver + # JDBC URL for the connection (jdbc:mysql://HOSTNAME/DATABASE) + url: jdbc:mysql://localhost/test + database: test + "user:pass":r00t:pa55 +``` + +Formatting multi-line method chaining +------------------------------------- + +Try `.` or `*.` on the following lines. + +```ruby +my_object + .method1().chain() + .second_method().call() + .third().call() + .method_4().execute() +``` + +Notice that the indentation is adjusted to match the shortest one among those of +the lines starting with the delimiter. + +```ruby +my_object + .method1() .chain() + .second_method().call() + .third() .call() + .method_4() .execute() +``` + + +Using blockwise-visual mode or negative N-th parameter +------------------------------------------------------ + +You can try either: +- select text around `=>` in blockwise-visual mode (`CTRL-V`) and `ga=` +- or `gaip-=` + +```ruby +options = { :caching => nil, + :versions => 3, + "cache=blocks" => false }.merge(options) +``` + +Commas +------ + +There is also a predefined rule for commas, try `*,`. + +``` +aaa, bb,c +d,eeeeeee +fffff, gggggggggg, +h, , ii +j,,k +``` + +Ignoring delimiters in comments or strings +------------------------------------------ + +Delimiters highlighted as comments or strings are ignored by default, try +`gaip*=` on the following lines. + +```c + +/* a */ b = c +aa >= bb +// aaa = bbb = cccc +/* aaaa = */ bbbb === cccc " = dddd = " = eeee +aaaaa /* bbbbb */ == ccccc /* != eeeee = */ === fffff + +``` + +This only works when syntax highlighting is enabled. + +Aligning in-line comments +------------------------- + +*Note: Since the current version provides '#'-rule as one of the default rules, +you can ignore this section.* + +```ruby +apple = 1 # comment not aligned +banana = 'Gros Michel' # comment 2 +``` + +So, how do we align the trailing comments in the above lines? Simply try +`-`. The spaces in the comments are ignored, so the trailing comment in +each line is considered to be a single chunk. + +But that doesn't work in the following case. + +```ruby +apple = 1 # comment not aligned +apricot = 'DAD' + 'F#AD' +banana = 'Gros Michel' # comment 2 +``` + +That is because the second line doesn't have trailing comment, and +the last (`-`) space for that line is the one just before `'F#AD'`. + +So, let's define a custom mapping for `#`. + +```vim +if !exists('g:easy_align_delimiters') + let g:easy_align_delimiters = {} +endif +let g:easy_align_delimiters['#'] = { 'pattern': '#', 'ignore_groups': ['String'] } +``` + +Notice that the rule overrides `ignore_groups` attribute in order *not to ignore* +delimiters highlighted as comments. + +Then on `#`, we get + +```ruby +apple = 1 # comment not aligned +apricot = 'DAD' + 'F#AD' +banana = 'string' # comment 2 +``` + +If you don't want to define the rule, you can do the same with the following +command: + +```vim +" Using regular expression /#/ +" - "ig" is a shorthand notation of "ignore_groups" +:EasyAlign/#/{'ig':['String']} + +" Or more concisely with the shorthand notation; +:EasyAlign/#/ig['String'] +``` + +In this case, the second line is ignored as it doesn't contain a `#` (The one +in `'F#AD'` is ignored as it's highlighted as String). If you don't want the +second line to be ignored, there are three options: + +1. Set global `g:easy_align_ignore_unmatched` flag to 0 +2. Use `:EasyAlign` command with `ignore_unmatched` option +3. Update the alignment rule with `ignore_unmatched` option + +```vim +" 1. Set global g:easy_align_ignore_unmatched to zero +let g:easy_align_ignore_unmatched = 0 + +" 2. Using :EasyAlign command with ignore_unmatched option +" 2-1. Using predefined rule with delimiter key # +" - "iu" is expanded to "*i*gnore_*u*nmatched" +:EasyAlign#{'iu':0} +" or +:EasyAlign#iu0 + +" 2-2. Using regular expression /#/ +:EasyAlign/#/ig['String']iu0 + +" 3. Update the alignment rule with ignore_unmatched option +let g:easy_align_delimiters['#'] = { + \ 'pattern': '#', 'ignore_groups': ['String'], 'ignore_unmatched': 0 } +``` + +Then we get, + +```ruby +apple = 1 # comment not aligned +apricot = 'DAD' + 'F#AD' +banana = 'string' # comment 2 +``` + +Aligning C-style variable definition +------------------------------------ + +Take the following example: + +```c +const char* str = "Hello"; +int64_t count = 1 + 2; +static double pi = 3.14; +``` + +We can align these lines with the predefined `=` rule. Select the lines and +press `ga=` + +```c +const char* str = "Hello"; +int64_t count = 1 + 2; +static double pi = 3.14; +``` + +Not bad. However, the names of the variables, `str`, `count`, and `pi` are not +aligned with each other. Can we do better? We can clearly see that simple +``-rule won't properly align those names. +So let's define an alignment rule than can handle this case. + +```vim +let g:easy_align_delimiters['d'] = { +\ 'pattern': '\(const\|static\)\@* scores = pointer; +``` + +We see that our rule above doesn't work anymore. + +```c +const char* str = "Hello"; +int64_t count = 1 + 2; +static double pi = 3.14; +static std::map* scores = pointer; +``` + +So what do we do? Let's try to improve our alignment rule. + +```vim +let g:easy_align_delimiters['d'] = { +\ 'pattern': ' \ze\S\+\s*[;=]', +\ 'left_margin': 0, 'right_margin': 0 +\ } +``` + +Now the new rule has changed to align text around spaces that are followed +by some non-whitespace characters and then an equals sign or a semi-colon. +Try `vipgad` + +```c +const char* str = "Hello"; +int64_t count = 1 + 2; +static double pi = 3.14; +static std::map* scores = pointer; +``` + +We're right on track, now press `gvga=` and voila! + +```c +const char* str = "Hello"; +int64_t count = 1 + 2; +static double pi = 3.14; +static std::map* scores = pointer; +``` + diff --git a/vim/.config/vim/plugged/vim-easy-align/README.md b/vim/.config/vim/plugged/vim-easy-align/README.md new file mode 100644 index 0000000..0aef9ef --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/README.md @@ -0,0 +1,763 @@ +vim-easy-align ![travis-ci](https://travis-ci.org/junegunn/vim-easy-align.svg?branch=master) +============== + +A simple, easy-to-use Vim alignment plugin. + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/equals.gif) + +Installation +------------ + +Use your favorite plugin manager. + +Using [vim-plug](https://github.com/junegunn/vim-plug): + +```vim +Plug 'junegunn/vim-easy-align' +``` + +Quick start guide +----------------- + +Add the following mappings to your .vimrc. + +```vim +" Start interactive EasyAlign in visual mode (e.g. vipga) +xmap ga (EasyAlign) + +" Start interactive EasyAlign for a motion/text object (e.g. gaip) +nmap ga (EasyAlign) +``` + +Then with the following lines of text, + +``` +apple =red +grass+=green +sky-= blue +``` + +try these commands: + +- `vipga=` + - `v`isual-select `i`nner `p`aragraph + - Start EasyAlign command (`ga`) + - Align around `=` +- `gaip=` + - Start EasyAlign command (`ga`) for `i`nner `p`aragraph + - Align around `=` + +Demo +---- + +*Click on each image to see from the beginning.* + +### Using predefined alignment rules + +An *alignment rule* is a predefined set of options for common alignment tasks, +which is identified by a single character, such as ``, `=`, `:`, `.`, +`|`, `&`, `#`, and `,`. + +#### `=` + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/equals.gif) + +- `=` Around the 1st occurrences +- `2=` Around the 2nd occurrences +- `*=` Around all occurrences +- `**=` Left/Right alternating alignment around all occurrences +- `` Switching between left/right/center alignment modes + +#### `` + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/spaces.gif) + +- `` Around the 1st occurrences of whitespaces +- `2` Around the 2nd occurrences +- `-` Around the last occurrences +- `2` Center-alignment around the 2nd occurrences + +#### `,` + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/commas.gif) + +- The predefined comma-rule places a comma right next to the preceding token + without margin (`{'stick_to_left': 1, 'left_margin': 0}`) +- You can change it with `` arrow + +### Using regular expression + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/regex.gif) + +You can use an arbitrary regular expression by +- pressing `` in interactive mode +- or using `:EasyAlign /REGEX/` command in visual mode or in normal mode with + a range (e.g. `:%`) + +### Different ways to start + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/modes.gif) + +This demo shows how you can start interactive mode with visual selection or use +non-interactive `:EasyAlign` command. + +### Aligning table cells + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/tables.gif) + +Check out various alignment options and "live interactive mode". + +### Syntax-aware alignment + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/yaml.gif) + +Delimiters in strings and comments are ignored by default. + +### Using blockwise-visual mode + +![](https://raw.githubusercontent.com/junegunn/i/master/easy-align/blockwise-visual.gif) + +You can limit the scope with blockwise-visual mode. + +Usage +----- + +### Flow of execution + + + +There are two ways to use easy-align. + +#### 1. `` mappings (interactive mode) + +The recommended method is to use `(EasyAlign)` mapping in normal and +visual mode. They are usually mapped to `ga`, but you can choose any key +sequences. + +```vim +nmap ga (EasyAlign) +xmap ga (EasyAlign) +``` + +1. `ga` key in visual mode, or `ga` followed by a motion or a text + object to start interactive mode +1. (Optional) Enter keys to cycle between alignment mode (left, right, or center) +1. (Optional) N-th delimiter (default: 1) + - `1` Around the 1st occurrences of delimiters + - `2` Around the 2nd occurrences of delimiters + - ... + - `*` Around all occurrences of delimiters + - `**` Left-right alternating alignment around all delimiters + - `-` Around the last occurrences of delimiters (`-1`) + - `-2` Around the second to last occurrences of delimiters + - ... +1. Delimiter key (a single keystroke; ``, `=`, `:`, `.`, `|`, `&`, `#`, `,`) or an arbitrary regular expression followed by `` + +#### 2. Using `:EasyAlign` command + +If you prefer command-line, use `:EasyAlign` command instead. + +```vim +" Using predefined rules +:EasyAlign[!] [N-th] DELIMITER_KEY [OPTIONS] + +" Using regular expression +:EasyAlign[!] [N-th] /REGEXP/ [OPTIONS] +``` + +### Regular expression vs. predefined rules + +You can use regular expressions but it's usually much easier to use predefined +alignment rules that you can trigger with a single keystroke. + +| Key | Description/Use cases | +| --------- | -------------------------------------------------------------------- | +| `` | General alignment around whitespaces | +| `=` | Operators containing equals sign (`=`, `==,` `!=`, `+=`, `&&=`, ...) | +| `:` | Suitable for formatting JSON or YAML | +| `.` | Multi-line method chaining | +| `,` | Multi-line method arguments | +| `&` | LaTeX tables (matches `&` and `\\`) | +| `#` | Ruby/Python comments | +| `"` | Vim comments | +| `` | Table markdown | + +You can also define your own rules with `g:easy_align_delimiters` which will +be described in [the later section](#extending-alignment-rules). + +---- + +### Interactive mode + +Interactive mode is started either with `(EasyAlign)` mapping or with +`:EasyAlign` command with no argument. + +#### Examples using predefined rules + +| Keystrokes | Description | Equivalent command | +| ------------ | ---------------------------------- | --------------------- | +| `` | Around 1st whitespaces | `:'<,'>EasyAlign\ ` | +| `2` | Around 2nd whitespaces | `:'<,'>EasyAlign2\ ` | +| `-` | Around the last whitespaces | `:'<,'>EasyAlign-\ ` | +| `-2` | Around the 2nd to last whitespaces | `:'<,'>EasyAlign-2\ ` | +| `:` | Around 1st colon (`key: value`) | `:'<,'>EasyAlign:` | +| `:` | Around 1st colon (`key : value`) | `:'<,'>EasyAlign:>l1` | +| `=` | Around 1st operators with = | `:'<,'>EasyAlign=` | +| `3=` | Around 3rd operators with = | `:'<,'>EasyAlign3=` | +| `*=` | Around all operators with = | `:'<,'>EasyAlign*=` | +| `**=` | Left-right alternating around = | `:'<,'>EasyAlign**=` | +| `=` | Right alignment around 1st = | `:'<,'>EasyAlign!=` | +| `**=` | Right-left alternating around = | `:'<,'>EasyAlign!**=` | + +Instead of finishing the alignment with a delimiter key, you can type in +a regular expression if you press `` or ``. + +#### Alignment options in interactive mode + +While in interactive mode, you can set alignment options using special shortcut +keys listed below. The meaning of each option will be described in +[the following sections](#alignment-options). + +| Key | Option | Values | +| --------- | ------------------ | -------------------------------------------------- | +| `CTRL-F` | `filter` | Input string (`[gv]/.*/?`) | +| `CTRL-I` | `indentation` | shallow, deep, none, keep | +| `CTRL-L` | `left_margin` | Input number or string | +| `CTRL-R` | `right_margin` | Input number or string | +| `CTRL-D` | `delimiter_align` | left, center, right | +| `CTRL-U` | `ignore_unmatched` | 0, 1 | +| `CTRL-G` | `ignore_groups` | `[]`, `['String']`, `['Comment']`, `['String', 'Comment']` | +| `CTRL-A` | `align` | Input string (`/[lrc]+\*{0,2}/`) | +| `` | `stick_to_left` | `{ 'stick_to_left': 1, 'left_margin': 0 }` | +| `` | `stick_to_left` | `{ 'stick_to_left': 0, 'left_margin': 1 }` | +| `` | `*_margin` | `{ 'left_margin': 0, 'right_margin': 0 }` | + +#### Live interactive mode + +If you're performing a complex alignment where multiple options should be +carefully adjusted, try "live interactive mode" where you can preview the result +of the alignment on-the-fly as you type in. + +Live interactive mode can be started with either `(LiveEasyAlign)` map +or `:LiveEasyAlign` command. Or you can switch to live interactive mode while +in ordinary interactive mode by pressing ``. (P for Preview) + +In live interactive mode, you have to type in the same delimiter (or +`` on regular expression) again to finalize the alignment. This allows +you to preview the result of the alignment and freely change the delimiter +using backspace key without leaving the interactive mode. + +### :EasyAlign command + +Instead of starting interactive mode, you can use non-interactive `:EasyAlign` +command. + +```vim +" Using predefined alignment rules +" :EasyAlign[!] [N-th] DELIMITER_KEY [OPTIONS] +:EasyAlign : +:EasyAlign = +:EasyAlign *= +:EasyAlign 3\ + +" Using arbitrary regular expressions +" :EasyAlign[!] [N-th] /REGEXP/ [OPTIONS] +:EasyAlign /[:;]\+/ +:EasyAlign 2/[:;]\+/ +:EasyAlign */[:;]\+/ +:EasyAlign **/[:;]\+/ +``` + +A command can end with alignment options, [each of which will be discussed in +detail later](#alignment-options), in Vim dictionary format. + +- `:EasyAlign * /[:;]\+/ { 'stick_to_left': 1, 'left_margin': 0 }` + +`stick_to_left` of 1 means that the matched delimiter should be positioned right +next to the preceding token, and `left_margin` of 0 removes the margin on the +left. So we get: + + apple;: banana:: cake + data;; exchange:; format + +You don't have to write complete names as long as they're distinguishable. + +- `:EasyAlign * /[:;]\+/ { 'stl': 1, 'l': 0 }` + +You can even omit spaces between the arguments. + +- `:EasyAlign*/[:;]\+/{'s':1,'l':0}` + +Nice. But let's make it even shorter. Option values can be written in shorthand +notation. + +- `:EasyAlign*/[:;]\+/` | +| `ignore_unmatched` | `iu[01]` | +| `ignore_groups` | `ig\[.*\]` | +| `align` | `a[lrc*]*` | +| `delimiter_align` | `d[lrc]` | +| `indentation` | `i[ksdn]` | + +### Partial alignment in blockwise-visual mode + +In blockwise-visual mode (`CTRL-V`), EasyAlign command aligns only the selected +text in the block, instead of the whole lines in the range. + +Consider the following case where you want to align text around `=>` operators. + +```ruby +my_hash = { :a => 1, + :aa => 2, + :aaa => 3 } +``` + +In non-blockwise visual mode (`v` / `V`), `=` won't work since the +assignment operator in the first line gets in the way. So we instead enter +blockwise-visual mode (`CTRL-V`), and select the text *around* +`=>` operators, then press `=`. + +```ruby +my_hash = { :a => 1, + :aa => 2, + :aaa => 3 } +``` + +However, in this case, we don't really need blockwise visual mode +since the same can be easily done using the negative N-th parameter: `-=` + + +Alignment options +----------------- + +### List of options + +| Option | Type | Default | Description | +| ------------------ | ------- | --------------------- | ------------------------------------------------------- | +| `filter` | string | | Line filtering expression: `g/../` or `v/../` | +| `left_margin` | number | 1 | Number of spaces to attach before delimiter | +| `left_margin` | string | `' '` | String to attach before delimiter | +| `right_margin` | number | 1 | Number of spaces to attach after delimiter | +| `right_margin` | string | `' '` | String to attach after delimiter | +| `stick_to_left` | boolean | 0 | Whether to position delimiter on the left-side | +| `ignore_groups` | list | ['String', 'Comment'] | Delimiters in these syntax highlight groups are ignored | +| `ignore_unmatched` | boolean | 1 | Whether to ignore lines without matching delimiter | +| `indentation` | string | `k` | Indentation method (*k*eep, *d*eep, *s*hallow, *n*one) | +| `delimiter_align` | string | `r` | Determines how to align delimiters of different lengths | +| `align` | string | `l` | Alignment modes for multiple occurrences of delimiters | + +There are 4 ways to set alignment options (from lowest precedence to highest): + +1. Some option values can be set with corresponding global variables +2. Option values can be specified in the definition of each alignment rule +3. Option values can be given as arguments to `:EasyAlign` command +4. Option values can be set in interactive mode using special shortcut keys + +| Option name | Shortcut key | Abbreviated | Global variable | +| ------------------ | ------------------- | -------------- | ------------------------------- | +| `filter` | `CTRL-F` | `[gv]/.*/` | | +| `left_margin` | `CTRL-L` | `l[0-9]+` | | +| `right_margin` | `CTRL-R` | `r[0-9]+` | | +| `stick_to_left` | ``, `` | `<` or `>` | | +| `ignore_groups` | `CTRL-G` | `ig\[.*\]` | `g:easy_align_ignore_groups` | +| `ignore_unmatched` | `CTRL-U` | `iu[01]` | `g:easy_align_ignore_unmatched` | +| `indentation` | `CTRL-I` | `i[ksdn]` | `g:easy_align_indentation` | +| `delimiter_align` | `CTRL-D` | `d[lrc]` | `g:easy_align_delimiter_align` | +| `align` | `CTRL-A` | `a[lrc*]*` | | + +### Filtering lines + +With `filter` option, you can align lines that only match or do not match a +given pattern. There are several ways to set the pattern. + +1. Press `CTRL-F` in interactive mode and type in `g/pat/` or `v/pat/` +2. In command-line, it can be written in dictionary format: `{'filter': 'g/pat/'}` +3. Or in shorthand notation: `g/pat/` or `v/pat/` + +(You don't need to escape '/'s in the regular expression) + +#### Examples + +```vim +" Start interactive mode with filter option set to g/hello/ +EasyAlign g/hello/ + +" Start live interactive mode with filter option set to v/goodbye/ +LiveEasyAlign v/goodbye/ + +" Align the lines with 'hi' around the first colons +EasyAlign:g/hi/ +``` + +### Ignoring delimiters in comments or strings + +EasyAlign can be configured to ignore delimiters in certain syntax highlight +groups, such as code comments or strings. By default, delimiters that are +highlighted as code comments or strings are ignored. + +```vim +" Default: +" If a delimiter is in a highlight group whose name matches +" any of the followings, it will be ignored. +let g:easy_align_ignore_groups = ['Comment', 'String'] +``` + +For example, the following paragraph + +```ruby +{ + # Quantity of apples: 1 + apple: 1, + # Quantity of bananas: 2 + bananas: 2, + # Quantity of grape:fruits: 3 + 'grape:fruits': 3 +} +``` + +becomes as follows on `:` (or `:EasyAlign:`) + +```ruby +{ + # Quantity of apples: 1 + apple: 1, + # Quantity of bananas: 2 + bananas: 2, + # Quantity of grape:fruits: 3 + 'grape:fruits': 3 +} +``` + +Naturally, this feature only works when syntax highlighting is enabled. + +You can change the default rule by using one of these 4 methods. + +1. Press `CTRL-G` in interactive mode to switch groups +2. Define global `g:easy_align_ignore_groups` list +3. Define a custom rule in `g:easy_align_delimiters` with `ignore_groups` option +4. Provide `ignore_groups` option to `:EasyAlign` command. + e.g. `:EasyAlign:ig[]` + +For example if you set `ignore_groups` option to be an empty list, you get + +```ruby +{ + # Quantity of apples: 1 + apple: 1, + # Quantity of bananas: 2 + bananas: 2, + # Quantity of grape: fruits: 3 + 'grape: fruits': 3 +} +``` + +If a pattern in `ignore_groups` is prepended by a `!`, it will have the opposite +meaning. For instance, if `ignore_groups` is given as `['!Comment']`, delimiters +that are *not* highlighted as Comment will be ignored during the alignment. + +### Ignoring unmatched lines + +`ignore_unmatched` option determines how EasyAlign command processes lines that +do not have N-th delimiter. + +1. In left-alignment mode, they are ignored +2. In right or center-alignment mode, they are *not* ignored, and the last + tokens from those lines are aligned as well as if there is an invisible + trailing delimiter at the end of each line +3. If `ignore_unmatched` is 1, they are ignored regardless of the alignment mode +4. If `ignore_unmatched` is 0, they are *not* ignored regardless of the mode + +Let's take an example. +When we align the following code block around the (1st) colons, + +```ruby +{ + apple: proc { + this_line_does_not_have_a_colon + }, + bananas: 2, + grapefruits: 3 +} +``` + +this is usually what we want. + +```ruby +{ + apple: proc { + this_line_does_not_have_a_colon + }, + bananas: 2, + grapefruits: 3 +} +``` + +However, we can override this default behavior by setting `ignore_unmatched` +option to zero using one of the following methods. + +1. Press `CTRL-U` in interactive mode to toggle `ignore_unmatched` option +2. Set the global `g:easy_align_ignore_unmatched` variable to 0 +3. Define a custom alignment rule with `ignore_unmatched` option set to 0 +4. Provide `ignore_unmatched` option to `:EasyAlign` command. e.g. `:EasyAlign:iu0` + +Then we get, + +```ruby +{ + apple: proc { + this_line_does_not_have_a_colon + }, + bananas: 2, + grapefruits: 3 +} +``` + +### Aligning delimiters of different lengths + +Global `g:easy_align_delimiter_align` option and rule-wise/command-wise +`delimiter_align` option determines how matched delimiters of different lengths +are aligned. + +```ruby +apple = 1 +banana += apple +cake ||= banana +``` + +By default, delimiters are right-aligned as follows. + +```ruby +apple = 1 +banana += apple +cake ||= banana +``` + +However, with `:EasyAlign=dl`, delimiters are left-aligned. + +```ruby +apple = 1 +banana += apple +cake ||= banana +``` + +And on `:EasyAlign=dc`, center-aligned. + +```ruby +apple = 1 +banana += apple +cake ||= banana +``` + +In interactive mode, you can change the option value with `CTRL-D` key. + +### Adjusting indentation + +By default :EasyAlign command keeps the original indentation of the lines. But +then again we have `indentation` option. See the following example. + +```ruby +# Lines with different indentation + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +# Default: _k_eep the original indentation +# :EasyAlign= + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +# Use the _s_hallowest indentation among the lines +# :EasyAlign=is + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +# Use the _d_eepest indentation among the lines +# :EasyAlign=id + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +# Indentation: _n_one +# :EasyAlign=in +apple = 1 +banana = 2 +cake = 3 +daisy = 4 +eggplant = 5 +``` + +In interactive mode, you can change the option value with `CTRL-I` key. + +### Alignments over multiple occurrences of delimiters + +As stated above, "N-th" parameter is used to target specific occurrences of +the delimiter when it appears multiple times in each line. + +To recap: + +```vim +" Left-alignment around the FIRST occurrences of delimiters +:EasyAlign = + +" Left-alignment around the SECOND occurrences of delimiters +:EasyAlign 2= + +" Left-alignment around the LAST occurrences of delimiters +:EasyAlign -= + +" Left-alignment around ALL occurrences of delimiters +:EasyAlign *= + +" Left-right ALTERNATING alignment around all occurrences of delimiters +:EasyAlign **= + +" Right-left ALTERNATING alignment around all occurrences of delimiters +:EasyAlign! **= +``` + +In addition to these, you can fine-tune alignments over multiple occurrences +of the delimiters with 'align' option. (The option can also be set in +interactive mode with the special key `CTRL-A`) + +```vim +" Left alignment over the first two occurrences of delimiters +:EasyAlign = { 'align': 'll' } + +" Right, left, center alignment over the 1st to 3rd occurrences of delimiters +:EasyAlign = { 'a': 'rlc' } + +" Using shorthand notation +:EasyAlign = arlc + +" Right, left, center alignment over the 2nd to 4th occurrences of delimiters +:EasyAlign 2=arlc + +" (*) Repeating alignments (default: l, r, or c) +" Right, left, center, center, center, center, ... +:EasyAlign *=arlc + +" (**) Alternating alignments (default: lr or rl) +" Right, left, center, right, left, center, ... +:EasyAlign **=arlc + +" Right, left, center, center, center, ... repeating alignment +" over the 3rd to the last occurrences of delimiters +:EasyAlign 3=arlc* + +" Right, left, center, right, left, center, ... alternating alignment +" over the 3rd to the last occurrences of delimiters +:EasyAlign 3=arlc** +``` + +### Extending alignment rules + +Although the default rules should cover the most of the use cases, +you can extend the rules by setting a dictionary named `g:easy_align_delimiters`. + +You may refer to the definitions of the default alignment rules +[here](https://github.com/junegunn/vim-easy-align/blob/2.9.6/autoload/easy_align.vim#L32-L46). + +#### Examples + +```vim +let g:easy_align_delimiters = { +\ '>': { 'pattern': '>>\|=>\|>' }, +\ '/': { +\ 'pattern': '//\+\|/\*\|\*/', +\ 'delimiter_align': 'l', +\ 'ignore_groups': ['!Comment'] }, +\ ']': { +\ 'pattern': '[[\]]', +\ 'left_margin': 0, +\ 'right_margin': 0, +\ 'stick_to_left': 0 +\ }, +\ ')': { +\ 'pattern': '[()]', +\ 'left_margin': 0, +\ 'right_margin': 0, +\ 'stick_to_left': 0 +\ }, +\ 'd': { +\ 'pattern': ' \(\S\+\s*[;=]\)\@=', +\ 'left_margin': 0, +\ 'right_margin': 0 +\ } +\ } +``` + +Other options +------------- + +### Disabling &foldmethod during alignment + +[It is reported](https://github.com/junegunn/vim-easy-align/issues/14) that +`&foldmethod` value of `expr` or `syntax` can significantly slow down the +alignment when editing a large, complex file with many folds. To alleviate this +issue, EasyAlign provides an option to temporarily set `&foldmethod` to `manual` +during the alignment task. In order to enable this feature, set +`g:easy_align_bypass_fold` switch to 1. + +```vim +let g:easy_align_bypass_fold = 1 +``` + +### Left/right/center mode switch in interactive mode + +In interactive mode, you can choose the alignment mode you want by pressing +enter keys. The non-bang command, `:EasyAlign` starts in left-alignment mode +and changes to right and center mode as you press enter keys, while the bang +version first starts in right-alignment mode. + +- `:EasyAlign` + - Left, Right, Center +- `:EasyAlign!` + - Right, Left, Center + +If you do not prefer this default mode transition, you can define your own +settings as follows. + +```vim +let g:easy_align_interactive_modes = ['l', 'r'] +let g:easy_align_bang_interactive_modes = ['c', 'r'] +``` + +Advanced examples and use cases +------------------------------- + +See [EXAMPLES.md](https://github.com/junegunn/vim-easy-align/blob/master/EXAMPLES.md) +for more examples. + +Related work +------------ + +- [DrChip's Alignment Tool for Vim](http://www.drchip.org/astronaut/vim/align.html) +- [Tabular](https://github.com/godlygeek/tabular) + +Author +------ + +[Junegunn Choi](https://github.com/junegunn) + +License +------- + +MIT diff --git a/vim/.config/vim/plugged/vim-easy-align/autoload/easy_align.vim b/vim/.config/vim/plugged/vim-easy-align/autoload/easy_align.vim new file mode 100644 index 0000000..0fbf063 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/autoload/easy_align.vim @@ -0,0 +1,1148 @@ +" Copyright (c) 2014 Junegunn Choi +" +" MIT License +" +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be +" included in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +if exists("g:loaded_easy_align") + finish +endif +let g:loaded_easy_align = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let s:easy_align_delimiters_default = { +\ ' ': { 'pattern': ' ', 'left_margin': 0, 'right_margin': 0, 'stick_to_left': 0 }, +\ '=': { 'pattern': '===\|<=>\|\(&&\|||\|<<\|>>\)=\|=\~[#?]\?\|=>\|[:+/*!%^=><&|.?-]\?=[#?]\?', +\ 'left_margin': 1, 'right_margin': 1, 'stick_to_left': 0 }, +\ ':': { 'pattern': ':', 'left_margin': 0, 'right_margin': 1, 'stick_to_left': 1 }, +\ ',': { 'pattern': ',', 'left_margin': 0, 'right_margin': 1, 'stick_to_left': 1 }, +\ '|': { 'pattern': '|', 'left_margin': 1, 'right_margin': 1, 'stick_to_left': 0 }, +\ '.': { 'pattern': '\.', 'left_margin': 0, 'right_margin': 0, 'stick_to_left': 0 }, +\ '#': { 'pattern': '#\+', 'delimiter_align': 'l', 'ignore_groups': ['!Comment'] }, +\ '"': { 'pattern': '"\+', 'delimiter_align': 'l', 'ignore_groups': ['!Comment'] }, +\ '&': { 'pattern': '\\\@ winlen ? '..' : '' + + echon "\r" + let yet = 0 + for [hl, msg] in a:tokens + if empty(msg) | continue | endif + execute "echohl ". hl + let yet += len(msg) + if yet > winlen - len(ellipsis) + echon msg[ 0 : (winlen - len(ellipsis) - yet - 1) ] . ellipsis + break + else + echon msg + endif + endfor + finally + echohl None + let [&ruler, &showcmd] = xy + endtry +endfunction + +function! s:echon(l, n, r, d, o, warn) + let tokens = [ + \ ['Function', s:live ? ':LiveEasyAlign' : ':EasyAlign'], + \ ['ModeMsg', get(s:mode_labels, a:l, a:l)], + \ ['None', ' ']] + + if a:r == -1 | call add(tokens, ['Comment', '(']) | endif + call add(tokens, [a:n =~ '*' ? 'Repeat' : 'Number', a:n]) + call extend(tokens, a:r == 1 ? + \ [['Delimiter', '/'], ['String', a:d], ['Delimiter', '/']] : + \ [['Identifier', a:d == ' ' ? '\ ' : (a:d == '\' ? '\\' : a:d)]]) + if a:r == -1 | call extend(tokens, [['Normal', '_'], ['Comment', ')']]) | endif + call add(tokens, ['Statement', empty(a:o) ? '' : ' '.string(a:o)]) + if !empty(a:warn) + call add(tokens, ['WarningMsg', ' ('.a:warn.')']) + endif + + call s:echon_(tokens) + return join(map(tokens, 'v:val[1]'), '') +endfunction + +function! s:exit(msg) + call s:echon_([['ErrorMsg', a:msg]]) + throw 'exit' +endfunction + +function! s:ltrim(str) + return substitute(a:str, '^\s\+', '', '') +endfunction + +function! s:rtrim(str) + return substitute(a:str, '\s\+$', '', '') +endfunction + +function! s:trim(str) + return substitute(a:str, '^\s*\(.\{-}\)\s*$', '\1', '') +endfunction + +function! s:fuzzy_lu(key) + if has_key(s:known_options, a:key) + return a:key + endif + let key = tolower(a:key) + + " stl -> ^s.*_t.*_l.* + let regexp1 = '^' .key[0]. '.*' .substitute(key[1 : -1], '\(.\)', '_\1.*', 'g') + let matches = filter(keys(s:known_options), 'v:val =~ regexp1') + if len(matches) == 1 + return matches[0] + endif + + " stl -> ^s.*t.*l.* + let regexp2 = '^' . substitute(substitute(key, '-', '_', 'g'), '\(.\)', '\1.*', 'g') + let matches = filter(keys(s:known_options), 'v:val =~ regexp2') + + if empty(matches) + call s:exit("Unknown option key: ". a:key) + elseif len(matches) == 1 + return matches[0] + else + " Avoid ambiguity introduced by deprecated margin_left and margin_right + if sort(matches) == ['margin_left', 'margin_right', 'mode_sequence'] + return 'mode_sequence' + endif + if sort(matches) == ['ignore_groups', 'ignores'] + return 'ignore_groups' + endif + call s:exit("Ambiguous option key: ". a:key ." (" .join(matches, ', '). ")") + endif +endfunction + +function! s:shift(modes, cycle) + let item = remove(a:modes, 0) + if a:cycle || empty(a:modes) + call add(a:modes, item) + endif + return item +endfunction + +function! s:normalize_options(opts) + let ret = {} + for k in keys(a:opts) + let v = a:opts[k] + let k = s:fuzzy_lu(k) + " Backward-compatibility + if k == 'margin_left' | let k = 'left_margin' | endif + if k == 'margin_right' | let k = 'right_margin' | endif + if k == 'mode_sequence' | let k = 'align' | endif + let ret[k] = v + unlet v + endfor + return s:validate_options(ret) +endfunction + +function! s:compact_options(opts) + let ret = {} + for k in keys(a:opts) + let ret[s:shorthand[k]] = a:opts[k] + endfor + return ret +endfunction + +function! s:validate_options(opts) + for k in keys(a:opts) + let v = a:opts[k] + if index(s:known_options[k], type(v)) == -1 + call s:exit("Invalid type for option: ". k) + endif + unlet v + endfor + return a:opts +endfunction + +function! s:split_line(line, nth, modes, cycle, fc, lc, pattern, stick_to_left, ignore_unmatched, ignore_groups) + let mode = '' + + let string = a:lc ? + \ strpart(getline(a:line), a:fc - 1, a:lc - a:fc + 1) : + \ strpart(getline(a:line), a:fc - 1) + let idx = 0 + let nomagic = match(a:pattern, '\\v') > match(a:pattern, '\C\\[mMV]') + let pattern = '^.\{-}\s*\zs\('.a:pattern.(nomagic ? ')' : '\)') + let tokens = [] + let delims = [] + + " Phase 1: split + let ignorable = 0 + let token = '' + let phantom = 0 + while 1 + let matchidx = match(string, pattern, idx) + " No match + if matchidx < 0 | break | endif + let matchend = matchend(string, pattern, idx) + let spaces = matchstr(string, '\s'.(a:stick_to_left ? '*' : '\{-}'), matchend + (matchidx == matchend)) + + " Match, but empty + if len(spaces) + matchend - idx == 0 + let char = strpart(string, idx, 1) + if empty(char) | break | endif + let [match, part, delim] = [char, char, ''] + " Match + else + let match = strpart(string, idx, matchend - idx + len(spaces)) + let part = strpart(string, idx, matchidx - idx) + let delim = strpart(string, matchidx, matchend - matchidx) + endif + + let ignorable = s:highlighted_as(a:line, idx + len(part) + a:fc, a:ignore_groups) + if ignorable + let token .= match + else + let [pmode, mode] = [mode, s:shift(a:modes, a:cycle)] + call add(tokens, token . match) + call add(delims, delim) + let token = '' + endif + + let idx += len(match) + + " If the string is non-empty and ends with the delimiter, + " append an empty token to the list + if idx == len(string) + let phantom = 1 + break + endif + endwhile + + let leftover = token . strpart(string, idx) + if !empty(leftover) + let ignorable = s:highlighted_as(a:line, len(string) + a:fc - 1, a:ignore_groups) + call add(tokens, leftover) + call add(delims, '') + elseif phantom + call add(tokens, '') + call add(delims, '') + endif + let [pmode, mode] = [mode, s:shift(a:modes, a:cycle)] + + " Preserve indentation - merge first two tokens + if len(tokens) > 1 && empty(s:rtrim(tokens[0])) + let tokens[1] = tokens[0] . tokens[1] + call remove(tokens, 0) + call remove(delims, 0) + let mode = pmode + endif + + " Skip comment line + if ignorable && len(tokens) == 1 && a:ignore_unmatched + let tokens = [] + let delims = [] + " Append an empty item to enable right/center alignment of the last token + " - if the last token is not ignorable or ignorable but not the only token + elseif a:ignore_unmatched != 1 && + \ (mode ==? 'r' || mode ==? 'c') && + \ (!ignorable || len(tokens) > 1) && + \ a:nth >= 0 " includes -0 + call add(tokens, '') + call add(delims, '') + endif + + return [tokens, delims] +endfunction + +function! s:do_align(todo, modes, all_tokens, all_delims, fl, ll, fc, lc, nth, recur, dict) + let mode = a:modes[0] + let lines = {} + let min_indent = -1 + let max = { 'pivot_len2': 0, 'token_len': 0, 'just_len': 0, 'delim_len': 0, + \ 'indent': 0, 'tokens': 0, 'strip_len': 0 } + let d = a:dict + let [f, fx] = s:parse_filter(d.filter) + + " Phase 1 + for line in range(a:fl, a:ll) + let snip = a:lc > 0 ? getline(line)[a:fc-1 : a:lc-1] : getline(line) + if f == 1 && snip !~ fx + continue + elseif f == -1 && snip =~ fx + continue + endif + + if !has_key(a:all_tokens, line) + " Split line into the tokens by the delimiters + let [tokens, delims] = s:split_line( + \ line, a:nth, copy(a:modes), a:recur == 2, + \ a:fc, a:lc, d.pattern, + \ d.stick_to_left, d.ignore_unmatched, d.ignore_groups) + + " Remember tokens for subsequent recursive calls + let a:all_tokens[line] = tokens + let a:all_delims[line] = delims + else + let tokens = a:all_tokens[line] + let delims = a:all_delims[line] + endif + + " Skip empty lines + if empty(tokens) + continue + endif + + " Calculate the maximum number of tokens for a line within the range + let max.tokens = max([max.tokens, len(tokens)]) + + if a:nth > 0 " Positive N-th + if len(tokens) < a:nth + continue + endif + let nth = a:nth - 1 " make it 0-based + else " -0 or Negative N-th + if a:nth == 0 && mode !=? 'l' + let nth = len(tokens) - 1 + else + let nth = len(tokens) + a:nth + endif + if empty(delims[len(delims) - 1]) + let nth -= 1 + endif + + if nth < 0 || nth == len(tokens) + continue + endif + endif + + let prefix = nth > 0 ? join(tokens[0 : nth - 1], '') : '' + let delim = delims[nth] + let token = s:rtrim( tokens[nth] ) + let token = s:rtrim( strpart(token, 0, len(token) - len(s:rtrim(delim))) ) + if empty(delim) && !exists('tokens[nth + 1]') && d.ignore_unmatched + continue + endif + + let indent = s:strwidth(matchstr(tokens[0], '^\s*')) + if min_indent < 0 || indent < min_indent + let min_indent = indent + endif + if mode ==? 'c' + let token .= substitute(matchstr(token, '^\s*'), '\t', repeat(' ', &tabstop), 'g') + endif + let [pw, tw] = [s:strwidth(prefix), s:strwidth(token)] + let max.indent = max([max.indent, indent]) + let max.token_len = max([max.token_len, tw]) + let max.just_len = max([max.just_len, pw + tw]) + let max.delim_len = max([max.delim_len, s:strwidth(delim)]) + + if mode ==? 'c' + let pivot_len2 = pw * 2 + tw + if max.pivot_len2 < pivot_len2 + let max.pivot_len2 = pivot_len2 + endif + let max.strip_len = max([max.strip_len, s:strwidth(s:trim(token))]) + endif + let lines[line] = [nth, prefix, token, delim] + endfor + + " Phase 1-5: indentation handling (only on a:nth == 1) + if a:nth == 1 + let idt = d.indentation + if idt ==? 'd' + let indent = max.indent + elseif idt ==? 's' + let indent = min_indent + elseif idt ==? 'n' + let indent = 0 + elseif idt !=? 'k' + call s:exit('Invalid indentation: ' . idt) + end + + if idt !=? 'k' + let max.just_len = 0 + let max.token_len = 0 + let max.pivot_len2 = 0 + + for [line, elems] in items(lines) + let [nth, prefix, token, delim] = elems + + let tindent = matchstr(token, '^\s*') + while 1 + let len = s:strwidth(tindent) + if len < indent + let tindent .= repeat(' ', indent - len) + break + elseif len > indent + let tindent = tindent[0 : -2] + else + break + endif + endwhile + + let token = tindent . s:ltrim(token) + if mode ==? 'c' + let token = substitute(token, '\s*$', repeat(' ', indent), '') + endif + let [pw, tw] = [s:strwidth(prefix), s:strwidth(token)] + let max.token_len = max([max.token_len, tw]) + let max.just_len = max([max.just_len, pw + tw]) + if mode ==? 'c' + let pivot_len2 = pw * 2 + tw + if max.pivot_len2 < pivot_len2 + let max.pivot_len2 = pivot_len2 + endif + endif + + let lines[line][2] = token + endfor + endif + endif + + " Phase 2 + for [line, elems] in items(lines) + let tokens = a:all_tokens[line] + let delims = a:all_delims[line] + let [nth, prefix, token, delim] = elems + + " Remove the leading whitespaces of the next token + if len(tokens) > nth + 1 + let tokens[nth + 1] = s:ltrim(tokens[nth + 1]) + endif + + " Pad the token with spaces + let [pw, tw] = [s:strwidth(prefix), s:strwidth(token)] + let rpad = '' + if mode ==? 'l' + let pad = repeat(' ', max.just_len - pw - tw) + if d.stick_to_left + let rpad = pad + else + let token = token . pad + endif + elseif mode ==? 'r' + let pad = repeat(' ', max.just_len - pw - tw) + let indent = matchstr(token, '^\s*') + let token = indent . pad . s:ltrim(token) + elseif mode ==? 'c' + let p1 = max.pivot_len2 - (pw * 2 + tw) + let p2 = max.token_len - tw + let pf1 = s:floor2(p1) + if pf1 < p1 | let p2 = s:ceil2(p2) + else | let p2 = s:floor2(p2) + endif + let strip = s:ceil2(max.token_len - max.strip_len) / 2 + let indent = matchstr(token, '^\s*') + let token = indent. repeat(' ', pf1 / 2) .s:ltrim(token). repeat(' ', p2 / 2) + let token = substitute(token, repeat(' ', strip) . '$', '', '') + + if d.stick_to_left + if empty(s:rtrim(token)) + let center = len(token) / 2 + let [token, rpad] = [strpart(token, 0, center), strpart(token, center)] + else + let [token, rpad] = [s:rtrim(token), matchstr(token, '\s*$')] + endif + endif + endif + let tokens[nth] = token + + " Pad the delimiter + let dpadl = max.delim_len - s:strwidth(delim) + let da = d.delimiter_align + if da ==? 'l' + let [dl, dr] = ['', repeat(' ', dpadl)] + elseif da ==? 'c' + let dl = repeat(' ', dpadl / 2) + let dr = repeat(' ', dpadl - dpadl / 2) + elseif da ==? 'r' + let [dl, dr] = [repeat(' ', dpadl), ''] + else + call s:exit('Invalid delimiter_align: ' . da) + endif + + " Before and after the range (for blockwise visual mode) + let cline = getline(line) + let before = strpart(cline, 0, a:fc - 1) + let after = a:lc ? strpart(cline, a:lc) : '' + + " Determine the left and right margin around the delimiter + let rest = join(tokens[nth + 1 : -1], '') + let nomore = empty(rest.after) + let ml = (empty(prefix . token) || empty(delim) && nomore) ? '' : d.ml + let mr = nomore ? '' : d.mr + + " Adjust indentation of the lines starting with a delimiter + let lpad = '' + if nth == 0 + let ipad = repeat(' ', min_indent - s:strwidth(token.ml)) + if mode ==? 'l' + let token = ipad . token + else + let lpad = ipad + endif + endif + + " Align the token + let aligned = join([lpad, token, ml, dl, delim, dr, mr, rpad], '') + let tokens[nth] = aligned + + " Update the line + let a:todo[line] = before.join(tokens, '').after + endfor + + if a:nth < max.tokens && (a:recur || len(a:modes) > 1) + call s:shift(a:modes, a:recur == 2) + return [a:todo, a:modes, a:all_tokens, a:all_delims, + \ a:fl, a:ll, a:fc, a:lc, a:nth + 1, a:recur, a:dict] + endif + return [a:todo] +endfunction + +function! s:input(str, default, vis) + if a:vis + normal! gv + redraw + execute "normal! \" + else + " EasyAlign command can be called without visual selection + redraw + endif + let got = input(a:str, a:default) + return got +endfunction + +function! s:atoi(str) + return (a:str =~ '^[0-9]\+$') ? str2nr(a:str) : a:str +endfunction + +function! s:shift_opts(opts, key, vals) + let val = s:shift(a:vals, 1) + if type(val) == 0 && val == -1 + call remove(a:opts, a:key) + else + let a:opts[a:key] = val + endif +endfunction + +function! s:interactive(range, modes, n, d, opts, rules, vis, bvis) + let mode = s:shift(a:modes, 1) + let n = a:n + let d = a:d + let ch = '' + let opts = s:compact_options(a:opts) + let vals = deepcopy(s:option_values) + let regx = 0 + let warn = '' + let undo = 0 + + while 1 + " Live preview + let rdrw = 0 + if undo + silent! undo + let undo = 0 + let rdrw = 1 + endif + if s:live && !empty(d) + let output = s:process(a:range, mode, n, d, s:normalize_options(opts), regx, a:rules, a:bvis) + let &undolevels = &undolevels " Break undo block + call s:update_lines(output.todo) + let undo = !empty(output.todo) + let rdrw = 1 + endif + if rdrw + if a:vis + normal! gv + endif + redraw + if a:vis | execute "normal! \" | endif + endif + call s:echon(mode, n, -1, regx ? '/'.d.'/' : d, opts, warn) + + let check = 0 + let warn = '' + + try + let c = getchar() + catch /^Vim:Interrupt$/ + let c = 27 + endtry + let ch = nr2char(c) + if c == 3 || c == 27 " CTRL-C / ESC + if undo + silent! undo + endif + throw 'exit' + elseif c == "\" + if !empty(d) + let d = '' + let regx = 0 + elseif len(n) > 0 + let n = strpart(n, 0, len(n) - 1) + endif + elseif c == 13 " Enter key + let mode = s:shift(a:modes, 1) + if has_key(opts, 'a') + let opts.a = mode . strpart(opts.a, 1) + endif + elseif ch == '-' + if empty(n) | let n = '-' + elseif n == '-' | let n = '' + else | let check = 1 + endif + elseif ch == '*' + if empty(n) | let n = '*' + elseif n == '*' | let n = '**' + elseif n == '**' | let n = '' + else | let check = 1 + endif + elseif empty(d) && ((c == 48 && len(n) > 0) || c > 48 && c <= 57) " Numbers + if n[0] == '*' | let check = 1 + else | let n = n . ch + end + elseif ch == "\" + call s:shift_opts(opts, 'da', vals['delimiter_align']) + elseif ch == "\" + call s:shift_opts(opts, 'idt', vals['indentation']) + elseif ch == "\" + let lm = s:input("Left margin: ", get(opts, 'lm', ''), a:vis) + if empty(lm) + let warn = 'Set to default. Input 0 to remove it' + silent! call remove(opts, 'lm') + else + let opts['lm'] = s:atoi(lm) + endif + elseif ch == "\" + let rm = s:input("Right margin: ", get(opts, 'rm', ''), a:vis) + if empty(rm) + let warn = 'Set to default. Input 0 to remove it' + silent! call remove(opts, 'rm') + else + let opts['rm'] = s:atoi(rm) + endif + elseif ch == "\" + call s:shift_opts(opts, 'iu', vals['ignore_unmatched']) + elseif ch == "\" + call s:shift_opts(opts, 'ig', vals['ignore_groups']) + elseif ch == "\" + if s:live + if !empty(d) + let ch = d + break + else + let s:live = 0 + endif + else + let s:live = 1 + endif + elseif c == "\" + let opts['stl'] = 1 + let opts['lm'] = 0 + elseif c == "\" + let opts['stl'] = 0 + let opts['lm'] = 1 + elseif c == "\" + let opts['lm'] = 0 + let opts['rm'] = 0 + elseif c == "\" + silent! call remove(opts, 'stl') + silent! call remove(opts, 'lm') + silent! call remove(opts, 'rm') + elseif ch == "\" || ch == "\" + let modes = tolower(s:input("Alignment ([lrc...][[*]*]): ", get(opts, 'a', mode), a:vis)) + if match(modes, '^[lrc]\+\*\{0,2}$') != -1 + let opts['a'] = modes + let mode = modes[0] + while mode != s:shift(a:modes, 1) + endwhile + else + silent! call remove(opts, 'a') + endif + elseif ch == "\" || ch == "\" + if s:live && regx && !empty(d) + break + endif + + let prompt = 'Regular expression: ' + let ch = s:input(prompt, '', a:vis) + if !empty(ch) && s:valid_regexp(ch) + let regx = 1 + let d = ch + if !s:live | break | endif + else + let warn = 'Invalid regular expression: '.ch + endif + elseif ch == "\" + let f = s:input("Filter (g/../ or v/../): ", get(opts, 'f', ''), a:vis) + let m = matchlist(f, '^[gv]/\(.\{-}\)/\?$') + if empty(f) + silent! call remove(opts, 'f') + elseif !empty(m) && s:valid_regexp(m[1]) + let opts['f'] = f + else + let warn = 'Invalid filter expression' + endif + elseif ch =~ '[[:print:]]' + let check = 1 + else + let warn = 'Invalid character' + endif + + if check + if empty(d) + if has_key(a:rules, ch) + let d = ch + if !s:live + if a:vis + execute "normal! gv\" + endif + break + endif + else + let warn = 'Unknown delimiter key: '.ch + endif + else + if regx + let warn = 'Press to finish' + else + if d == ch + break + else + let warn = 'Press '''.d.''' again to finish' + endif + end + endif + endif + endwhile + if s:live + let copts = call('s:summarize', output.summarize) + let s:live = 0 + let g:easy_align_last_command = s:echon('', n, regx, d, copts, '') + let s:live = 1 + end + return [mode, n, ch, opts, regx] +endfunction + +function! s:valid_regexp(regexp) + try + call matchlist('', a:regexp) + catch + return 0 + endtry + return 1 +endfunction + +function! s:test_regexp(regexp) + let regexp = empty(a:regexp) ? @/ : a:regexp + if !s:valid_regexp(regexp) + call s:exit('Invalid regular expression: '. regexp) + endif + return regexp +endfunction + +let s:shorthand_regex = + \ '\s*\%(' + \ .'\(lm\?[0-9]\+\)\|\(rm\?[0-9]\+\)\|\(iu[01]\)\|\(\%(s\%(tl\)\?[01]\)\|[<>]\)\|' + \ .'\(da\?[clr]\)\|\(\%(ms\?\|a\)[lrc*]\+\)\|\(i\%(dt\)\?[kdsn]\)\|\([gv]/.*/\)\|\(ig\[.*\]\)' + \ .'\)\+\s*$' + +function! s:parse_shorthand_opts(expr) + let opts = {} + let expr = substitute(a:expr, '\s', '', 'g') + let regex = '^'. s:shorthand_regex + + if empty(expr) + return opts + elseif expr !~ regex + call s:exit("Invalid expression: ". a:expr) + else + let match = matchlist(expr, regex) + for m in filter(match[ 1 : -1 ], '!empty(v:val)') + for key in ['lm', 'rm', 'l', 'r', 'stl', 's', '<', '>', 'iu', 'da', 'd', 'ms', 'm', 'ig', 'i', 'g', 'v', 'a'] + if stridx(tolower(m), key) == 0 + let rest = strpart(m, len(key)) + if key == 'i' | let key = 'idt' | endif + if key == 'g' || key == 'v' + let rest = key.rest + let key = 'f' + endif + + if key == 'idt' || index(['d', 'f', 'm', 'a'], key[0]) >= 0 + let opts[key] = rest + elseif key == 'ig' + try + let arr = eval(rest) + if type(arr) == 3 + let opts[key] = arr + else + throw 'Not an array' + endif + catch + call s:exit("Invalid ignore_groups: ". a:expr) + endtry + elseif key =~ '[<>]' + let opts['stl'] = key == '<' + else + let opts[key] = str2nr(rest) + endif + break + endif + endfor + endfor + endif + return s:normalize_options(opts) +endfunction + +function! s:parse_args(args) + if empty(a:args) + return ['', '', {}, 0] + endif + let n = '' + let ch = '' + let args = a:args + let cand = '' + let opts = {} + + " Poor man's option parser + let idx = 0 + while 1 + let midx = match(args, '\s*{.*}\s*$', idx) + if midx == -1 | break | endif + + let cand = strpart(args, midx) + try + let [l, r, c, k, s, d, n] = ['l', 'r', 'c', 'k', 's', 'd', 'n'] + let [L, R, C, K, S, D, N] = ['l', 'r', 'c', 'k', 's', 'd', 'n'] + let o = eval(cand) + if type(o) == 4 + let opts = o + if args[midx - 1 : midx] == '\ ' + let midx += 1 + endif + let args = strpart(args, 0, midx) + break + endif + catch + " Ignore + endtry + let idx = midx + 1 + endwhile + + " Invalid option dictionary + if len(substitute(cand, '\s', '', 'g')) > 2 && empty(opts) + call s:exit("Invalid option: ". cand) + else + let opts = s:normalize_options(opts) + endif + + " Shorthand option notation + let sopts = matchstr(args, s:shorthand_regex) + if !empty(sopts) + let args = strpart(args, 0, len(args) - len(sopts)) + let opts = extend(s:parse_shorthand_opts(sopts), opts) + endif + + " Has /Regexp/? + let matches = matchlist(args, '^\(.\{-}\)\s*/\(.*\)/\s*$') + + " Found regexp + if !empty(matches) + return [matches[1], s:test_regexp(matches[2]), opts, 1] + else + let tokens = matchlist(args, '^\([1-9][0-9]*\|-[0-9]*\|\*\*\?\)\?\s*\(.\{-}\)\?$') + " Try swapping n and ch + let [n, ch] = empty(tokens[2]) ? reverse(tokens[1:2]) : tokens[1:2] + + " Resolving command-line ambiguity + " '\ ' => ' ' + " '\' => ' ' + if ch =~ '^\\\s*$' + let ch = ' ' + " '\\' => '\' + elseif ch =~ '^\\\\\s*$' + let ch = '\' + endif + + return [n, ch, opts, 0] + endif +endfunction + +function! s:parse_filter(f) + let m = matchlist(a:f, '^\([gv]\)/\(.\{-}\)/\?$') + if empty(m) + return [0, ''] + else + return [m[1] == 'g' ? 1 : -1, m[2]] + endif +endfunction + +function! s:interactive_modes(bang) + return get(g:, + \ (a:bang ? 'easy_align_bang_interactive_modes' : 'easy_align_interactive_modes'), + \ (a:bang ? ['r', 'l', 'c'] : ['l', 'r', 'c'])) +endfunction + +function! s:alternating_modes(mode) + return a:mode ==? 'r' ? 'rl' : 'lr' +endfunction + +function! s:update_lines(todo) + for [line, content] in items(a:todo) + call setline(line, s:rtrim(content)) + endfor +endfunction + +function! s:parse_nth(n) + let n = a:n + let recur = 0 + if n == '*' | let [nth, recur] = [1, 1] + elseif n == '**' | let [nth, recur] = [1, 2] + elseif n == '-' | let nth = -1 + elseif empty(n) | let nth = 1 + elseif n == '0' || ( n != '-0' && n != string(str2nr(n)) ) + call s:exit('Invalid N-th parameter: '. n) + else + let nth = n + endif + return [nth, recur] +endfunction + +function! s:build_dict(delimiters, ch, regexp, opts) + if a:regexp + let dict = { 'pattern': a:ch } + else + if !has_key(a:delimiters, a:ch) + call s:exit('Unknown delimiter key: '. a:ch) + endif + let dict = copy(a:delimiters[a:ch]) + endif + call extend(dict, a:opts) + + let ml = get(dict, 'left_margin', ' ') + let mr = get(dict, 'right_margin', ' ') + if type(ml) == 0 | let ml = repeat(' ', ml) | endif + if type(mr) == 0 | let mr = repeat(' ', mr) | endif + call extend(dict, { 'ml': ml, 'mr': mr }) + + let dict.pattern = get(dict, 'pattern', a:ch) + let dict.delimiter_align = + \ get(dict, 'delimiter_align', get(g:, 'easy_align_delimiter_align', 'r'))[0] + let dict.indentation = + \ get(dict, 'indentation', get(g:, 'easy_align_indentation', 'k'))[0] + let dict.stick_to_left = + \ get(dict, 'stick_to_left', 0) + let dict.ignore_unmatched = + \ get(dict, 'ignore_unmatched', get(g:, 'easy_align_ignore_unmatched', 2)) + let dict.ignore_groups = + \ get(dict, 'ignore_groups', get(dict, 'ignores', s:ignored_syntax())) + let dict.filter = + \ get(dict, 'filter', '') + return dict +endfunction + +function! s:build_mode_sequence(expr, recur) + let [expr, recur] = [a:expr, a:recur] + let suffix = matchstr(a:expr, '\*\+$') + if suffix == '*' + let expr = expr[0 : -2] + let recur = 1 + elseif suffix == '**' + let expr = expr[0 : -3] + let recur = 2 + endif + return [tolower(expr), recur] +endfunction + +function! s:process(range, mode, n, ch, opts, regexp, rules, bvis) + let [nth, recur] = s:parse_nth((empty(a:n) && exists('g:easy_align_nth')) ? g:easy_align_nth : a:n) + let dict = s:build_dict(a:rules, a:ch, a:regexp, a:opts) + let [mode_sequence, recur] = s:build_mode_sequence( + \ get(dict, 'align', recur == 2 ? s:alternating_modes(a:mode) : a:mode), + \ recur) + + let ve = &virtualedit + set ve=all + let args = [ + \ {}, split(mode_sequence, '\zs'), + \ {}, {}, a:range[0], a:range[1], + \ a:bvis ? min([virtcol("'<"), virtcol("'>")]) : 1, + \ (!recur && a:bvis) ? max([virtcol("'<"), virtcol("'>")]) : 0, + \ nth, recur, dict ] + let &ve = ve + while len(args) > 1 + let args = call('s:do_align', args) + endwhile + + " todo: lines to update + " summarize: arguments to s:summarize + return { 'todo': args[0], 'summarize': [ a:opts, recur, mode_sequence ] } +endfunction + +function s:summarize(opts, recur, mode_sequence) + let copts = s:compact_options(a:opts) + let nbmode = s:interactive_modes(0)[0] + if !has_key(copts, 'a') && ( + \ (a:recur == 2 && s:alternating_modes(nbmode) != a:mode_sequence) || + \ (a:recur != 2 && (a:mode_sequence[0] != nbmode || len(a:mode_sequence) > 1)) + \ ) + call extend(copts, { 'a': a:mode_sequence }) + endif + return copts +endfunction + +function! s:align(bang, live, visualmode, first_line, last_line, expr) + " Heuristically determine if the user was in visual mode + if a:visualmode == 'command' + let vis = a:first_line == line("'<") && a:last_line == line("'>") + let bvis = vis && visualmode() == "\" + elseif empty(a:visualmode) + let vis = 0 + let bvis = 0 + else + let vis = 1 + let bvis = a:visualmode == "\" + end + let range = [a:first_line, a:last_line] + let modes = s:interactive_modes(a:bang) + let mode = modes[0] + let s:live = a:live + + let rules = s:easy_align_delimiters_default + if exists('g:easy_align_delimiters') + let rules = extend(copy(rules), g:easy_align_delimiters) + endif + + let [n, ch, opts, regexp] = s:parse_args(a:expr) + + let bypass_fold = get(g:, 'easy_align_bypass_fold', 0) + let ofm = &l:foldmethod + try + if bypass_fold | let &l:foldmethod = 'manual' | endif + + if empty(n) && empty(ch) || s:live + let [mode, n, ch, opts, regexp] = s:interactive(range, copy(modes), n, ch, opts, rules, vis, bvis) + endif + + if !s:live + let output = s:process(range, mode, n, ch, s:normalize_options(opts), regexp, rules, bvis) + call s:update_lines(output.todo) + let copts = call('s:summarize', output.summarize) + let g:easy_align_last_command = s:echon('', n, regexp, ch, copts, '') + endif + finally + if bypass_fold | let &l:foldmethod = ofm | endif + endtry +endfunction + +function! easy_align#align(bang, live, visualmode, expr) range + try + call s:align(a:bang, a:live, a:visualmode, a:firstline, a:lastline, a:expr) + catch /^\%(Vim:Interrupt\|exit\)$/ + if empty(a:visualmode) + echon "\r" + echon "\r" + else + normal! gv + endif + endtry +endfunction + +let &cpo = s:cpo_save +unlet s:cpo_save + diff --git a/vim/.config/vim/plugged/vim-easy-align/doc/easy_align.txt b/vim/.config/vim/plugged/vim-easy-align/doc/easy_align.txt new file mode 100644 index 0000000..7f777b3 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/doc/easy_align.txt @@ -0,0 +1,891 @@ +*easy-align.txt* easy-align Last change: December 14 2014 +EASY-ALIGN - TABLE OF CONTENTS *easyalign* *easy-align* *easy-align-toc* +============================================================================== + + vim-easy-align + Demo |easy-align-1| + Features |easy-align-2| + Installation |easy-align-3| + TLDR - One-minute guide |easy-align-4| + Usage |easy-align-5| + Concept of alignment rule |easy-align-5-1| + Execution models |easy-align-5-2| + 1. Using mappings |easy-align-5-2-1| + 2. Using :EasyAlign command |easy-align-5-2-2| + Interactive mode |easy-align-5-3| + Predefined alignment rules |easy-align-5-3-1| + Examples |easy-align-5-3-2| + Using regular expressions |easy-align-5-3-3| + Alignment options in interactive mode |easy-align-5-3-4| + Live interactive mode |easy-align-5-4| + Non-interactive mode |easy-align-5-5| + Partial alignment in blockwise-visual mode |easy-align-5-6| + Alignment options |easy-align-6| + List of options |easy-align-6-1| + Filtering lines |easy-align-6-2| + Examples |easy-align-6-2-1| + Ignoring delimiters in comments or strings |easy-align-6-3| + Ignoring unmatched lines |easy-align-6-4| + Aligning delimiters of different lengths |easy-align-6-5| + Adjusting indentation |easy-align-6-6| + Alignments over multiple occurrences of delimiters |easy-align-6-7| + Extending alignment rules |easy-align-6-8| + Examples |easy-align-6-8-1| + Other options |easy-align-7| + Disabling &foldmethod during alignment |easy-align-7-1| + Left/right/center mode switch in interactive mode |easy-align-7-2| + Advanced examples and use cases |easy-align-8| + Related work |easy-align-9| + Author |easy-align-10| + License |easy-align-11| + + +VIM-EASY-ALIGN *vim-easy-align* +============================================================================== + +A simple, easy-to-use Vim alignment plugin. + + + *easy-align-1* +DEMO *easy-align-demo* +============================================================================== + +Screencast: +https://raw.githubusercontent.com/junegunn/i/master/vim-easy-align.gif + +(Too fast? Slower GIF is {here}{1}) + +{1} https://raw.githubusercontent.com/junegunn/i/master/vim-easy-align-slow.gif + + + *easy-align-2* +FEATURES *easy-align-features* +============================================================================== + + - Easy to use + - Comes with a predefined set of alignment rules + - Provides a fast and intuitive interface + - Extensible + - You can define your own rules + - Supports arbitrary regular expressions + - Optimized for code editing + - Takes advantage of syntax highlighting feature to avoid unwanted + alignments + + + *easy-align-3* +INSTALLATION *easy-align-installation* +============================================================================== + +Use your favorite plugin manager. + +Using {vim-plug}{2}: +> + Plug 'junegunn/vim-easy-align' +< + {2} https://github.com/junegunn/vim-plug + + + *easy-align-4* +TLDR - ONE-MINUTE GUIDE *easy-align-tldr-one-minute-guide* +============================================================================== + +Add the following mappings to your .vimrc. + + *(EasyAlign)* +> + " Start interactive EasyAlign in visual mode (e.g. vip) + vmap (EasyAlign) + + " Start interactive EasyAlign for a motion/text object (e.g. gaip) + nmap ga (EasyAlign) +< +And with the following lines of text, +> + apple =red + grass+=green + sky-= blue +< +try these commands: + + - vip= + - `v`isual-select `i`nner `p`aragraph + - Start EasyAlign command () + - Align around `=` + - `gaip=` + - Start EasyAlign command (`ga`) for `i`nner `p`aragraph + - Align around `=` + +Notice that the commands are repeatable with `.` key if you have installed +{repeat.vim}{3}. Install {visualrepeat}{4} as well if you want to repeat in +visual mode. + + {3} https://github.com/tpope/vim-repeat + {4} https://github.com/vim-scripts/visualrepeat + + + *easy-align-5* +USAGE *easy-align-usage* +============================================================================== + + +< Concept of alignment rule >_________________________________________________~ + *easy-align-concept-of-alignment-rule* + *easy-align-5-1* + +Though easy-align can align lines of text around any delimiter, it provides +shortcuts for the most common use cases with the concept of "alignment rule". + +An alignment rule is a predefined set of options for common alignment tasks, +which is identified by a single character, DELIMITER KEY, such as , +`=`, `:`, `.`, `|`, `&`, `#`, and `,`. + +Think of it as a shortcut. Instead of writing regular expression and setting +several options, you can just type in a single character. + + +< Execution models >__________________________________________________________~ + *easy-align-execution-models* + *easy-align-5-2* + +There are two ways to use easy-align. + + +1. Using mappings~ + *easy-align-1-using-plug-mappings* + *easy-align-5-2-1* + +The recommended method is to use mappings as described earlier. + + *(LiveEasyAlign)* + + ----------------------+--------+----------------------------------------------------- + Mapping | Mode | Description ~ + ----------------------+--------+----------------------------------------------------- + (EasyAlign) | normal | Start interactive mode for a motion/text object + (EasyAlign) | visual | Start interactive mode for the selection + (LiveEasyAlign) | normal | Start live-interactive mode for a motion/text object + (LiveEasyAlign) | visual | Start live-interactive mode for the selection + ----------------------+--------+----------------------------------------------------- + + +2. Using :EasyAlign command~ + *easy-align-2-using-easyalign-command* + *easy-align-5-2-2* + + *:EasyAlign* + +If you prefer command-line or do not want to start interactive mode, you can +use `:EasyAlign` command instead. + + *:LiveEasyAlign* + + -------------------------------------------+----------------------------------------------- + Mode | Command ~ + -------------------------------------------+----------------------------------------------- + Interactive mode | `:EasyAlign[!] [OPTIONS]` + Live interactive mode | `:LiveEasyAlign[!] [...]` + Non-interactive mode (predefined rules) | `:EasyAlign[!] [N-th] DELIMITER_KEY [OPTIONS]` + Non-interactive mode (regular expressions) | `:EasyAlign[!] [N-th] /REGEXP/ [OPTIONS]` + -------------------------------------------+----------------------------------------------- + + +< Interactive mode >__________________________________________________________~ + *easy-align-interactive-mode* + *easy-align-5-3* + +The following sections will assume that you have (EasyAlign) mappings in +your .vimrc as below: +> + " Start interactive EasyAlign in visual mode (e.g. vip) + vmap (EasyAlign) + + " Start interactive EasyAlign for a motion/text object (e.g. gaip) + nmap ga (EasyAlign) +< +With these mappings, you can align text with only a few keystrokes. + + 1. key in visual mode, or `ga` followed by a motion or a text object to + start interactive mode + 2. Optional: Enter keys to select alignment mode (left, right, or center) + 3. Optional: N-th delimiter (default: 1) + - `1` Around the 1st occurrences of delimiters + - `2` Around the 2nd occurrences of delimiters + - ... + - `*` Around all occurrences of delimiters + - `**` Left-right alternating alignment around all delimiters + - `-` Around the last occurrences of delimiters (`-1`) + - `-2` Around the second to last occurrences of delimiters + - ... + 4. Delimiter key (a single keystroke; , `=`, `:`, `.`, `|`, `&`, `#`, `,`) + + +Predefined alignment rules~ + *easy-align-predefined-alignment-rules* + *easy-align-5-3-1* + + --------------+-------------------------------------------------------------------- + Delimiter key | Description/Use cases ~ + --------------+-------------------------------------------------------------------- + | General alignment around whitespaces + `=` | Operators containing equals sign ( `=` , `==,` `!=` , `+=` , `&&=` , ...) + `:` | Suitable for formatting JSON or YAML + `.` | Multi-line method chaining + `,` | Multi-line method arguments + `&` | LaTeX tables (matches `&` and `\\` ) + `#` | Ruby/Python comments + `"` | Vim comments + | Table markdown + --------------+-------------------------------------------------------------------- + + *g:easy_align_delimiters* + +You can override these default rules or define your own rules with +`g:easy_align_delimiters`, which will be described in {the later section}{5}. + + {5} https://github.com/junegunn/vim-easy-align#extending-alignment-rules + + +Examples~ + *easy-align-examples* + *easy-align-5-3-2* + + ------------------+------------------------------------+-------------------- + With visual map | Description | Equivalent command ~ + ------------------+------------------------------------+-------------------- + | Around 1st whitespaces | :'<,'>EasyAlign\ + 2 | Around 2nd whitespaces | :'<,'>EasyAlign2\ + - | Around the last whitespaces | :'<,'>EasyAlign-\ + -2 | Around the 2nd to last whitespaces | :'<,'>EasyAlign-2\ + : | Around 1st colon ( `key: value` ) | :'<,'>EasyAlign: + : | Around 1st colon ( `key : value` ) | :'<,'>EasyAlign:= | Around 1st operators with = | :'<,'>EasyAlign= + 3= | Around 3rd operators with = | :'<,'>EasyAlign3= + *= | Around all operators with = | :'<,'>EasyAlign*= + **= | Left-right alternating around = | :'<,'>EasyAlign**= + = | Right alignment around 1st = | :'<,'>EasyAlign!= + **= | Right-left alternating around = | :'<,'>EasyAlign!**= + ------------------+------------------------------------+-------------------- + + +Using regular expressions~ + *easy-align-using-regular-expressions* + *easy-align-5-3-3* + +Instead of finishing the command with a predefined delimiter key, you can type +in a regular expression after CTRL-/ or CTRL-X key. For example, if you want +to align text around all occurrences of numbers: + + - + - `*` + - CTRL-X + - `[0-9]\+` + + +Alignment options in interactive mode~ + *easy-align-alignment-options-in-interactive-mode* + *easy-align-5-3-4* + +While in interactive mode, you can set alignment options using special +shortcut keys listed below. The meaning of each option will be described in +{the following sections}{6}. + + --------+--------------------+--------------------------------------------------- + Key | Option | Values ~ + --------+--------------------+--------------------------------------------------- + CTRL-F | `filter` | Input string ( `[gv]/.*/?` ) + CTRL-I | `indentation` | shallow, deep, none, keep + CTRL-L | `left_margin` | Input number or string + CTRL-R | `right_margin` | Input number or string + CTRL-D | `delimiter_align` | left, center, right + CTRL-U | `ignore_unmatched` | 0, 1 + CTRL-G | `ignore_groups` | [], ["String'], ["Comment'], ["String', "Comment'] + CTRL-A | `align` | Input string ( `/[lrc]+\*{0,2}/` ) + | `stick_to_left` | `{ 'stick_to_left': 1, 'left_margin': 0 }` + | `stick_to_left` | `{ 'stick_to_left': 0, 'left_margin': 1 }` + | `*_margin` | `{ 'left_margin': 0, 'right_margin': 0 }` + --------+--------------------+--------------------------------------------------- + + {6} https://github.com/junegunn/vim-easy-align#alignment-options + + +< Live interactive mode >_____________________________________________________~ + *easy-align-live-interactive-mode* + *easy-align-5-4* + +If you're performing a complex alignment where multiple options should be +carefully adjusted, try "live interactive mode" where you can preview the +result of the alignment on-the-fly as you type in. + +Live interactive mode can be started with either (LiveEasyAlign) map or +`:LiveEasyAlign` command. Or you can switch to live interactive mode while in +ordinary interactive mode by pressing CTRL-P. (P for Preview) + +In live interactive mode, you have to type in the same delimiter (or CTRL-X on +regular expression) again to finalize the alignment. This allows you to +preview the result of the alignment and freely change the delimiter using +backspace key without leaving the interactive mode. + + +< Non-interactive mode >______________________________________________________~ + *easy-align-non-interactive-mode* + *easy-align-5-5* + +Instead of starting interactive mode, you can use declarative, non-interactive +`:EasyAlign` command. +> + " Using predefined alignment rules + " :EasyAlign[!] [N-th] DELIMITER_KEY [OPTIONS] + :EasyAlign : + :EasyAlign = + :EasyAlign *= + :EasyAlign 3\ + + " Using arbitrary regular expressions + " :EasyAlign[!] [N-th] /REGEXP/ [OPTIONS] + :EasyAlign /[:;]\+/ + :EasyAlign 2/[:;]\+/ + :EasyAlign */[:;]\+/ + :EasyAlign **/[:;]\+/ +< +A command can end with alignment options, {each of which will be discussed in +detail later}{6}, in Vim dictionary format. + + - `:EasyAlign * /[:;]\+/ { 'stick_to_left': 1, 'left_margin': 0 }` + +`stick_to_left` of 1 means that the matched delimiter should be positioned +right next to the preceding token, and `left_margin` of 0 removes the margin +on the left. So we get: +> + apple;: banana:: cake + data;; exchange:; format +< +Option names are fuzzy-matched, so you can write as follows: + + - `:EasyAlign * /[:;]\+/ { 'stl': 1, 'l': 0 }` + +You can even omit spaces between the arguments, so concisely (or cryptically): + + - `:EasyAlign*/[:;]\+/{'s':1,'l':0}` + +Nice. But let's make it even shorter. Option values can be written in +shorthand notation. + + - `:EasyAlign*/[:;]\+/` + `ignore_unmatched` | `iu[01]` + `ignore_groups` | `ig\[.*\]` + `align` | `a[lrc*]*` + `delimiter_align` | `d[lrc]` + `indentation` | `i[ksdn]` + -------------------+----------- + +For your information, the same operation can be done in interactive mode as +follows: + + - + - `*` + - + - CTRL-X + - `[:;]\+` + + {6} https://github.com/junegunn/vim-easy-align#alignment-options + + +< Partial alignment in blockwise-visual mode >________________________________~ + *easy-align-partial-alignment-in-blockwise-visual-mode* + *easy-align-5-6* + +In blockwise-visual mode (CTRL-V), EasyAlign command aligns only the selected +text in the block, instead of the whole lines in the range. + +Consider the following case where you want to align text around `=>` +operators. +> + my_hash = { :a => 1, + :aa => 2, + :aaa => 3 } +< +In non-blockwise visual mode (`v` / `V`), = won't work since the +assignment operator in the first line gets in the way. So we instead enter +blockwise-visual mode (CTRL-V), and select the text around`=>` operators, then +press =. +> + my_hash = { :a => 1, + :aa => 2, + :aaa => 3 } +< +However, in this case, we don't really need blockwise visual mode since the +same can be easily done using the negative N-th parameter: -= + + + *easy-align-6* +ALIGNMENT OPTIONS *easy-align-alignment-options* +============================================================================== + + +< List of options >___________________________________________________________~ + *easy-align-list-of-options* + *easy-align-6-1* + + -------------------+---------+-----------------------+-------------------------------------------------------- + Option | Type | Default | Description ~ + -------------------+---------+-----------------------+-------------------------------------------------------- + `filter` | string | | Line filtering expression: `g/../` or `v/../` + `left_margin` | number | 1 | Number of spaces to attach before delimiter + `left_margin` | string | `' '` | String to attach before delimiter + `right_margin` | number | 1 | Number of spaces to attach after delimiter + `right_margin` | string | `' '` | String to attach after delimiter + `stick_to_left` | boolean | 0 | Whether to position delimiter on the left-side + `ignore_groups` | list | ["String', "Comment'] | Delimiters in these syntax highlight groups are ignored + `ignore_unmatched` | boolean | 1 | Whether to ignore lines without matching delimiter + `indentation` | string | `k` | Indentation method (keep, deep, shallow, none) + `delimiter_align` | string | `r` | Determines how to align delimiters of different lengths + `align` | string | `l` | Alignment modes for multiple occurrences of delimiters + -------------------+---------+-----------------------+-------------------------------------------------------- + +There are 4 ways to set alignment options (from lowest precedence to highest): + + 1. Some option values can be set with corresponding global variables + 2. Option values can be specified in the definition of each alignment rule + 3. Option values can be given as arguments to `:EasyAlign` command + 4. Option values can be set in interactive mode using special shortcut keys + + *g:easy_align_ignore_groups* *g:easy_align_ignore_unmatched* + *g:easy_align_indentation* *g:easy_align_delimiter_align* + + -------------------+-----------------+-------------+-------------------------------- + Option name | Shortcut key | Abbreviated | Global variable ~ + -------------------+-----------------+-------------+-------------------------------- + `filter` | CTRL-F | `[gv]/.*/` | + `left_margin` | CTRL-L | `l[0-9]+` | + `right_margin` | CTRL-R | `r[0-9]+` | + `stick_to_left` | , | `<` or `>` | + `ignore_groups` | CTRL-G | `ig\[.*\]` | `g:easy_align_ignore_groups` + `ignore_unmatched` | CTRL-U | `iu[01]` | `g:easy_align_ignore_unmatched` + `indentation` | CTRL-I | `i[ksdn]` | `g:easy_align_indentation` + `delimiter_align` | CTRL-D | `d[lrc]` | `g:easy_align_delimiter_align` + `align` | CTRL-A | `a[lrc*]*` | + -------------------+-----------------+-------------+-------------------------------- + + +< Filtering lines >___________________________________________________________~ + *easy-align-filtering-lines* + *easy-align-6-2* + +With `filter` option, you can align lines that only match or do not match a +given pattern. There are several ways to set the pattern. + + 1. Press CTRL-F in interactive mode and type in `g/pat/` or `v/pat/` + 2. In command-line, it can be written in dictionary format: `{'filter': + 'g/pat/'}` + 3. Or in shorthand notation: `g/pat/` or `v/pat/` + +(You don't need to escape "/'s in the regular expression) + + +Examples~ + + *easy-align-6-2-1* +> + " Start interactive mode with filter option set to g/hello/ + EasyAlign g/hello/ + + " Start live interactive mode with filter option set to v/goodbye/ + LiveEasyAlign v/goodbye/ + + " Align the lines with 'hi' around the first colons + EasyAlign:g/hi/ +< + +< Ignoring delimiters in comments or strings >________________________________~ + *easy-align-ignoring-delimiters-in-comments-or-strings* + *easy-align-6-3* + +EasyAlign can be configured to ignore delimiters in certain syntax highlight +groups, such as code comments or strings. By default, delimiters that are +highlighted as code comments or strings are ignored. +> + " Default: + " If a delimiter is in a highlight group whose name matches + " any of the followings, it will be ignored. + let g:easy_align_ignore_groups = ['Comment', 'String'] +< +For example, the following paragraph +> + { + # Quantity of apples: 1 + apple: 1, + # Quantity of bananas: 2 + bananas: 2, + # Quantity of grape:fruits: 3 + 'grape:fruits': 3 + } +< +becomes as follows on : (or `:EasyAlign:`) +> + { + # Quantity of apples: 1 + apple: 1, + # Quantity of bananas: 2 + bananas: 2, + # Quantity of grape:fruits: 3 + 'grape:fruits': 3 + } +< +Naturally, this feature only works when syntax highlighting is enabled. + +You can change the default rule by using one of these 4 methods. + + 1. Press CTRL-G in interactive mode to switch groups + 2. Define global `g:easy_align_ignore_groups` list + 3. Define a custom rule in `g:easy_align_delimiters` with `ignore_groups` option + 4. Provide `ignore_groups` option to `:EasyAlign` command. e.g. `:EasyAlign:ig[]` + +For example if you set `ignore_groups` option to be an empty list, you get +> + { + # Quantity of apples: 1 + apple: 1, + # Quantity of bananas: 2 + bananas: 2, + # Quantity of grape: fruits: 3 + 'grape: fruits': 3 + } +< +If a pattern in `ignore_groups` is prepended by a `!`, it will have the +opposite meaning. For instance, if `ignore_groups` is given as `['!Comment']`, +delimiters that are not highlighted as Comment will be ignored during the +alignment. + + +< Ignoring unmatched lines >__________________________________________________~ + *easy-align-ignoring-unmatched-lines* + *easy-align-6-4* + +`ignore_unmatched` option determines how EasyAlign command processes lines +that do not have N-th delimiter. + + 1. In left-alignment mode, they are ignored + 2. In right or center-alignment mode, they are not ignored, and the last tokens + from those lines are aligned as well as if there is an invisible trailing + delimiter at the end of each line + 3. If `ignore_unmatched` is 1, they are ignored regardless of the alignment mode + 4. If `ignore_unmatched` is 0, they are not ignored regardless of the mode + +Let's take an example. When we align the following code block around the (1st) +colons, +> + { + apple: proc { + this_line_does_not_have_a_colon + }, + bananas: 2, + grapefruits: 3 + } +< +this is usually what we want. +> + { + apple: proc { + this_line_does_not_have_a_colon + }, + bananas: 2, + grapefruits: 3 + } +< +However, we can override this default behavior by setting `ignore_unmatched` +option to zero using one of the following methods. + + 1. Press CTRL-U in interactive mode to toggle `ignore_unmatched` option + 2. Set the global `g:easy_align_ignore_unmatched` variable to 0 + 3. Define a custom alignment rule with `ignore_unmatched` option set to 0 + 4. Provide `ignore_unmatched` option to `:EasyAlign` command. e.g. + `:EasyAlign:iu0` + +Then we get, +> + { + apple: proc { + this_line_does_not_have_a_colon + }, + bananas: 2, + grapefruits: 3 + } +< + +< Aligning delimiters of different lengths >__________________________________~ + *easy-align-aligning-delimiters-of-different-lengths* + *easy-align-6-5* + +Global `g:easy_align_delimiter_align` option and rule-wise/command-wise +`delimiter_align` option determines how matched delimiters of different +lengths are aligned. +> + apple = 1 + banana += apple + cake ||= banana +< +By default, delimiters are right-aligned as follows. +> + apple = 1 + banana += apple + cake ||= banana +< +However, with `:EasyAlign=dl`, delimiters are left-aligned. +> + apple = 1 + banana += apple + cake ||= banana +< +And on `:EasyAlign=dc`, center-aligned. +> + apple = 1 + banana += apple + cake ||= banana +< +In interactive mode, you can change the option value with CTRL-D key. + + +< Adjusting indentation >_____________________________________________________~ + *easy-align-adjusting-indentation* + *easy-align-6-6* + +By default :EasyAlign command keeps the original indentation of the lines. But +then again we have `indentation` option. See the following example. +> + # Lines with different indentation + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + + # Default: _k_eep the original indentation + # :EasyAlign= + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + + # Use the _s_hallowest indentation among the lines + # :EasyAlign=is + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + + # Use the _d_eepest indentation among the lines + # :EasyAlign=id + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + + # Indentation: _n_one + # :EasyAlign=in + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 +< +In interactive mode, you can change the option value with CTRL-I key. + + +< Alignments over multiple occurrences of delimiters >________________________~ + *easy-align-alignments-over-multiple-occurrences-of-delimiters* + *easy-align-6-7* + +As stated above, "N-th" parameter is used to target specific occurrences of +the delimiter when it appears multiple times in each line. + +To recap: +> + " Left-alignment around the FIRST occurrences of delimiters + :EasyAlign = + + " Left-alignment around the SECOND occurrences of delimiters + :EasyAlign 2= + + " Left-alignment around the LAST occurrences of delimiters + :EasyAlign -= + + " Left-alignment around ALL occurrences of delimiters + :EasyAlign *= + + " Left-right ALTERNATING alignment around all occurrences of delimiters + :EasyAlign **= + + " Right-left ALTERNATING alignment around all occurrences of delimiters + :EasyAlign! **= +< +In addition to these, you can fine-tune alignments over multiple occurrences +of the delimiters with "align' option. (The option can also be set in +interactive mode with the special key CTRL-A) +> + " Left alignment over the first two occurrences of delimiters + :EasyAlign = { 'align': 'll' } + + " Right, left, center alignment over the 1st to 3rd occurrences of delimiters + :EasyAlign = { 'a': 'rlc' } + + " Using shorthand notation + :EasyAlign = arlc + + " Right, left, center alignment over the 2nd to 4th occurrences of delimiters + :EasyAlign 2=arlc + + " (*) Repeating alignments (default: l, r, or c) + " Right, left, center, center, center, center, ... + :EasyAlign *=arlc + + " (**) Alternating alignments (default: lr or rl) + " Right, left, center, right, left, center, ... + :EasyAlign **=arlc + + " Right, left, center, center, center, ... repeating alignment + " over the 3rd to the last occurrences of delimiters + :EasyAlign 3=arlc* + + " Right, left, center, right, left, center, ... alternating alignment + " over the 3rd to the last occurrences of delimiters + :EasyAlign 3=arlc** +< + +< Extending alignment rules >_________________________________________________~ + *easy-align-extending-alignment-rules* + *easy-align-6-8* + +Although the default rules should cover the most of the use cases, you can +extend the rules by setting a dictionary named `g:easy_align_delimiters`. + +You may refer to the definitions of the default alignment rules {here}{7}. + +{7} https://github.com/junegunn/vim-easy-align/blob/2.9.6/autoload/easy_align.vim#L32-L46 + + +Examples~ + + *easy-align-6-8-1* +> + let g:easy_align_delimiters = { + \ '>': { 'pattern': '>>\|=>\|>' }, + \ '/': { + \ 'pattern': '//\+\|/\*\|\*/', + \ 'delimiter_align': 'l', + \ 'ignore_groups': ['!Comment'] }, + \ ']': { + \ 'pattern': '[[\]]', + \ 'left_margin': 0, + \ 'right_margin': 0, + \ 'stick_to_left': 0 + \ }, + \ ')': { + \ 'pattern': '[()]', + \ 'left_margin': 0, + \ 'right_margin': 0, + \ 'stick_to_left': 0 + \ }, + \ 'd': { + \ 'pattern': ' \(\S\+\s*[;=]\)\@=', + \ 'left_margin': 0, + \ 'right_margin': 0 + \ } + \ } +< + + *easy-align-7* +OTHER OPTIONS *easy-align-other-options* +============================================================================== + + +< Disabling &foldmethod during alignment >____________________________________~ + *easy-align-disabling-foldmethod-during-alignment* + *easy-align-7-1* + + *g:easy_align_bypass_fold* + +{It is reported}{8} that 'foldmethod' value of `expr` or `syntax` can +significantly slow down the alignment when editing a large, complex file with +many folds. To alleviate this issue, EasyAlign provides an option to +temporarily set 'foldmethod' to `manual` during the alignment task. In order +to enable this feature, set `g:easy_align_bypass_fold` switch to 1. +> + let g:easy_align_bypass_fold = 1 +< + {8} https://github.com/junegunn/vim-easy-align/issues/14 + + +< Left/right/center mode switch in interactive mode >_________________________~ + *easy-align-left-right-center-mode-switch-in-interactive-mode* + *easy-align-7-2* + +In interactive mode, you can choose the alignment mode you want by pressing +enter keys. The non-bang command, `:EasyAlign` starts in left-alignment mode +and changes to right and center mode as you press enter keys, while the bang +version first starts in right-alignment mode. + + - `:EasyAlign` + - Left, Right, Center + - `:EasyAlign!` + - Right, Left, Center + +If you do not prefer this default mode transition, you can define your own +settings as follows. + + *g:easy_align_interactive_modes* *g:easy_align_bang_interactive_modes* +> + let g:easy_align_interactive_modes = ['l', 'r'] + let g:easy_align_bang_interactive_modes = ['c', 'r'] +< + + *easy-align-8* +ADVANCED EXAMPLES AND USE CASES *easy-align-advanced-examples-and-use-cases* +============================================================================== + +See {EXAMPLES.md}{9} for more examples. + + {9} https://github.com/junegunn/vim-easy-align/blob/master/EXAMPLES.md + + + *easy-align-9* +RELATED WORK *easy-align-related-work* +============================================================================== + + - {DrChip's Alignment Tool for Vim}{10} + - {Tabular}{11} + + {10} http://www.drchip.org/astronaut/vim/align.html + {11} https://github.com/godlygeek/tabular + + + *easy-align-10* +AUTHOR *easy-align-author* +============================================================================== + +{Junegunn Choi}{12} + + {12} https://github.com/junegunn + + + *easy-align-11* +LICENSE *easy-align-license* +============================================================================== + +MIT + +============================================================================== +vim:tw=78:sw=2:ts=2:ft=help:norl:nowrap: diff --git a/vim/.config/vim/plugged/vim-easy-align/plugin/easy_align.vim b/vim/.config/vim/plugged/vim-easy-align/plugin/easy_align.vim new file mode 100644 index 0000000..1138911 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/plugin/easy_align.vim @@ -0,0 +1,142 @@ +" Copyright (c) 2014 Junegunn Choi +" +" MIT License +" +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be +" included in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +if exists("g:loaded_easy_align_plugin") + finish +endif +let g:loaded_easy_align_plugin = 1 + +command! -nargs=* -range -bang EasyAlign ,call easy_align#align(0, 0, 'command', ) +command! -nargs=* -range -bang LiveEasyAlign ,call easy_align#align(0, 1, 'command', ) + +let s:last_command = 'EasyAlign' + +function! s:abs(v) + return a:v >= 0 ? a:v : - a:v +endfunction + +function! s:remember_visual(mode) + let s:last_visual = [a:mode, s:abs(line("'>") - line("'<")), s:abs(col("'>") - col("'<"))] +endfunction + +function! s:repeat_visual() + let [mode, ldiff, cdiff] = s:last_visual + let cmd = 'normal! '.mode + if ldiff > 0 + let cmd .= ldiff . 'j' + endif + + let ve_save = &virtualedit + try + if mode == "\" + if cdiff > 0 + let cmd .= cdiff . 'l' + endif + set virtualedit+=block + endif + execute cmd.":\=g:easy_align_last_command\\" + call s:set_repeat() + finally + if ve_save != &virtualedit + let &virtualedit = ve_save + endif + endtry +endfunction + +function! s:repeat_in_visual() + if exists('g:easy_align_last_command') + call s:remember_visual(visualmode()) + call s:repeat_visual() + endif +endfunction + +function! s:set_repeat() + silent! call repeat#set("\(EasyAlignRepeat)") +endfunction + +function! s:generic_easy_align_op(type, vmode, live) + if !&modifiable + if a:vmode + normal! gv + endif + return + endif + let sel_save = &selection + let &selection = "inclusive" + + if a:vmode + let vmode = a:type + let [l1, l2] = ["'<", "'>"] + call s:remember_visual(vmode) + else + let vmode = '' + let [l1, l2] = [line("'["), line("']")] + unlet! s:last_visual + endif + + try + let range = l1.','.l2 + if get(g:, 'easy_align_need_repeat', 0) + execute range . g:easy_align_last_command + else + execute range . "call easy_align#align(0, a:live, vmode, '')" + end + call s:set_repeat() + finally + let &selection = sel_save + endtry +endfunction + +function! s:easy_align_op(type, ...) + call s:generic_easy_align_op(a:type, a:0, 0) +endfunction + +function! s:live_easy_align_op(type, ...) + call s:generic_easy_align_op(a:type, a:0, 1) +endfunction + +function! s:easy_align_repeat() + if exists('s:last_visual') + call s:repeat_visual() + else + try + let g:easy_align_need_repeat = 1 + normal! . + finally + unlet! g:easy_align_need_repeat + endtry + endif +endfunction + +nnoremap (EasyAlign) :set opfunc=easy_align_opg@ +vnoremap (EasyAlign) :call easy_align_op(visualmode(), 1) +nnoremap (LiveEasyAlign) :set opfunc=live_easy_align_opg@ +vnoremap (LiveEasyAlign) :call live_easy_align_op(visualmode(), 1) + +" vim-repeat support +nnoremap (EasyAlignRepeat) :call easy_align_repeat() +vnoremap (EasyAlignRepeat) :call repeat_in_visual() + +" Backward-compatibility (deprecated) +nnoremap (EasyAlignOperator) :set opfunc=easy_align_opg@ + diff --git a/vim/.config/vim/plugged/vim-easy-align/test/README.md b/vim/.config/vim/plugged/vim-easy-align/test/README.md new file mode 100644 index 0000000..008303a --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/README.md @@ -0,0 +1,13 @@ +Test cases for vim-easy-align +============================= + +### Prerequisite + +- [Vader.vim](https://github.com/junegunn/vader.vim) + +### Run + +``` +./run +``` + diff --git a/vim/.config/vim/plugged/vim-easy-align/test/blockwise.vader b/vim/.config/vim/plugged/vim-easy-align/test/blockwise.vader new file mode 100644 index 0000000..8a68ee7 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/blockwise.vader @@ -0,0 +1,22 @@ +Include: include/setup.vader + +Given clojure: + (def world [[1 1 1 1 1] + [999 999 999 999 1] + [1 1 1 1 1] + [1 999 999 999 999] + [1 1 1 1 1]]) + +Do (Recursive alignment in blockwise-visual mode): + f[; + \G + \*\ + +Expect clojure: + (def world [[1 1 1 1 1] + [999 999 999 999 1] + [1 1 1 1 1] + [1 999 999 999 999] + [1 1 1 1 1]]) + +Include: include/teardown.vader diff --git a/vim/.config/vim/plugged/vim-easy-align/test/commandline.vader b/vim/.config/vim/plugged/vim-easy-align/test/commandline.vader new file mode 100644 index 0000000..2c5a751 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/commandline.vader @@ -0,0 +1,191 @@ +Include: include/setup.vader + +Given (fruits): + apple;:;;banana::cake + data;;exchange:;::format + +Execute (regular expression): + %EasyAlign/[:;]\+/ + AssertEqual ':EasyAlign /[:;]\+/', g:easy_align_last_command + +Expect: + apple ;:;; banana::cake + data ;; exchange:;::format + +Execute (options dictionary): + %EasyAlign/[:;]\+/{ 'left_margin': '<', 'right_margin': 3 } + +Expect: + apple<;:;; banana::cake + data < ;; exchange:;::format + +Execute (fuzzy matching): + %EasyAlign/[:;]\+/{ 'l':'<', 'r': '>'} + +Expect: + apple<;:;;>banana::cake + data < ;;>exchange:;::format + +Execute (shorthand notation of margin): + %EasyAlign/[:;]\+/l0r0 + +Expect: + apple;:;;banana::cake + data ;;exchange:;::format + +Execute (delimiter align): + %EasyAlign*/[:;]\+/l0r0dc + +Expect: + apple;:;;banana :: cake + data ;; exchange:;::format + +Execute (DEPRECATED: shorthand notation of mode_sequence and margin): + %EasyAlign/[:;]\+/mrc*l2r2 + +Expect: + apple ;:;; banana :: cake + data ;; exchange :;:: format + +Execute (shorthand notation of align and margin): + %EasyAlign/[:;]\+/arc*l2r2 + +Expect: + apple ;:;; banana :: cake + data ;; exchange :;:: format + +Execute (DEPRECATED: deep indentation): + %EasyAlign/[:;]\+/mrc*l2r2 + %EasyAlign*/[:;]\+/idmrl* + +Expect: + apple ;:;; banana :: cake + data ;; exchange :;:: format + +Execute (deep indentation): + %EasyAlign/[:;]\+/arc*l2r2 + %EasyAlign*/[:;]\+/idarl* + +Expect: + apple ;:;; banana :: cake + data ;; exchange :;:: format + +Execute (stick_to_left): + %EasyAlign*/[:;]\+/stl1l0dlrm3 + +Expect: + apple;:;; banana:: cake + data;; exchange:;:: format + +Execute (<): + %EasyAlign*/[:;]\+/): + %EasyAlign*/[:;]\+/l0dl<>rm3 + +Expect: + apple;:;; banana :: cake + data ;; exchange:;:: format + +Execute (different regular expression): + %EasyAlign*/../{'lm':'<','rm':'>'} + +Expect: + ap><:;><;b><:c>e + da><;;><:;><::>' } + +Expect: + ap><:;><;b><:c>e + da><;;><:;><::> \\y + diff --git a/vim/.config/vim/plugged/vim-easy-align/test/fixed.vader b/vim/.config/vim/plugged/vim-easy-align/test/fixed.vader new file mode 100644 index 0000000..fb3adc2 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/fixed.vader @@ -0,0 +1,263 @@ +Include: include/setup.vader + +Given (Table): + |a|b|c|d| + | -|-|>-|-| + |aaa|bbb|ccc|ddd| + +Do (Partial alignment around 1st |): + \ljj\| + +Expect (Right margin should be correctly attached): + | a|b|c|d| + | -|-|>-|-| + | aaa|bbb|ccc|ddd| + +Given (empty buffer): + +Execute (Aligning lines with many delimiters should not fail): + call visualmode(1) + call setline(1, repeat('|', &maxfuncdepth + 1)) + %EasyAlign*| + AssertEqual (&maxfuncdepth + 1) * 3 - 2, len(getline(1)) + +Given: + a | b | c + aa | bb | cc + +Execute: + %EasyAlign*|iu0{'l':'<', 'r': '>'} + +Expect: + a <|>b <|>c + aa<|>bb<|>cc + +Given (Trailing delimiter): + a | b | c | + aa | bb | cc | + +Execute: + %EasyAlign*|iu0{'l':'<', 'r': '>'} + +Expect: + a <|>b <|>c <| + aa<|>bb<|>cc<| + +Given (Tab-indented code (#20)): + class MyUnitTest(unittest.TestCase): + def test_base(self): + n2f = {} + n2v = {} + f2v = {} + n2gv = {} + n2vt = {} + +Execute: + set tabstop=1 + %EasyAlign= + +Expect: + class MyUnitTest(unittest.TestCase): + def test_base(self): + n2f = {} + n2v = {} + f2v = {} + n2gv = {} + n2vt = {} + +Execute: + set tabstop=2 + %EasyAlign= + +Expect: + class MyUnitTest(unittest.TestCase): + def test_base(self): + n2f = {} + n2v = {} + f2v = {} + n2gv = {} + n2vt = {} + +Execute: + set tabstop=4 + %EasyAlign= + +Expect: + class MyUnitTest(unittest.TestCase): + def test_base(self): + n2f = {} + n2v = {} + f2v = {} + n2gv = {} + n2vt = {} + +Execute: + set tabstop=8 + %EasyAlign= + +Expect: + class MyUnitTest(unittest.TestCase): + def test_base(self): + n2f = {} + n2v = {} + f2v = {} + n2gv = {} + n2vt = {} + +Execute: + set tabstop=12 + %EasyAlign= + +Expect: + class MyUnitTest(unittest.TestCase): + def test_base(self): + n2f = {} + n2v = {} + f2v = {} + n2gv = {} + n2vt = {} + +Given (Tab-indented code (#20)): + class MyUnitTest(unittest.TestCase): + def test_base(self): + # n2f= {} + ## n2v= {} + # f2v = {} + ## n2gv = {} + # n2vt = {} + +Execute: + set tabstop=12 + %EasyAlign= + +Expect: + class MyUnitTest(unittest.TestCase): + def test_base(self): + # n2f = {} + ## n2v = {} + # f2v = {} + ## n2gv = {} + # n2vt = {} + +Given (Some text): + a,b,c + + d,e,f + +Do (Select 1st line, align 3rd line): +- First line + V\ +- Last line + G +- Align + \Aip*, +- Previous selection + gv +- Upcase + U + +Expect: + A,B,C + + d, e, f + +Given c (#40 Ignored delimiters in LiveEasyAlign causes spurious undo): + printf("foo = %f\n", foo); + printf("foobar = %f\n", foobar); + +Do: + gUiw + :%LiveEasyAlign\ + =\== + +Expect c: + PRINTF("foo = %f\n", foo); + printf("foobar = %f\n", foobar); + +* #50 Error when using delimiter alignment option +Given: + a|bbb|c + aa|bb|cc + +Do (#50 EasyAlign command with 'a' option): + :%EasyAlign {'a': 'l'}\ + \ + *| + +Expect (Some text): + a | bbb | c + aa | bb | cc + +* #51 Repeat of visual (LiveEasyAlign) broken +Do (#51/#52 (EasyAlignRepeat) in visual mode): + V\\\*|| + G + V\. + +Expect: + a | bbb | c + aa | bb | cc + +* #65 ?= +Given: + a?=b + aa-=bb + aaa?=bbb + +Do (#65 Alignment around ?=): + \Aip= + +Expect: + a ?= b + aa -= bb + aaa ?= bbb + +* #67 \v +Given c: + bzero(&servaddr, sizeof(servaddr)); + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(SERV_PORT); + +Execute (#67 \v breaks surrounding regex): + %EasyAlign/\v(\=\s)@<=jj\ + \Aip= + +Expect: + hello = world bye all + hello world = bye all + hello world = foo all diff --git a/vim/.config/vim/plugged/vim-easy-align/test/fixme.vader b/vim/.config/vim/plugged/vim-easy-align/test/fixme.vader new file mode 100644 index 0000000..7988add --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/fixme.vader @@ -0,0 +1,24 @@ +Include: include/setup.vader + +# It is currently possible that EasyAlign command incorrectly judges +# that it was executed in block-wise visual mode +Given: + a|b|c + +Do (FIXME invalid judgement - block-wise visual mode): + \\ + :%EasyAlign|\ + +Expect: + a | b | c + +Do (TODO Workaround: reset visualmode() on error): + \\ + :%EasyAlign|\ + :%EasyAlign|\ + +Expect: + a | b | c + +Include: include/teardown.vader + diff --git a/vim/.config/vim/plugged/vim-easy-align/test/include/setup.vader b/vim/.config/vim/plugged/vim-easy-align/test/include/setup.vader new file mode 100644 index 0000000..30f6d01 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/include/setup.vader @@ -0,0 +1,38 @@ +Execute (Clean up test environment): + Save g:easy_align_ignore_groups, g:easy_align_ignore_unmatched + Save g:easy_align_indentation, g:easy_align_delimiter_align + Save g:easy_align_interactive_modes, g:easy_align_bang_interactive_modes + Save g:easy_align_delimiters, g:easy_align_bypass_fold + Save &tabstop, mapleader + + unlet! g:easy_align_ignore_groups + unlet! g:easy_align_ignore_unmatched + unlet! g:easy_align_indentation + unlet! g:easy_align_delimiter_align + unlet! g:easy_align_interactive_modes + unlet! g:easy_align_bang_interactive_modes + unlet! g:easy_align_bypass_fold + + let g:easy_align_delimiters = {} + let mapleader = ' ' + vnoremap r :EasyAlign! + vnoremap r :LiveEasyAlign! + + " " Legacy + " vnoremap :EasyAlign + " vnoremap :LiveEasyAlign + " nmap A (EasyAlignOperator) + + set ts=2 + + vmap (EasyAlign) + vmap (LiveEasyAlign) + nmap A (EasyAlign) + vmap . (EasyAlignRepeat) + + silent! call plug#load('vim-easy-align') + +Before: +After: +Given: + diff --git a/vim/.config/vim/plugged/vim-easy-align/test/include/teardown.vader b/vim/.config/vim/plugged/vim-easy-align/test/include/teardown.vader new file mode 100644 index 0000000..0e2fe6d --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/include/teardown.vader @@ -0,0 +1,4 @@ +Given: +Execute (Restoring test environment): + Restore + diff --git a/vim/.config/vim/plugged/vim-easy-align/test/interactive.vader b/vim/.config/vim/plugged/vim-easy-align/test/interactive.vader new file mode 100644 index 0000000..e39fe57 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/interactive.vader @@ -0,0 +1,1886 @@ +Include: include/setup.vader + +########################################################### + +Given (space-separated columns): + 1 22222 33 444 555 6666 7 888 + 11 222 3333 4 55 6666 77 888 + 111 22 333 444 55555 6666 7 88888 + 1111 2 33 444 555 66 777 8 + +Do (left-align): + vip + \ + *\ + +Expect: + 1 22222 33 444 555 6666 7 888 + 11 222 3333 4 55 6666 77 888 + 111 22 333 444 55555 6666 7 88888 + 1111 2 33 444 555 66 777 8 + +Do (left-align / cursor position retained): + vGww + \ + *\D + +Expect: + 1 22222 33 444 555 6666 7 888 + 11 222 3333 4 55 6666 77 888 + 111 22 333 444 55555 6666 7 88888 + 1111 2 + +Do (left-align using operator map): + \Aip*\ + +Expect: + 1 22222 33 444 555 6666 7 888 + 11 222 3333 4 55 6666 77 888 + 111 22 333 444 55555 6666 7 88888 + 1111 2 33 444 555 66 777 8 + +Do (right-align): + vip + \\ + *\ + +Expect: + 1 22222 33 444 555 6666 7 888 + 11 222 3333 4 55 6666 77 888 + 111 22 333 444 55555 6666 7 88888 + 1111 2 33 444 555 66 777 8 + +Do (center-align): + vip + \\\ + *\ + +Expect: + 1 22222 33 444 555 6666 7 888 + 11 222 3333 4 55 6666 77 888 + 111 22 333 444 55555 6666 7 88888 + 1111 2 33 444 555 66 777 8 + +Given (comma-separated columns): + a,,bbb + aa,,bb + aaa,,b + aaaa,, + aaa,b, + aa,bb, + a,bbb, + +Do (left-align): + vip + \ + *, + +Expect: + a, , bbb + aa, , bb + aaa, , b + aaaa, , + aaa, b, + aa, bb, + a, bbb, + +Do (right-align): + vip + \\ + *, + +Expect: + a, , bbb + aa, , bb + aaa, , b + aaaa, , + aaa, b, + aa, bb, + a, bbb, + +Do (center-align): + vip + \\\ + *, + +Expect: + a, , bbb + aa, , bb + aaa, , b + aaaa, , + aaa, b, + aa, bb, + a, bbb, + +########################################################### + +Given (the beatles): + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (around first space): + vip + \ + \ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (around second space): + vip + \ + 2\ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (around all spaces): + vip + \ + *\ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (right-align around all spaces): + vip + \\ + *\ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (center-align around all spaces): + vip + \\\ + *\ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (center-align around the last space): + vip + \\\ + -\ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (right-align around second space): + vip + \\ + 2\ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (left-right alternating alignment): + vip + \ + **\ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (right-left alternating alignment): + vip + \\ + **\ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (with numeric left/right margin): + vip + \ + * + \2\ + \ + \5\ + * + \ + +Expect: + Paul McCartney 1942 + George Harrison 1943mmdd + Ringo Starr 1940mm + Pete Best 1941 + +Do (with string left/right margin): + vip + \ + \lft\ + \rgt\ + *\ + +Expect: + Paul lft rgtMcCartneylft rgt1942 + Georgelft rgtHarrison lft rgt1943mmdd + Ringo lft rgtStarr lft rgt1940mm + Pete lft rgtBest lft rgt1941 + +Execute (with regular expression): + 1,4EasyAlign*/../ + +Expect: + Pa ul Mc Ca rt ne y 19 42 + Ge or ge Ha rr is on 19 43 mm dd + Ri ng o St ar r 19 40 mm + Pe te Be st 19 41 + +########################################################### + +Given ruby (delimiters in comments and strings): + xyz="abc=def" + a=b#=c + +Do (align around all =): + vip + \*= + +Expect ruby (are not aligned): + xyz = "abc=def" + a = b#=c + +########################################################### + +Given javascript (json): + var jdbc = { + // JDBC driver for MySQL database: + driver: "com.mysql.jdbc.Driver", + /* JDBC URL for the connection (jdbc:mysql://HOSTNAME/DATABASE) */ + url: 'jdbc:mysql://localhost/test', + database: "test", + "user:pass":"r00t:pa55" + }; + +Do (around colons): + vip\*: + +Expect javascript: + var jdbc = { + // JDBC driver for MySQL database: + driver: "com.mysql.jdbc.Driver", + /* JDBC URL for the connection (jdbc:mysql://HOSTNAME/DATABASE) */ + url: 'jdbc:mysql://localhost/test', + database: "test", + "user:pass": "r00t:pa55" + }; + +Do (around colons, do not stick to left): + vip\*\: + +Expect javascript: + var jdbc = { + // JDBC driver for MySQL database: + driver : "com.mysql.jdbc.Driver", + /* JDBC URL for the connection (jdbc:mysql://HOSTNAME/DATABASE) */ + url : 'jdbc:mysql://localhost/test', + database : "test", + "user:pass" : "r00t:pa55" + }; + +Do (around first colon, do not ignore comments and strings): + vip\\*: + +Expect javascript: + var jdbc = { + // JDBC driver for MySQL database: + driver: "com.mysql.jdbc.Driver", + /* JDBC URL for the connection (jdbc: mysql: //HOSTNAME/DATABASE) */ + url: 'jdbc: mysql: //localhost/test', + database: "test", + "user: pass": "r00t: pa55" + }; + +Do (do not ignore comments and strings, do not ignore unmatched): + vip\\\*: + +Expect javascript: + var jdbc = { + // JDBC driver for MySQL database: + driver: "com.mysql.jdbc.Driver", + /* JDBC URL for the connection (jdbc: mysql: //HOSTNAME/DATABASE) */ + url: 'jdbc: mysql: //localhost/test', + database: "test", + "user: pass": "r00t: pa55" + }; + +Execute (set g:easy_align_ignore_groups and g:easy_align_ignore_unmatched): + let g:easy_align_ignore_unmatched = 0 + let g:easy_align_ignore_groups = [] + +Do (do not ignore comments and strings, do not ignore unmatched using global vars): + vip\*: + +Expect javascript: + var jdbc = { + // JDBC driver for MySQL database: + driver: "com.mysql.jdbc.Driver", + /* JDBC URL for the connection (jdbc: mysql: //HOSTNAME/DATABASE) */ + url: 'jdbc: mysql: //localhost/test', + database: "test", + "user: pass": "r00t: pa55" + }; + +Execute (unset g:easy_align_ignore_groups and g:easy_align_ignore_unmatched): + unlet g:easy_align_ignore_unmatched + unlet g:easy_align_ignore_groups + +########################################################### + +Given (table): + | Option| Type | Default | Description | + |--|--|--|--| + | threads | Fixnum | 1 | number of threads in the thread pool | + |queues |Fixnum | 1 | number of concurrent queues | + |queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + |batch | Boolean | false | enables batch processing mode | + |batch_size | Fixnum | nil | number of maximum items to be assigned at once | + |logger | Logger | nil | logger instance for debug logs | + +Do (around all |): + vip\*| + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues | Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +Do (around all |, and right-align 3rd and center-align the last): + vip\*| + gv\\3| + gv\\\-| + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues | Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +Do (Left-right alternating alignment): + vip\**| + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues | Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +Do (Right-left alternating alignment): + vip\\**| + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues | Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +Do (Right-left alternating alignment, indent: deep): + vip\\**\\| + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues | Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +# Doesn't work. Why? +# Do (Repeat the last command): +# :%\=g:easy_align_last_command\\ + +Execute (Repeat the last command): + Log g:easy_align_last_command + execute '%'.g:easy_align_last_command + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues | Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +Do (around all | with no margin, right-align 2nd to last): + vip\\0\\0\*| + vip\\\0\\0\-2| + +Expect: + |Option |Type |Default|Description | + |-- |-- | --|-- | + |threads |Fixnum | 1|number of threads in the thread pool | + |queues |Fixnum | 1|number of concurrent queues | + |queue_size|Fixnum | 1000|size of each queue | + |interval |Numeric| 0|dispatcher interval for batch processing | + |batch |Boolean| false|enables batch processing mode | + |batch_size|Fixnum | nil|number of maximum items to be assigned at once| + |logger |Logger | nil|logger instance for debug logs | + +Do (live interactive mode): + vip\\ + | + \(\ + \)\ + *** + ** + \\\ + **|\| + +Expect: + |)Option (|) Type(|)Default(|) Description(| + |)-- (|) --(|)-- (|) --(| + |)threads (|) Fixnum(|)1 (|) number of threads in the thread pool(| + |)queues (|) Fixnum(|)1 (|) number of concurrent queues(| + |)queue_size(|) Fixnum(|)1000 (|) size of each queue(| + |)interval (|)Numeric(|)0 (|) dispatcher interval for batch processing(| + |)batch (|)Boolean(|)false (|) enables batch processing mode(| + |)batch_size(|) Fixnum(|)nil (|)number of maximum items to be assigned at once(| + |)logger (|) Logger(|)nil (|) logger instance for debug logs(| + +Do (Switching to live interactive mode): + vip\ +* Switch to live interactive mode + \ + | + \<\ + \>\ + *** + ** + \\\ + **|\| + +Expect: + |>Option <|> Type<|>Default<|> Description<| + |>-- <|> --<|>-- <|> --<| + |>threads <|> Fixnum<|>1 <|> number of threads in the thread pool<| + |>queues <|> Fixnum<|>1 <|> number of concurrent queues<| + |>queue_size<|> Fixnum<|>1000 <|> size of each queue<| + |>interval <|>Numeric<|>0 <|> dispatcher interval for batch processing<| + |>batch <|>Boolean<|>false <|> enables batch processing mode<| + |>batch_size<|> Fixnum<|>nil <|>number of maximum items to be assigned at once<| + |>logger <|> Logger<|>nil <|> logger instance for debug logs<| + +Do (Toggling live interactive mode (delimiter entered)): + vip\ +* Enable live mode + \ + |* +* Disable live mode + \ + gg2jdG + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + +Do (Toggling live interactive mode (delimiter not entered)): + vip\ +* Enable live mode + \ + \ +* Disable live mode + \ + *| + gg2jdG + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + +Do (live interactive mode!): + vip\r\ + | + \[\ + \]\ + *** + ** + \\\ + ** + \\ + \|\ + \ + \ + +Expect: + [|] Option[|]Type [|]Default[|]Description [| + [|] --[|]-- [|] --[|]-- [| + [|] threads[|]Fixnum [|] 1[|]number of threads in the thread pool [| + [|] queues[|]Fixnum [|] 1[|]number of concurrent queues [| + [|]queue_size[|]Fixnum [|] 1000[|]size of each queue [| + [|] interval[|]Numeric[|] 0[|]dispatcher interval for batch processing [| + [|] batch[|]Boolean[|] false[|]enables batch processing mode [| + [|]batch_size[|]Fixnum [|] nil[|]number of maximum items to be assigned at once[| + [|] logger[|]Logger [|] nil[|]logger instance for debug logs [| + +Execute (g:easy_align_last_command should be set): + Assert exists('g:easy_align_last_command') + unlet g:easy_align_last_command + +Do: + vip\\**|\ + +Execute (g:easy_align_last_command should not be set if interrupted): + Assert !exists('g:easy_align_last_command') + +Do (g:easy_align_nth is not set (work with default value 1)): + vip\| + +Expect: + | Option| Type | Default | Description | + | --|--|--|--| + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues |Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +Execute (set g:easy_align_nth): + let g:easy_align_nth = '2' + +Do (g:easy_align_nth is set as 2): + vip\| + +Expect: + | Option | Type | Default | Description | + |-- | --|--|--| + | threads | Fixnum | 1 | number of threads in the thread pool | + |queues | Fixnum | 1 | number of concurrent queues | + |queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + |batch | Boolean | false | enables batch processing mode | + |batch_size | Fixnum | nil | number of maximum items to be assigned at once | + |logger | Logger | nil | logger instance for debug logs | + +Execute (unset g:easy_align_nth): + unlet g:easy_align_nth + +Execute (set g:easy_align_nth): + let g:easy_align_nth = '*' + +Do (g:easy_align_nth is set as *): + vip\| + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues | Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +Execute (unset g:easy_align_nth): + unlet g:easy_align_nth + +Execute (set g:easy_align_nth): + let g:easy_align_nth = '**' + +Do (g:easy_align_nth is set as **): + vip\| + +Expect: + | Option | Type | Default | Description | + | -- | -- | -- | -- | + | threads | Fixnum | 1 | number of threads in the thread pool | + | queues | Fixnum | 1 | number of concurrent queues | + | queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + | batch | Boolean | false | enables batch processing mode | + | batch_size | Fixnum | nil | number of maximum items to be assigned at once | + | logger | Logger | nil | logger instance for debug logs | + +Execute (unset g:easy_align_nth): + unlet g:easy_align_nth + +Execute (set g:easy_align_nth): + let g:easy_align_nth = '-' + +Do (g:easy_align_nth is set as -): + vip\| + +Expect: + | Option| Type | Default | Description | + |--|--|--|-- | + | threads | Fixnum | 1 | number of threads in the thread pool | + |queues |Fixnum | 1 | number of concurrent queues | + |queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + |batch | Boolean | false | enables batch processing mode | + |batch_size | Fixnum | nil | number of maximum items to be assigned at once | + |logger | Logger | nil | logger instance for debug logs | + +Execute (unset g:easy_align_nth): + unlet g:easy_align_nth + +Execute (set g:easy_align_nth): + let g:easy_align_nth = '-2' + +Do (g:easy_align_nth is set as -2): + vip\| + +Expect: + | Option| Type | Default | Description | + |--|--|-- | --| + | threads | Fixnum | 1 | number of threads in the thread pool | + |queues |Fixnum | 1 | number of concurrent queues | + |queue_size | Fixnum | 1000 | size of each queue | + | interval | Numeric | 0 | dispatcher interval for batch processing | + |batch | Boolean | false | enables batch processing mode | + |batch_size | Fixnum | nil | number of maximum items to be assigned at once | + |logger | Logger | nil | logger instance for debug logs | + +Execute (unset g:easy_align_nth): + unlet g:easy_align_nth + +########################################################### + +Given (comma-separated items): + aaa, bb,c + d,eeeeeee + fffff, gggggggggg, + h, , ii + j,,k + +Do (around all commas): + vip\*, + +Expect: + aaa, bb, c + d, eeeeeee + fffff, gggggggggg, + h, , ii + j, , k + +Do (around all commas, do not stick to left): + vip\\*, + +Expect: + aaa , bb , c + d , eeeeeee + fffff , gggggggggg , + h , , ii + j , , k + +Do (center-align around all commas): + vip\\\*, + +Expect: + aaa, bb, c + d, eeeeeee + fffff, gggggggggg, + h, , ii + j, , k + +########################################################### + +Given ruby (multi-line ruby Hash): + options = { :caching => nil, + :versions => 3, + "cache=blocks" => false }.merge(options) + +Do (around the last =): + vip\-= + +Expect ruby: + options = { :caching => nil, + :versions => 3, + "cache=blocks" => false }.merge(options) + +Do (partial alignment): + f: + \jj3E + \\= + +Expect ruby: + options = { :caching => nil, + :versions => 3, + "cache=blocks" => false }.merge(options) + +########################################################### + +Given c (C code with comments 1): + /* a */ b = c + aa >= bb + // aaa = bbb = cccc + /* aaaa = */ bbbb === cccc " = dddd = " = eeee + aaaaa /* bbbbb */ == ccccc /* != eeeee = */ === fffff + +Do: + vip\*= + +Expect c: + /* a */ b = c + aa >= bb + // aaa = bbb = cccc + /* aaaa = */ bbbb === cccc " = dddd = " = eeee + aaaaa /* bbbbb */ == ccccc /* != eeeee = */ === fffff + +Do: + vip\\\*= + +Expect c: + /* a */ b = c + aa >= bb + // aaa = bbb = cccc + /* aaaa = */ bbbb === cccc " = dddd = " = eeee + aaaaa /* bbbbb */ == ccccc /* != eeeee = */ === fffff + +########################################################### + +Given c (C code with comments 2): + int a = 1; + long b = 2; + float c = 3; + string d = 4; + // this line should not get aligned + long int e = 5; + std::map f; + std::map g; /* this? */ + short h /* how about this? */ = 6; + string i = "asdf"; + +Do (around =): + vip\= + +Expect c: + int a = 1; + long b = 2; + float c = 3; + string d = 4; + // this line should not get aligned + long int e = 5; + std::map f; + std::map g; /* this? */ + short h /* how about this? */ = 6; + string i = "asdf"; + +Do (right-align around =, comment lines are ignored): + vip\\= + +Expect c: + int a = 1; + long b = 2; + float c = 3; + string d = 4; + // this line should not get aligned + long int e = 5; + std::map f; + std::map g; /* this? */ + short h /* how about this? */ = 6; + string i = "asdf"; + +Do (right-align around =, do not ignore comment lines): + vip\\\= + +Expect c: + int a = 1; + long b = 2; + float c = 3; + string d = 4; + // this line should not get aligned + long int e = 5; + std::map f; + std::map g; /* this? */ + short h /* how about this? */ = 6; + string i = "asdf"; + +########################################################### + +Given ruby (= operators): + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee === eee = eee = eee=f + fff = ggg += gg &&= gg + g != hhhhhhhh == # 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<= 123 + aa >>= 123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&= 123 + dddddd ||= 123 + dddddd /= 123 + gg <=> ee + +Do (1st =): + vip\= + +Expect ruby: + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee === eee = eee = eee=f + fff = ggg += gg &&= gg + g != hhhhhhhh == # 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<= 123 + aa >>= 123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&= 123 + dddddd ||= 123 + dddddd /= 123 + gg <=> ee + +Do (LR =): + vip\**= + +Expect ruby: + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee === eee = eee = eee = f + fff = ggg += gg &&= gg + g != hhhhhhhh == # 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<= 123 + aa >>= 123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&= 123 + dddddd ||= 123 + dddddd /= 123 + gg <=> ee + +Do (DEPRECATED: Alignment using mode_sequence, delimiter_align): + vip\\\cr*\\= + +Expect ruby: + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee === eee = eee = eee = f + fff = ggg += gg &&= gg + g != hhhhhhhh == # 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<= 123 + aa >>= 123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&= 123 + dddddd ||= 123 + dddddd /= 123 + gg <=> ee + +Do (Alignment using align, delimiter_align): + vip\\\cr*\\= + +Expect ruby: + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee === eee = eee = eee = f + fff = ggg += gg &&= gg + g != hhhhhhhh == # 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<= 123 + aa >>= 123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&= 123 + dddddd ||= 123 + dddddd /= 123 + gg <=> ee + + +Do (DEPRECATED: mode_sequence starting from 2nd, delimiter_align = center): + vip\\\rc**\\\2= + +Expect ruby: + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee === eee = eee = eee = f + fff = ggg += gg &&= gg + g != hhhhhhhh == # 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<= 123 + aa >>= 123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&= 123 + dddddd ||= 123 + dddddd /= 123 + gg <=> ee + +Do (align starting from 2nd, delimiter_align = center): + vip\\\rc**\\\2= + +Expect ruby: + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee === eee = eee = eee = f + fff = ggg += gg &&= gg + g != hhhhhhhh == # 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<= 123 + aa >>= 123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&= 123 + dddddd ||= 123 + dddddd /= 123 + gg <=> ee + +Do (around all =s, do not ignore unmatched): + vip\\ + \0\ + \0\ + \\ + *= + +Expect ruby: + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee ===eee = eee = eee=f + fff = ggg +=gg &&=gg + g != hhhhhhhh==# 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<=123 + aa >>=123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&=123 + dddddd ||=123 + dddddd /= 123 + gg <=>ee + +Do (Center-align around 2nd =): + vip\\\2= + +Expect ruby: + a = + a = 1 + bbbb .= 2 + ccccccc = 3 + ccccccccccccccc + ddd = # + eeee === eee = eee = eee=f + fff = ggg += gg &&= gg + g != hhhhhhhh == # 8 + i := 5 + i %= 5 + i *= 5 + j =~ 5 + j >= 5 + aa => 123 + aa <<= 123 + aa >>= 123 + bbb => 123 + c => 1233123 + d => 123 + dddddd &&= 123 + dddddd ||= 123 + dddddd /= 123 + gg <=> ee + +########################################################### + +Given ruby (Trailing ruby line comment): + apple = 1 # comment not aligned + apricot = 'DAD' + 'F#AD' + banana = 'Gros Michel' ## comment 2 + +Do (around the last spaces): + vip\-\ + +Expect ruby: + apple = 1 # comment not aligned + apricot = 'DAD' + 'F#AD' + banana = 'Gros Michel' ## comment 2 + +Do (using # rule): + vip\\# + +Expect ruby: + apple = 1 # comment not aligned + apricot = 'DAD' + 'F#AD' + banana = 'Gros Michel' ## comment 2 + +Do (using regular expression): + vip\= + gv\ + \\\ + \ + \#\+\ + +Expect ruby: + apple = 1 # comment not aligned + apricot = 'DAD' + 'F#AD' + banana = 'Gros Michel' ## comment 2 + +########################################################### + +Given (method chain): + my_object + .method1.chain + .second_method.call + .third.call + .method_4.execute + +Do (around all .): + vip\*. + +Expect: + my_object + .method1 .chain + .second_method.call + .third .call + .method_4 .execute + +Do (around all . with deep indentation): + vip\\\*. + +Expect: + my_object + .method1 .chain + .second_method.call + .third .call + .method_4 .execute + +Execute (set g:easy_align_indentation): + let g:easy_align_indentation = 'd' + +Do (around all . with deep indentation): + vip\*. + +Expect: + my_object + .method1 .chain + .second_method.call + .third .call + .method_4 .execute + +Execute (unset g:easy_align_indentation): + unlet g:easy_align_indentation + +Do (right-align around all .): + vip\\*. + +Expect: + my_object + . method1. chain + .second_method. call + . third. call + . method_4.execute + +########################################################### + +Execute (define d rule): + let g:easy_align_delimiters.d = + \ { 'pattern': '\s\+\(\S\+\s*[;=]\)\@=', 'left_margin': 0, 'right_margin': 0 } + +Given c (complex var dec): + const char* str = "Hello"; + int64_t count = 1 + 2; + static double pi = 3.14; + static std::map* scores = pointer; + +Do (using d rule): + vip\d + gv\= + +Expect c: + const char* str = "Hello"; + int64_t count = 1 + 2; + static double pi = 3.14; + static std::map* scores = pointer; + +########################################################### + +Given (indented code): + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do: + vip\= + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do (shallow indentation): + vip\\= + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do (deep indentation): + vip\\\= + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do (no indentation): + vip\\\\= + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do (right-align, shallow indentation): + vip\\\= + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do (center-align, shallow indentation): + vip\\\\= + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do (right-align, deep indentation): + vip\\\\= + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do (center-align, deep indentation): + vip\\\\\= + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Do (right-align, no indentation): + vip\\\\\= + +########################################################### + +Expect: + apple = 1 + banana = 2 + cake = 3 + daisy = 4 + eggplant = 5 + +Given (Center-align cases): + aaaa = 123456778901234567890 = + cccccccccccccc = 12345678 = + + aaaa = 123456778901234567890 = + bbbbbb = 4 + cccccccccccccccccc = 12345678 = + + aaaa = 123456778901234567890 = + cccccccccccccccccc = 12345678 = + + aaaaa = 123456778901234567890 = + cc = 12345678 = + + aaaaa = 123456778901234567890 = + bbbbbbbbbb = 12345 = + + aaaaa = 123456778901234567890 = + cccccccccccccccccc = 123 = + + aaaaa = 123456778901234567890 = + cccccccccccccccccc = 12345678 = + + aaaaa = 12345 = + bbbbbbbbbb = 123456778901234567890 = + + aaaaa = 12345 + bbbbbbbbbb = 123456778901234567890 + +Do: + vip\\\= + }jvip\\\= + }jvip\\\= + }jvip\\\= + }jvip\\\2= + }jvip\\\2= + }jvip\\\2= + }jvip\\\2= + }jvip\\\2= + +Expect: + aaaa = 123456778901234567890 = + cccccccccccccc = 12345678 = + + aaaa = 123456778901234567890 = + bbbbbb = 4 + cccccccccccccccccc = 12345678 = + + aaaa = 123456778901234567890 = + cccccccccccccccccc = 12345678 = + + aaaaa = 123456778901234567890 = + cc = 12345678 = + + aaaaa = 123456778901234567890 = + bbbbbbbbbb = 12345 = + + aaaaa = 123456778901234567890 = + cccccccccccccccccc = 123 = + + aaaaa = 123456778901234567890 = + cccccccccccccccccc = 12345678 = + + aaaaa = 12345 = + bbbbbbbbbb = 123456778901234567890 = + + aaaaa = 12345 + bbbbbbbbbb = 123456778901234567890 + +########################################################### + +Given (long delimiter): + ...-.----- + ..--..---- + .---...--- + ----....-- + .---.....- + ..--...... + ...-.....- + +Do: + vip\*\-\+\ + +Expect: + ... - . ----- + .. -- .. ---- + . --- ... --- + ---- .... -- + . --- ..... - + .. -- ...... + ... - ..... - + +Do: + vip\*\\-\+\ + +Expect: + ... - . ----- + .. -- .. ---- + . --- ... --- + ---- .... -- + . --- ..... - + .. -- ...... + ... - ..... - + +Do: + vip\*\\\-\+\ + +Expect: + ... - . ----- + .. -- .. ---- + . --- ... --- + ---- .... -- + . --- ..... - + .. -- ...... + ... - ..... - + +Execute (set g:easy_align_delimiter_align): + let g:easy_align_delimiter_align = 'c' + +Do: + vip\*\-\+\ + +Expect: + ... - . ----- + .. -- .. ---- + . --- ... --- + ---- .... -- + . --- ..... - + .. -- ...... + ... - ..... - + +Execute (unset g:easy_align_delimiter_align): + unlet g:easy_align_delimiter_align + +########################################################### + +Execute (set g:easy_align_interactive_modes): + let g:easy_align_interactive_modes = ['r', 'c'] + let g:easy_align_bang_interactive_modes = ['c', 'l'] + +Given (Test g:easy_align_interactive_modes): + a = 1 + bb = 2 + ccc = 3 + +Do: + vip\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Do: + vip\\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Do: + vipr\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Do: + vipr\\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Do: + vipr\\\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Execute (unset g:easy_align_interactive_modes): + unlet g:easy_align_interactive_modes + unlet g:easy_align_bang_interactive_modes + +########################################################### + +Given (Test ignore_unmatched behavior): + a = b = c + aabba = bbbbb + +Do (left-align): + vip\*= + +Expect: + a = b = c + aabba = bbbbb + +Do (left-align, no ignore_unmatched): + vip\\*= + +Expect: + a = b = c + aabba = bbbbb + +Do (right-align): + vip\\*= + +Expect: + a = b = c + aabba = bbbbb + +Do (right-align, explicit ignore_unmatched): + vip\\\\*= + +Expect: + a = b = c + aabba = bbbbb + +Do (center-align): + vip\\\*= + +Expect: + a = b = c + aabba = bbbbb + +Do (center-align): + vip\\\\\*= + +Expect: + a = b = c + aabba = bbbbb + +########################################################### + +Given (test filter option): + aaa=aaa=aaa + aaaaa=aaaaa=aaaaa + aaaaaaa=aaaaaaa=aaaaaaab + bbbbb=bbbbb=bbbbb + aaa=aaa=aaa + +Do (g/a/): + vip\ + \g/a/\ + *= + +Expect: + aaa = aaa = aaa + aaaaa = aaaaa = aaaaa + aaaaaaa = aaaaaaa = aaaaaaab + bbbbb=bbbbb=bbbbb + aaa = aaa = aaa + +Do (g/a - you can omit the trailing /): + vip\ + \g/a\ + *= + +Expect: + aaa = aaa = aaa + aaaaa = aaaaa = aaaaa + aaaaaaa = aaaaaaa = aaaaaaab + bbbbb=bbbbb=bbbbb + aaa = aaa = aaa + +Do (v/b/): + vip\ + \v/b/\ + *= + +Expect: + aaa = aaa = aaa + aaaaa = aaaaa = aaaaa + aaaaaaa=aaaaaaa=aaaaaaab + bbbbb=bbbbb=bbbbb + aaa = aaa = aaa + +Do (invalid filter expression): + vip\ + \haha\ + *= + +Expect: + aaa = aaa = aaa + aaaaa = aaaaa = aaaaa + aaaaaaa = aaaaaaa = aaaaaaab + bbbbb = bbbbb = bbbbb + aaa = aaa = aaa + +Execute (g-filter in shorthand notation): + %EasyAlign*=g/a/ + +Expect: + aaa = aaa = aaa + aaaaa = aaaaa = aaaaa + aaaaaaa = aaaaaaa = aaaaaaab + bbbbb=bbbbb=bbbbb + aaa = aaa = aaa + +Execute (v-filter in shorthand notation): + %EasyAlign*=v/b/ + +Expect: + aaa = aaa = aaa + aaaaa = aaaaa = aaaaa + aaaaaaa=aaaaaaa=aaaaaaab + bbbbb=bbbbb=bbbbb + aaa = aaa = aaa + +Execute (filter in dictionary format): + %EasyAlign*={'filter': 'v/b/'} + +Expect: + aaa = aaa = aaa + aaaaa = aaaaa = aaaaa + aaaaaaa=aaaaaaa=aaaaaaab + bbbbb=bbbbb=bbbbb + aaa = aaa = aaa + +Given clojure (filter with blockwise-visual mode): + (let [a 1 + bbb 2 + ccccc (range + 10 20)] + (prn [a bbb ccccc])) + +Do (filter with blockwise-visual mode): + f[ + vi[ + \ + \ + \g/^\S\ + \ + +Expect clojure: + (let [a 1 + bbb 2 + ccccc (range + 10 20)] + (prn [a bbb ccccc])) + +Given clojure: + {:user {:plugins [[cider/cider-nrepl "0.9.1"] + [lein-kibit "0.0.8"] + [lein-licenses "0.1.1"] + [lein-marginalia "0.8.0"] ; lein marg + [codox "0.8.13"] ; lein doc + [com.jakemccrary/lein-test-refresh "0.10.0"] ; lein test-refresh + [lein-pprint "1.1.2"] + [lein-exec "0.3.5"] + [jonase/eastwood "0.2.1"]] + :dependencies [[slamhound "1.5.5"]] + :aliases {"slamhound" ["run" "-m" "slam.hound"]} + :signing {:gpg-key "FEF9C627"}}} + +Do (Virtual column should be used in blockwise-visual mode): + :set ve=block\ + f[ + vi[ + \ + $20l + \\ + +Expect clojure: + {:user {:plugins [[cider/cider-nrepl "0.9.1"] + [lein-kibit "0.0.8"] + [lein-licenses "0.1.1"] + [lein-marginalia "0.8.0"] ; lein marg + [codox "0.8.13"] ; lein doc + [com.jakemccrary/lein-test-refresh "0.10.0"] ; lein test-refresh + [lein-pprint "1.1.2"] + [lein-exec "0.3.5"] + [jonase/eastwood "0.2.1"]] + :dependencies [[slamhound "1.5.5"]] + :aliases {"slamhound" ["run" "-m" "slam.hound"]} + :signing {:gpg-key "FEF9C627"}}} + +Then: + set ve= + +########################################################### + +Given (hard-tab indentation (#19)): + a=1=3 + bbb=2=4 + ccccc=4=5 + fff=4=6 + +Do (Left alignment): + vip\= + +Expect: + a = 1=3 + bbb = 2=4 + ccccc = 4=5 + fff = 4=6 + +Do (Right alignment): + vip\\= + +Expect: + a = 1=3 + bbb = 2=4 + ccccc = 4=5 + fff = 4=6 + +Do (Center alignment): + vip\\\= + +Expect: + a = 1=3 + bbb = 2=4 + ccccc = 4=5 + fff = 4=6 + +Do (Left alignment with shallow indentation): + vip\\= + +Expect: + a = 1=3 + bbb = 2=4 + ccccc = 4=5 + fff = 4=6 + +Do (Center alignment with deep indentation): + vip\\\\\= + +Expect: + a = 1=3 + bbb = 2=4 + ccccc = 4=5 + fff = 4=6 + +Given (hard-tab indentation - dictionary (#19)): + ddict={'homePage':'360452', + 'key':'TEST', + 'name':'DocumentationAPITestingSpace', + 'type':'global', + 'url':'http://localhost:8090/display/TEST'} + +Do (Right alignment): + vip\\: + +Expect: + ddict={'homePage': '360452', + 'key': 'TEST', + 'name': 'DocumentationAPITestingSpace', + 'type': 'global', + 'url': 'http://localhost:8090/display/TEST'} + +########################################################### + +Given (Two paragraphs (requires vim-repeat)): + a = 1 + bb = 2 + ccc = 3 + dddd = 4 + + d = 1 + cc = 2 + bbb = 3 + aaaa = 4 + _____ = 5 + +Do (Align and repeat): + \Aip\= + 6G + . + +Expect: + a = 1 + bb = 2 + ccc = 3 + dddd = 4 + + d = 1 + cc = 2 + bbb = 3 + aaaa = 4 + _____ = 5 + +Do (Visual-mode operator is also repeatable): + vip\\= + 6G + . + +Expect: + a = 1 + bb = 2 + ccc = 3 + dddd = 4 + + d = 1 + cc = 2 + bbb = 3 + aaaa = 4 + _____ = 5 + +Do (Repeatable in visual mode): + 2GvG\. + +Expect: + a = 1 + bb = 2 + ccc = 3 + dddd = 4 + + d = 1 + cc = 2 + bbb = 3 + aaaa = 4 + _____ = 5 + +Given: + :: a : 1 + :: bb : 2 + :: ccc : 3 + :: dd : 4 + :: e : 5 + + :: :: a:1 + :: :: b :2 + :: :: ccc : 3 + :: :: dd : 4 + :: :: e : 5 + :: :: f : 6 + +Do (Blockwise-visual-operator is also repeatable): + fa + \ + f1 + 4j + \: + 7G0 + fa + . + +Expect: + :: a: 1 + :: bb: 2 + :: ccc: 3 + :: dd: 4 + :: e: 5 + + :: :: a: 1 + :: :: b: 2 + :: :: ccc: 3 + :: :: dd: 4 + :: :: e: 5 + :: :: f : 6 + +########################################################### + +Include: include/teardown.vader diff --git a/vim/.config/vim/plugged/vim-easy-align/test/run b/vim/.config/vim/plugged/vim-easy-align/test/run new file mode 100755 index 0000000..c5cdf35 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/run @@ -0,0 +1,11 @@ +#!/bin/bash + +cd $(dirname $BASH_SOURCE) + +vim -Nu <(cat << EOF +syntax on +for dep in ['vader.vim', 'vim-repeat'] + execute 'set rtp+=' . finddir(dep, expand('~/.vim').'/**') +endfor +set rtp+=.. +EOF) +Vader* diff --git a/vim/.config/vim/plugged/vim-easy-align/test/tex.vader b/vim/.config/vim/plugged/vim-easy-align/test/tex.vader new file mode 100644 index 0000000..cf1b48b --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/test/tex.vader @@ -0,0 +1,158 @@ +# http://en.wikibooks.org/wiki/LaTeX/Tables + +Include: include/setup.vader + +Given tex (table with escaped &): + \begin{tabular}{ l c r } + 1&2&3\\ + 44&55&66\\ + 777&8\&8&999\\ + \end{tabular} + +# FIXME vip doesn't work if folded +Do (Align around all &s and \\s): + VG\*& + +Expect tex: + \begin{tabular}{ l c r } + 1 & 2 & 3 \\ + 44 & 55 & 66 \\ + 777 & 8\&8 & 999 \\ + \end{tabular} + +Do (right-align with explicit ignore_unmatched): + VG\\\\*& + +Expect tex: + \begin{tabular}{ l c r } + 1 & 2 & 3 \\ + 44 & 55 & 66 \\ + 777 & 8\&8 & 999 \\ + \end{tabular} + +Do (center-align with explicit ignore_unmatched): + VG\\\\\*& + +Expect tex: + \begin{tabular}{ l c r } + 1 & 2 & 3 \\ + 44 & 55 & 66 \\ + 777 & 8\&8 & 999 \\ + \end{tabular} + +Given tex (simple table with \hline): + \begin{tabular}{ l c r } + 1&2&3\\ \hline + 44&55&66\\ \hline + 777&8\&&999\\ \hline + \end{tabular} + +Do: + VG\*& + +Expect tex: + \begin{tabular}{ l c r } + 1 & 2 & 3 \\ \hline + 44 & 55 & 66 \\ \hline + 777 & 8\& & 999 \\ \hline + \end{tabular} + +Given tex (table with lines w/o &s): + \begin{tabular}{|r|l|} + \hline + 7C0 & hexadecimal \\ + 3700&octal \\ \cline{2-2} + 1111100000 & binary \\ + \hline \hline + 1984 & decimal \\ + \hline + \end{tabular} + +Do (left-align*): + VG\*& + +Expect tex: + \begin{tabular}{|r|l|} + \hline + 7C0 & hexadecimal \\ + 3700 & octal \\ \cline{2-2} + 1111100000 & binary \\ + \hline \hline + 1984 & decimal \\ + \hline + \end{tabular} + +Do(left-align* and right-align around 2nd): + VG\*& + gv\\2& + +Expect tex: + \begin{tabular}{|r|l|} + \hline + 7C0 & hexadecimal \\ + 3700 & octal \\ \cline{2-2} + 1111100000 & binary \\ + \hline \hline + 1984 & decimal \\ + \hline + \end{tabular} + +Given tex: + \begin{tabular}{} + 32&1.14\e1&&5.65\e2&&&&1.16\e1&&1.28\e1&\\ + 64&1.03\e1&0.1&4.98\e2&0.2&&&9.21\e2&0.3&1.02\e1&0.3\\ + 128&9.86\e2&0.1&4.69\e2&0.1&&&8.46\e2&0.1&9.45\e2&0.1\\ + 256&9.65\e2&0.0&4.59\e2&0.0&&&8.15\e2&0.1&9.11\e2&0.1\\ + % 512&9.55\e2&0.0&4.56\e2&0.0&&&8.01\e2&0.0&8.96\e2&0.0\\ + 1024&9.49\e2&0.0&4.53\e2&0.0&&&7.94\e2&0.0&8.89\e2&0.0\\ + 2048&9.47\e2&0.0&4.52\e2&0.0&&&7.91\e2&0.0&8.85\e2&0.0\\ + 4096&9.46\e2&0.0&4.51\e2&0.0%&&&7.90\e2&0.0&8.83\e2&0.0\\ + 8192&9.45\e2&0.0&4.51\e2&0.0&&&&&&\\ + \end{tabular} + +Execute (Alignment around &s, foldmethod should not change): + setlocal foldmethod=syntax + %EasyAlign*& + AssertEqual 'syntax', &l:foldmethod + + setlocal foldmethod=manual + %EasyAlign*& + AssertEqual 'manual', &l:foldmethod + +Expect tex: + \begin{tabular}{} + 32 & 1.14\e1 & & 5.65\e2 & & & & 1.16\e1 & & 1.28\e1 & \\ + 64 & 1.03\e1 & 0.1 & 4.98\e2 & 0.2 & & & 9.21\e2 & 0.3 & 1.02\e1 & 0.3 \\ + 128 & 9.86\e2 & 0.1 & 4.69\e2 & 0.1 & & & 8.46\e2 & 0.1 & 9.45\e2 & 0.1 \\ + 256 & 9.65\e2 & 0.0 & 4.59\e2 & 0.0 & & & 8.15\e2 & 0.1 & 9.11\e2 & 0.1 \\ + % 512&9.55\e2&0.0&4.56\e2&0.0&&&8.01\e2&0.0&8.96\e2&0.0\\ + 1024 & 9.49\e2 & 0.0 & 4.53\e2 & 0.0 & & & 7.94\e2 & 0.0 & 8.89\e2 & 0.0 \\ + 2048 & 9.47\e2 & 0.0 & 4.52\e2 & 0.0 & & & 7.91\e2 & 0.0 & 8.85\e2 & 0.0 \\ + 4096 & 9.46\e2 & 0.0 & 4.51\e2 & 0.0%&&&7.90\e2&0.0&8.83\e2&0.0\\ + 8192 & 9.45\e2 & 0.0 & 4.51\e2 & 0.0 & & & & & & \\ + \end{tabular} + +Execute (g:easy_align_bypass_fold set, foldmethod should not change): + let g:easy_align_bypass_fold = 1 + setlocal foldmethod=syntax + %EasyAlign*& + AssertEqual 'syntax', &l:foldmethod + + setlocal foldmethod=manual + %EasyAlign*& + AssertEqual 'manual', &l:foldmethod + +Expect tex: + \begin{tabular}{} + 32 & 1.14\e1 & & 5.65\e2 & & & & 1.16\e1 & & 1.28\e1 & \\ + 64 & 1.03\e1 & 0.1 & 4.98\e2 & 0.2 & & & 9.21\e2 & 0.3 & 1.02\e1 & 0.3 \\ + 128 & 9.86\e2 & 0.1 & 4.69\e2 & 0.1 & & & 8.46\e2 & 0.1 & 9.45\e2 & 0.1 \\ + 256 & 9.65\e2 & 0.0 & 4.59\e2 & 0.0 & & & 8.15\e2 & 0.1 & 9.11\e2 & 0.1 \\ + % 512&9.55\e2&0.0&4.56\e2&0.0&&&8.01\e2&0.0&8.96\e2&0.0\\ + 1024 & 9.49\e2 & 0.0 & 4.53\e2 & 0.0 & & & 7.94\e2 & 0.0 & 8.89\e2 & 0.0 \\ + 2048 & 9.47\e2 & 0.0 & 4.52\e2 & 0.0 & & & 7.91\e2 & 0.0 & 8.85\e2 & 0.0 \\ + 4096 & 9.46\e2 & 0.0 & 4.51\e2 & 0.0%&&&7.90\e2&0.0&8.83\e2&0.0\\ + 8192 & 9.45\e2 & 0.0 & 4.51\e2 & 0.0 & & & & & & \\ + \end{tabular} + +Include: include/teardown.vader diff --git a/vim/.config/vim/plugged/vim-easy-align/zip b/vim/.config/vim/plugged/vim-easy-align/zip new file mode 100755 index 0000000..c600013 --- /dev/null +++ b/vim/.config/vim/plugged/vim-easy-align/zip @@ -0,0 +1,2 @@ +#!/bin/sh +git archive -o vim-easy-align.zip HEAD diff --git a/vim/.config/vim/plugged/vim-fireplace/.github/FUNDING.yml b/vim/.config/vim/plugged/vim-fireplace/.github/FUNDING.yml new file mode 100644 index 0000000..05a4968 --- /dev/null +++ b/vim/.config/vim/plugged/vim-fireplace/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: tpope +custom: ["https://www.paypal.me/vimpope"] diff --git a/vim/.config/vim/plugged/vim-fireplace/.gitignore b/vim/.config/vim/plugged/vim-fireplace/.gitignore new file mode 100644 index 0000000..6a82714 --- /dev/null +++ b/vim/.config/vim/plugged/vim-fireplace/.gitignore @@ -0,0 +1,2 @@ +/doc/tags +*.pyc diff --git a/vim/.config/vim/plugged/vim-fireplace/CONTRIBUTING.markdown b/vim/.config/vim/plugged/vim-fireplace/CONTRIBUTING.markdown new file mode 100644 index 0000000..e5d54ab --- /dev/null +++ b/vim/.config/vim/plugged/vim-fireplace/CONTRIBUTING.markdown @@ -0,0 +1,10 @@ +## Contributing + +Open [GitHub issues][] for bug reports and feature requests. + +I'm a stickler for [commit messages][], so if you send me a pull +request with so much as superfluous period in the subject line, I will +reject it, then TP your house. + +[GitHub issues]: http://github.com/tpope/vim-fireplace/issues +[commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html diff --git a/vim/.config/vim/plugged/vim-fireplace/README.markdown b/vim/.config/vim/plugged/vim-fireplace/README.markdown new file mode 100644 index 0000000..655f9f6 --- /dev/null +++ b/vim/.config/vim/plugged/vim-fireplace/README.markdown @@ -0,0 +1,128 @@ +# fireplace.vim + +There's a REPL in Fireplace, but you probably wouldn't have noticed if I hadn't +told you. Such is the way with fireplace.vim. By the way, this plugin is for +Clojure. + +## Installation + +First, set up [cider-nrepl][]. (If you skip this step, only a subset of +functionality will be available.) + +Install Fireplace using your favorite package manager, or use Vim's built-in +package support: + + mkdir -p ~/.vim/pack/tpope/start + cd ~/.vim/pack/tpope/start + git clone https://tpope.io/vim/fireplace.git + vim -u NONE -c "helptags fireplace/doc" -c q + +You might also want [salve.vim][] for assorted static project support. + +## Features + +This list isn't exhaustive; see the `:help` for details. + +### Transparent setup + +Fireplace talks to nREPL. With Leiningen and Boot, it connects automatically +using the `.nrepl-port` file created when you run `lein repl` or `boot repl`. +If you are starting nREPL some other way, run `:FireplaceConnect host:port`. +You can connect to multiple instances of nREPL for different projects, and it +will use the right one automatically. ClojureScript support is just as +seamless with [Piggieback][]. + +If you're using the new [Clojure CLI][], you can follow the instructions for +[running cider-nrepl with `clj`][cider-nrepl-via-clj]. +Briefly, `clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.21.1"} }}' +-m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"` should do the trick. +The [cider-nrepl][cider-nrepl-via-clj] docs also show you how you can add an alias to +your user's `~/.clojure/deps.edn` file, letting you more simply run `clj -A:cider-clj`. + +Oh, and if you don't have an nREPL connection, installing [salve.vim][] +lets it fall back to using `java clojure.main` for some of the basics, using a +class path based on your Leiningen or Boot config. It's a bit slow, but a +two-second delay is vastly preferable to being forced out of my flow for a +single command, in my book. + +[cider-nrepl]: https://docs.cider.mx/cider-nrepl/usage.html +[cider-nrepl-via-clj]: https://docs.cider.mx/cider-nrepl/usage.html#via-clj +[Piggieback]: https://github.com/nrepl/piggieback +[Clojure CLI]: https://clojure.org/guides/deps_and_cli +[classpath.vim]: https://github.com/tpope/vim-classpath +[salve.vim]: https://github.com/tpope/vim-salve + +### Not quite a REPL + +You know that one plugin that provides a REPL in a split window and works +absolutely flawlessly, never breaking just because you did something innocuous +like backspace through part of the prompt? No? Such a shame, you really +would have liked it. + +I've taken a different approach in Fireplace. `cq` (Think "Clojure +Quasi-REPL") is the prefix for a set of commands that bring up a *command-line +window* — the same thing you get when you hit `q:` — but set up for Clojure +code. + +`cqq` prepopulates the command-line window with the expression under the +cursor. `cqc` gives you a blank line in insert mode. + +### Evaluating from the buffer + +Standard stuff here. `:Eval` evaluates a range (`:%Eval` gets the whole +file), `:Require` requires a namespace with `:reload` (`:Require!` does +`:reload-all`), either the current buffer or a given argument. `:RunTests` +kicks off `(clojure.test/run-tests)` and loads the results into the quickfix +list. + +There's a `cp` operator that evaluates a given motion (`cpp` for the +innermost form under the cursor). `cm` and `c1m` are similar, but they only +run `clojure.walk/macroexpand-all` and `macroexpand-1` instead of evaluating +the form entirely. + +Any failed evaluation loads the stack trace into the location list, which +can be easily accessed with `:lopen`. + +### Navigating and Comprehending + +I was brand new to Clojure when I started this plugin, so stuff that helped me +understand code was a top priority. + +* `:Source`, `:Doc`, and `:FindDoc`, which map to the underlying + `clojure.repl` macro (with tab complete, of course). + +* `K` is mapped to look up the symbol under the cursor with `doc`. + +* `[d` is mapped to look up the symbol under the cursor with `source`. + +* `[` jumps to the definition of a symbol (even if it's inside a jar + file). `` does the same and uses the tag stack. + +* `gf`, everybody's favorite "go to file" command, works on namespaces. + +Where possible, I favor enhancing built-ins over inventing a bunch of +`` maps. + +### Omnicomplete + +Because why not? It works in the quasi-REPL too. + +## FAQ + +> Why does it take so long for Vim to start up? + +That's either [classpath.vim][] or [salve.vim][]. + +## Self-Promotion + +Like fireplace.vim? Follow the repository on +[GitHub](https://github.com/tpope/vim-fireplace) and vote for it on +[vim.org](http://www.vim.org/scripts/script.php?script_id=4978). And if +you're feeling especially charitable, follow [tpope](http://tpo.pe/) on +[Twitter](http://twitter.com/tpope) and +[GitHub](https://github.com/tpope). + +## License + +Copyright © Tim Pope. Distributed under the same terms as Vim itself. +See `:help license`. diff --git a/vim/.config/vim/plugged/vim-fireplace/autoload/fireplace.vim b/vim/.config/vim/plugged/vim-fireplace/autoload/fireplace.vim new file mode 100644 index 0000000..11bab6d --- /dev/null +++ b/vim/.config/vim/plugged/vim-fireplace/autoload/fireplace.vim @@ -0,0 +1,2589 @@ +" Location: autoload/fireplace.vim +" Author: Tim Pope + +if exists('g:autoloaded_fireplace') + finish +endif +let g:autoloaded_fireplace = 1 + +" Section: Utilities + +function! s:map(mode, lhs, rhs, ...) abort + if get(g:, 'fireplace_no_maps') + return + endif + let flags = (a:0 ? a:1 : '') . (a:rhs =~# '^' ? '' : '