# HG changeset patch # User Steve Losh # Date 1651786386 14400 # Node ID ea87bf0407c4b11c76565252026b41818e3adf53 # Parent 15f446854045ccb1965d908efa93285c0143fb7e# Parent f37e47cda7c4e31707ee8dcb0bdd846cec840de1 Merge diff -r 15f446854045 -r ea87bf0407c4 .hgsub --- a/.hgsub Thu May 05 17:31:55 2022 -0400 +++ b/.hgsub Thu May 05 17:33:06 2022 -0400 @@ -10,14 +10,11 @@ vim/bundle/delimitmate = [git]https://github.com/Raimondi/delimitMate vim/bundle/fugitive = [git]https://github.com/tpope/vim-fugitive vim/bundle/gdl = [hg]ssh://hg.stevelosh.com/repos/gdl.vim/ -vim/bundle/glsl = [git]https://github.com/tikhomirov/vim-glsl vim/bundle/gnupg = [git]https://github.com/jamessan/vim-gnupg vim/bundle/gnuplot = [git]https://github.com/vim-scripts/gnuplot.vim vim/bundle/gundo = [hg]ssh://hg.stevelosh.com/repos/gundo.vim/ vim/bundle/html5 = [git]https://github.com/othree/html5.vim -vim/bundle/indent-object = [git]https://github.com/michaeljsmith/vim-indent-object vim/bundle/javascript = [git]https://github.com/pangloss/vim-javascript -vim/bundle/jsx = [git]https://github.com/mxw/vim-jsx vim/bundle/markdown = [git]https://github.com/sjl/vim-markdown vim/bundle/miniyank = [git]https://github.com/bfredl/nvim-miniyank vim/bundle/neoformat = [git]https://github.com/sbdchd/neoformat @@ -30,10 +27,8 @@ vim/bundle/rhubarb = [git]https://github.com/tpope/vim-rhubarb vim/bundle/securemodelines = [git]https://github.com/ciaranm/securemodelines vim/bundle/sexp = [git]https://github.com/guns/vim-sexp -vim/bundle/shaderhighlight = [git]https://github.com/vim-scripts/ShaderHighLight vim/bundle/shellcheck = [git]https://github.com/itspriddle/vim-shellcheck vim/bundle/simpylfold = [git]https://github.com/tmhedberg/SimpylFold -vim/bundle/sparkup = [git]https://github.com/rstacruz/sparkup vim/bundle/splice = [hg]ssh://hg.stevelosh.com/repos/splice.vim vim/bundle/strftimedammit = [hg]ssh://hg.stevelosh.com/repos/strftimedammit.vim/ vim/bundle/surround = [git]https://github.com/tpope/vim-surround diff -r 15f446854045 -r ea87bf0407c4 .hgsubstate --- a/.hgsubstate Thu May 05 17:31:55 2022 -0400 +++ b/.hgsubstate Thu May 05 17:33:06 2022 -0400 @@ -10,14 +10,11 @@ 38487bbec8ba50834e257940b357de03991fa8f9 vim/bundle/delimitmate 755554bb3c44944f70f4b2048acf0c69261782ac vim/bundle/fugitive 127d706f2def96876605e6bd5d366c973cb8e406 vim/bundle/gdl -6ea4e1983b18cf440c8f800a3e94b57338a3e99f vim/bundle/glsl 7fcea1a08423da3012aac87f5224738c85d212a1 vim/bundle/gnupg 0d57b080f9fae8573c688b6679b31eb1666edc4c vim/bundle/gnuplot 1d84591fff04caebab75cba2294fc3843f0a4a29 vim/bundle/gundo fccd580f5f11d576169ee347907c9fbd77af410a vim/bundle/html5 -78fffa609b3e6b84ef01ee4c9aba6d7435d7b18e vim/bundle/indent-object dd84369d731bcb8feee0901cbb9b63a2b219bf28 vim/bundle/javascript -ffc0bfd9da15d0fce02d117b843f718160f7ad27 vim/bundle/jsx e2d7fcd682a461a3951e8b5067cc8a0083e75e35 vim/bundle/markdown 1362fdc7c32855794659cafe6e65d3239843d9df vim/bundle/miniyank 964c66fa22500ae7375114342d212d7fe15da341 vim/bundle/neoformat @@ -30,16 +27,14 @@ e57ed3b6be2c4a49656f1a816919f0af22fae324 vim/bundle/rhubarb 10d6c6b52fcdd12f3ba457126f66fee4ccceec04 vim/bundle/securemodelines b4398689f7483b01684044ab6b55bf369744c9b3 vim/bundle/sexp -e02c3e218c51c1e2ea1821a3fe412d4e09ca1502 vim/bundle/shaderhighlight 4346419ac57ef341a15aa39c827c0848f17c6faf vim/bundle/shellcheck 0459df8a0bbfc8ef1bfd88db889e881626f65914 vim/bundle/simpylfold -d400a570bf64b0c216aa7c8e1795820b911a7404 vim/bundle/sparkup 062b18eebd153c13e6f36577707acb17893cd959 vim/bundle/splice 26fbdd7d1f1aa5600d2ebf39bbdd292c38aac16e vim/bundle/strftimedammit aa1f120ad3a29c27cc41d581cda3751c59343cce vim/bundle/surround 19c3d966440b6cfe8d74251881a48e961ddb8648 vim/bundle/swig f6f2d6618a321f5b0065586a7bc934325fec81ab vim/bundle/targets -2c6bffb492f4f9b101e45610b0d7b9c328916894 vim/bundle/vim-go +dcefd64ba251ffc3d497f8758036735c8f6cc824 vim/bundle/vim-go 5d5c71044880443035e07009497962feacb56b20 vim/bundle/vimtex 54feb567738398ab65d783e096bc84938e7620a0 vim/bundle/vlime 6876fe38b33732cb124d415ffc4156f16da5e118 vim/bundle/windowswap diff -r 15f446854045 -r ea87bf0407c4 Xmodmap --- a/Xmodmap Thu May 05 17:31:55 2022 -0400 +++ b/Xmodmap Thu May 05 17:33:06 2022 -0400 @@ -13,6 +13,7 @@ keycode 47 = minus colon keycode 20 = semicolon underscore keycode 108 = Mode_switch +keycode 192 = Multi_key keycode 900 = F16 ! for some reason this fucks up keycode 133. I have no idea why this happens. diff -r 15f446854045 -r ea87bf0407c4 bin/unix-timestamp-seconds --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/unix-timestamp-seconds Thu May 05 17:33:06 2022 -0400 @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +date '+%s' diff -r 15f446854045 -r ea87bf0407c4 gitconfig --- a/gitconfig Thu May 05 17:31:55 2022 -0400 +++ b/gitconfig Thu May 05 17:33:06 2022 -0400 @@ -16,6 +16,8 @@ make-the-fucking-branch-point-at-the-fucking-commit = "!sh -c 'git checkout $1 && git reset --hard $2' -" mtfbpatfc = "!sh -c 'git checkout $1 && git reset --hard $2' -" + repoint = "!sh -c 'git update-ref HEAD $1 && git reset' -" + root = rev-parse --show-toplevel l = log -18 --color=always --all --topo-order --pretty='format:%Cgreen%h%Creset %s%Cred%d%Creset %C(black bold)(by %an)%Creset' @@ -86,6 +88,7 @@ fuo = "!sh -c 'git fo && git uo' -" fuom = "!sh -c 'git co $(git mainbranch) && git fo && git uo' -" fuum = "!sh -c 'git co $(git mainbranch) && git fu && git uu' -" + rom = "!sh -c 'git fo && git rebase origin/$(git mainbranch)' -" addremove = !git add . && git add -u addrem = !git addremove diff -r 15f446854045 -r ea87bf0407c4 gnuplot --- a/gnuplot Thu May 05 17:31:55 2022 -0400 +++ b/gnuplot Thu May 05 17:33:06 2022 -0400 @@ -23,8 +23,8 @@ tau = 2 * pi e = 2.71828182845905 r2 = sqrt(2.0) -rfc3339 = "%Y-%m-%d %H:%M:%S." -iso8601 = "%Y-%m-%dT%H:%M:%S." +rfc3339 = "%Y-%m-%dT%H:%M:%S" +iso8601 = "%Y-%m-%dT%H:%M:%S" # }}} # Utility Functions ------------------------------------------------------- {{{ @@ -53,6 +53,7 @@ # }}} # Convenience Wrappers ---------------------------------------------------- {{{ +# usage: @xrfc3339 csvinput = 'set datafile separator ","' xrfc3339 = "set xdata time; set timefmt rfc3339" @@ -88,7 +89,7 @@ set boxwidth histogram_bin_width*0.9 set style fill solid 0.5 -plot 'sizes' using (histogram_bin($1,histogram_bin_width)):(1.0) smooth freq with boxes +# plot 'sizes' using (histogram_bin($1,histogram_bin_width)):(1.0) smooth freq with boxes # }}} # Other ------------------------------------------------------------------- {{{ diff -r 15f446854045 -r ea87bf0407c4 grcat/conf.curl --- a/grcat/conf.curl Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -# request -regexp=(^\* .*) -colours=bright_black -======= -# request -regexp=(^> .*) -colours=bright_black -======= -# response -regexp=(^< .*) -colours=blue -======= -# ok response code -regexp=^< HTTP.+ ([23]...*) -colours=blue, bold green -======= -# error response code -regexp=^< HTTP.+ ([45]...*) -colours=blue, bold red -======= -regexp=.*\[.* bytes data\] -colours=bright_black diff -r 15f446854045 -r ea87bf0407c4 grcat/conf.go-test --- a/grcat/conf.go-test Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -regexp=(^=== RUN).* -colours=cyan,bold cyan -======= -regexp=(^--- PASS).* -colours=green,bold green -======= -regexp=(^--- FAIL).* -colours=red,bold red -======= -regexp=(^(ok|FAIL|\?)\s.*$) -colours=bright_black,bright_black - - diff -r 15f446854045 -r ea87bf0407c4 grcat/conf.tail-vm --- a/grcat/conf.tail-vm Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -# err -regexp=(ERR ) -colours=default,red -======= -# warn -regexp=(WARNING ) -colours=default,yellow -======= -# info -regexp=(INFO ) -colours=default,cyan -======= -# time -regexp=(^\d\d:\d\d:\d\d) -colours=bright_black diff -r 15f446854045 -r ea87bf0407c4 lisp/bucket.lisp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/bucket.lisp Thu May 05 17:33:06 2022 -0400 @@ -0,0 +1,247 @@ +(eval-when (:compile-toplevel :load-toplevel :execute) + (ql:quickload '(:adopt :alexandria :cl-ppcre :with-user-abort :local-time) + :silent t)) + +(defpackage :bucket + (:use :cl) + (:export :toplevel :*ui*)) + +(in-package :bucket) + +;;;; Configuration ------------------------------------------------------------ +(setf local-time:*default-timezone* local-time:+utc-zone+) + + +;;;; Functionality ------------------------------------------------------------ +(defun collect-values (time-mode path) + (flet ((collect (stream) + (loop :for line = (read-line stream nil nil) + :while line + :for value = (if time-mode + (local-time:parse-rfc3339-timestring line) + (parse-integer line :junk-allowed t)) + :when value :collect value))) + (if (string= path "-") + (collect *standard-input*) + (with-open-file (s path) + (collect s))))) + + +(defun floor-to-nearest (n divisor) + (* divisor (floor n divisor))) + +(declaim (inline in-range-p in-time-p)) +(defun in-range-p (val start end) + (and (<= start val) + (< val end))) + +(defun in-time-p (val start end) + (and (local-time:timestamp<= start val) + (local-time:timestamp< val end))) + +(defun bucket-numeric (data width skip-empty output) + (loop :with data = (sort (coerce data 'vector) #'<) + :with len = (length data) + :with i = 0 + :for bs :from (floor-to-nearest (aref data 0) width) :by width + :for be = (+ bs width) + :while (< i len) + :for count = (loop :while (< i len) + :while (in-range-p (aref data i) bs be) + :sum 1 + :do (incf i)) + :do (unless (and skip-empty (zerop count)) + (format t "~12F ~10D~%" + (ecase output + (:lower bs) + (:upper be) + (:mid (/ (+ bs bs width) 2.0d0))) + count)))) + +(defun bucket-temporal (data width skip-empty output) + (loop :with data = (sort (coerce data 'vector) #'local-time:timestamp<) + :with len = (length data) + :with i = 0 + :with bs = (local-time:timestamp-minimize-part (aref data 0) :sec) + :for be = (local-time:timestamp+ bs width :sec) + :while (< i len) + :for count = (loop :while (< i len) + :while (in-time-p (aref data i) bs be) + :sum 1 + :do (incf i)) + :do (unless (and skip-empty (zerop count)) + (format t "~A ~10D~%" + (local-time:format-rfc3339-timestring + nil + (ecase output + (:lower bs) + (:upper be) + (:mid (local-time:timestamp+ bs (truncate (* width 1000000000) 2) :nsec)))) ; hack + count)) + :do (setf bs (local-time:timestamp+ bs width :sec)))) + +(defun run (paths &key time-mode width skip-empty (output :mid)) + (when (null width) + (error "Bucket width must be specified.")) + (let ((data (mapcan (alexandria:curry #'collect-values time-mode) + (or paths '("-"))))) + (when (null data) + (error "No data found.")) + (if time-mode + (bucket-temporal data width skip-empty output) + (bucket-numeric data width skip-empty output)))) + + +;;;; User Interface ----------------------------------------------------------- +(defparameter *option/help* + (adopt:make-option 'help + :help "Display help and exit." + :long "help" + :short #\h + :reduce (constantly t))) + +(adopt:defparameters (*option/time* *option/no-time*) + (adopt:make-boolean-options 'time + :help "Bucket in timestamp (RFC3339) mode." + :help-no "Bucket in numeric mode (the default)." + :long "time" + :short #\t)) + +(adopt:defparameters (*option/skip-empty* *option/no-skip-empty*) + (adopt:make-boolean-options 'skip-empty + :help "Skip outputting empty buckets." + :help-no "Include empty buckets (the default)." + :long "skip-empty" + :short #\e)) + + +(defparameter *option/output/lower* + (adopt:make-option 'output/lower + :result-key 'output + :help "Output the lower bound of the bucket." + :long "lower" + :short #\l + :reduce (constantly :lower))) + +(defparameter *option/output/mid* + (adopt:make-option 'output/mid + :result-key 'output + :help "Output the midpoint of the bucket (the default)." + :long "mid" + :short #\m + :initial-value :mid + :reduce (constantly :mid))) + +(defparameter *option/output/upper* + (adopt:make-option 'output/upper + :result-key 'output + :help "Output the upper bound of the bucket." + :long "upper" + :short #\u + :reduce (constantly :upper))) + + +(defparameter *option/width* + (adopt:make-option 'width + :result-key 'width + :help "Set bucket width to N." + :parameter "N" + :long "width" + :short #\W + :initial-value nil + :key #'parse-integer + :reduce #'adopt:last)) + +(defparameter *option/width/seconds* + (adopt:make-option 'width/seconds + :result-key 'width + :help "Set bucket width to N seconds." + :parameter "N" + :long "seconds" + :short #\S + :key (lambda (n) + (parse-integer n)) + :reduce #'adopt:last)) + +(defparameter *option/width/minutes* + (adopt:make-option 'width/minutes + :result-key 'width + :help "Set bucket width to N minutes." + :parameter "N" + :long "minutes" + :short #\M + :key (lambda (n) + (* 60 (parse-integer n))) + :reduce #'adopt:last)) + +(defparameter *option/width/hours* + (adopt:make-option 'width/hours + :result-key 'width + :help "Set bucket width to N hours." + :parameter "N" + :long "hours" + :short #\H + :key (lambda (n) + (* 60 60 (parse-integer n))) + :reduce #'adopt:last)) + + +(adopt:define-string *help-text* + "bucket groups lines into histogrammy buckets.~@ + ~@ + This is handy if you have some non-bucketed data that you want to graph as ~ + a histogram with gnuplot, because gnuplot unbelievably does not have built-in ~ + histogramming.") + +(defparameter *examples* + '()) + + +(defparameter *ui* + (adopt:make-interface + :name "bucket" + :usage "[OPTIONS] [FILE...]" + :summary "bucket things for easier histogramming" + :help *help-text* + :examples *examples* + :contents (list *option/help* + *option/time* + *option/no-time* + *option/skip-empty* + *option/no-skip-empty* + (adopt:make-group 'bucket-width + :title "Bucket Widths" + :options (list + *option/width* + *option/width/seconds* + *option/width/minutes* + *option/width/hours*)) + (adopt:make-group 'bucket-labels + :title "Bucket Labels" + :options (list + *option/output/lower* + *option/output/mid* + *option/output/upper*))))) + + +(defun toplevel () + ;; #+sbcl (sb-ext:disable-debugger) + (handler-case + (adopt::quit-on-ctrl-c () + (multiple-value-bind (arguments options) (adopt:parse-options-or-exit *ui*) + (cond + ((gethash 'help options) (adopt:print-help-and-exit *ui*)) + (t (progn (local-time:reread-timezone-repository) + (run arguments + :time-mode (gethash 'time options) + :width (gethash 'width options) + :skip-empty (gethash 'skip-empty options) + :output (gethash 'output options))))))) + (error (c) (adopt:print-error-and-exit c)))) + + +#; Scratch -------------------------------------------------------------------- + + +(ppcre:scan "(\\d{4})-(\\d{2})-(\\d{2})[ T](\\d{2}):(\\d{2}):(\\d{2})(?:\\.\\d+)?([+-]\\d{2}:\\d{2}|Z)?" + "2022-04-25T17:00:41.289049Z") diff -r 15f446854045 -r ea87bf0407c4 lisp/gtp.lisp --- a/lisp/gtp.lisp Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,351 +0,0 @@ -(eval-when (:compile-toplevel :load-toplevel :execute) - (ql:quickload '(:adopt :alexandria :cl-ppcre :with-user-abort :local-time) - :silent t)) - -(defpackage :gtp - (:use :cl) - (:export :toplevel :*ui*)) - -(in-package :gtp) - -;;;; Configuration ------------------------------------------------------------ -(defparameter *version* "1.0.0") -(setf local-time:*default-timezone* local-time:+utc-zone+) - -(defparameter *time-formats* - `((:rfc-3339 . ("(\\d{4})-(\\d{2})-(\\d{2})[ T](\\d{2}):(\\d{2}):(\\d{2})(?:[.]\\d{4-})?([+-]\\d{2}:\\d{2}|Z)?" - ,local-time:+rfc3339-format+)) - (:iso-8601 . ("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:,\\d{4-})?([+-]\\d{2}:\\d{2}|Z)?" - ,local-time:+iso-8601-format+)) - (:simple . ("(\\d{4})/(\\d{2})/(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})()" - ((:year 4) #\/ (:month 2) #\/ (:day 2) #\space (:hour 2) #\: (:min 2) #\: (:sec 2)))) - (:gnuplot . ("(\\d{2})/(\\d{2})/(\\d{2}),(\\d{2}):(\\d{2})" - ((:day 2) #\/ (:month 2) #\/ #\Y #\, (:hour 2) #\: (:min 2)))) - (:unix-milliseconds . ("(\\d{13,14})" nil)) - (:unix-seconds . ("(\\d{10,11})" nil)))) - - -;;;; Utilities ---------------------------------------------------------------- -(defmacro match ((register-vars (start end) (regex target)) &body body) - (alexandria:with-gensyms (rs re) - (alexandria:once-only (regex target) - `(multiple-value-bind (,start ,end ,rs ,re) (ppcre:scan ,regex ,target) - (when ,start - (let (,@(loop :for r :from 0 - :for var :in register-vars - :collect `(,var (when (aref ,rs ,r) - (subseq ,target (aref ,rs ,r) (aref ,re ,r)))))) - ,@body)))))) - -(defun i (s) - (parse-integer s)) - -(defun keywordize (s) - (alexandria:make-keyword (string-upcase s))) - - -;;;; Time Formats ------------------------------------------------------------- - -(defun get-format (format) - (or (alexandria:assoc-value *time-formats* format) - (error "Unknown time format ~S" format))) - -(defun get-regex (format) - (first (get-format format))) - -(defun get-local-time-format (format) - (second (get-format format))) - -(defun parse-timezone (string) - (if (member string '(nil "" "Z" "UTC" "+00:00" "-00:00") :test #'equal) - local-time:+utc-zone+ - (or (local-time:find-timezone-by-location-name string) - (error "TODO: handle timezone ~S" string)))) - - -(defgeneric make-parser (format)) - -(defmethod make-parser (format) - (let ((scanner (ppcre:create-scanner (get-regex format)))) - (lambda (s) - (match ((year month day hour minute second timezone) - (start end) - (scanner s)) - (values - (local-time:encode-timestamp - 0 (i second) (i minute) (i hour) (i day) (i month) (i year) - :timezone (parse-timezone timezone)) - start end))))) - -(defmethod make-parser ((format (eql :gnuplot))) - (let ((scanner (ppcre:create-scanner (get-regex format)))) - (lambda (s) - (match ((day month year hour minute) - (start end) - (scanner s)) - (values (local-time:encode-timestamp - 0 0 (i minute) (i hour) (i day) (i month) (+ 2000 (i year))) - start end))))) - -(defmethod make-parser ((format (eql :unix-seconds))) - (let ((scanner (ppcre:create-scanner (get-regex format)))) - (lambda (s) - (match ((unix) - (start end) - (scanner s)) - (when unix ; shut up sbcl - (values (local-time:unix-to-timestamp (parse-integer unix)) start end)))))) - -(defmethod make-parser ((format (eql :unix-milliseconds))) - (let ((scanner (ppcre:create-scanner (get-regex format)))) - (lambda (s) - (match ((unix) - (start end) - (scanner s)) - (when unix ; shut up sbcl - (multiple-value-bind (sec ms) (truncate (parse-integer unix) 1000) - (values (local-time:unix-to-timestamp sec :nsec (* ms 1000 1000)) - start end))))))) - - -(defun make-predicate (format start end) - (let ((parser (make-parser format))) - (lambda (line) - (multiple-value-bind (line-time s e) (funcall parser line) - (when (and line-time - (or (null start) (local-time:timestamp<= start line-time)) - (or (null end) (local-time:timestamp<= line-time end))) - (values line-time s e)))))) - - -(defgeneric make-formatter (format)) - -(defmethod make-formatter (format) - (let ((local-time-format (get-local-time-format format))) - (lambda (time stream) - (local-time:format-timestring stream time :format local-time-format)))) - -(defmethod make-formatter ((format (eql :gnuplot))) - (let ((local-time-format (get-local-time-format :gnuplot))) - (lambda (time stream) - (let ((s (local-time:format-timestring nil time :format local-time-format))) - ;; "16/07/Y,15:05" - (write-string s stream :start 0 :end 6) - (format stream "~2,'0D" (mod (local-time:timestamp-year time) 100)) - (write-string s stream :start 7))))) - -(defmethod make-formatter ((format (eql :unix-seconds))) - (lambda (time stream) - (format stream "~D" (local-time:timestamp-to-unix time)))) - -(defmethod make-formatter ((format (eql :unix-milliseconds))) - (lambda (time stream) - (format stream "~D" (+ (* 1000 (local-time:timestamp-to-unix time)) - (local-time:timestamp-millisecond time))))) - - -(defun parse-time-flexibly (string) - ;; todo optimize this - (loop :for format :in *time-formats* - :for parser = (make-parser (car format)) - :for result = (funcall parser string) - :when result :do (return-from parse-time-flexibly result)) - (error "Don't know how to parse ~S as a time." string)) - - -;;;; Run ---------------------------------------------------------------------- -(defun run% (predicate in out path prefix reformat) - (loop - :for line = (read-line in nil) - :while line - :do (multiple-value-bind (time start end) (funcall predicate line) - (when time - (when prefix - (write-string path out) - (write-char #\: out)) - (if reformat - (progn (write-string line out :start 0 :end start) - (funcall reformat time out) - (write-line line out :start end)) - (write-line line out)))))) - -(defun run (paths &key format start end prefix reformat) - (when (null paths) - (setf paths '("-"))) - (when (and start end (local-time:timestamp< end start)) - (error "Start ~S is after end ~S." start end)) - (when reformat - (setf reformat (make-formatter reformat))) - (let ((pred (make-predicate format start end))) - (dolist (path paths) - (if (string= "-" path) - (run% pred *standard-input* *standard-output* path prefix reformat) - (with-open-file (stream path :direction :input) - (run% pred stream *standard-output* path prefix reformat)))))) - - -;;;; User Interface ----------------------------------------------------------- -(defparameter *option-help* - (adopt:make-option 'help - :help "Display help and exit." - :long "help" - :short #\h - :reduce (constantly t))) - -(defparameter *option-version* - (adopt:make-option 'version - :help "Display version information and exit." - :long "version" - :reduce (constantly t))) - - -(defparameter *option-prefix* - (adopt:make-option 'prefix - :help "Prefix output lines with their path." - :short #\p - :long "prefix" - :reduce (constantly t))) - -(defparameter *option-no-prefix* - (adopt:make-option 'no-prefix - :result-key 'prefix - :help "Do not prefix output lines with their path (default)." - :short #\P - :long "no-prefix" - :reduce (constantly nil))) - - -(defparameter *option-format* - (adopt:make-option 'format - :help "The time format used to parse times from lines." - :parameter "FORMAT" - :long "format" - :short #\f - :initial-value :simple - :key #'keywordize - :reduce #'adopt:last)) - -(defparameter *option-reformat* - (adopt:make-option 'reformat - :help "Reformat parsed timestamps into FORMAT before outputting them." - :parameter "FORMAT" - :long "reformat" - :short #\r - :initial-value nil - :key #'keywordize - :reduce #'adopt:last)) - -(defparameter *option-no-reformat* - (adopt:make-option 'reformat - :help "Do not reformat parsed timestamps (default)." - :long "no-reformat" - :short #\R - :reduce (constantly nil))) - - -(defparameter *option-start* - (adopt:make-option 'start - :help "Only show lines at or after START." - :parameter "START" - :long "start" - :short #\s - :initial-value nil - :key #'parse-time-flexibly - :reduce #'adopt:last)) - -(defparameter *option-end* - (adopt:make-option 'end - :help "Only show lines at or before END." - :parameter "END" - :long "end" - :short #\e - :initial-value nil - :key #'parse-time-flexibly - :reduce #'adopt:last)) - - -(adopt:define-string *help-text* - "gtp filters lines by time. Instead of g/re/p it's g/time/p.~@ - ~@ - gtp will only print lines that have a timestamp somewhere in them. Use ~ - --format to select the timestamp format. Supported formats:~@ - ~@ - ~: - * simple: 2020/11/23 18:55:30 (default) - * rfc-3339: 2020-11-23 18:55:30Z - * iso-8601: 2020-11-23T18:55:30Z - * gnuplot: 11/23/20,18:55~@ - ~@ - You can additionally filter based on a time range using --start and/or --end. ~ - For convenience, these parameters can be given in any supported timestamp ~ - format, they don't have to match --format.") - -(defparameter *examples* - '(("Filter standard input and only print lines with an RFC-3339 time:" - . "gtp --format rfc-3339") - ("Print log lines after a particular time, and prefix each output line with its source filename:" - . "gtp **.log --prefix --after '2020/06/14 12:22:01'") - ("Print RFC-3339 log lines starting now, with now given in a different format:" - . "tail -f foo | gtp --format rfc-3339 --after \"$(date --utc --iso-8601=sec)\""))) - - -(defparameter *ui* - (adopt:make-interface - :name "gtp" - :usage "[OPTIONS] [FILE...]" - :summary "filter lines by timestamp" - :help *help-text* - :examples *examples* - :contents (list *option-help* - *option-version* - *option-format* - *option-reformat* - *option-no-reformat* - *option-start* - *option-end* - *option-prefix* - *option-no-prefix*))) - - -(defmacro exit-on-error (&body body) - `(handler-case (progn ,@body) - (error (c) (adopt:print-error-and-exit c)))) - -(defmacro exit-on-ctrl-c (&body body) - `(handler-case - (with-user-abort:with-user-abort (progn ,@body)) - (with-user-abort:user-abort () (adopt:exit 130)))) - - -(defun toplevel () - #+sbcl (sb-ext:disable-debugger) - (exit-on-error - (exit-on-ctrl-c - (multiple-value-bind (arguments options) (adopt:parse-options-or-exit *ui*) - (cond - ((gethash 'help options) (adopt:print-help-and-exit *ui*)) - ((gethash 'version options) (write-line *version*) (adopt:exit)) - (t (progn (local-time:reread-timezone-repository) - (run arguments - :format (gethash 'format options) - :start (gethash 'start options) - :end (gethash 'end options) - :prefix (gethash 'prefix options) - :reformat (gethash 'reformat options))))))))) - - -#; Scratch -------------------------------------------------------------------- - -(run - '("/home/sjl/scratch/logs/test/passport/passport.172.24.20.49.log") - :format :simple - :start (parse-time-flexibly "2020-07-15T17:31:00.000000") - :end (parse-time-flexibly "2020-07-15T17:31:55") - :prefix nil - :reformat :iso-8601) - -(parse-time-flexibly "2020-07-15 16:08:15.0000Z") - -(local-time:find-timezone-by-location-name "EDT") - -(local-time:reread-timezone-repository) diff -r 15f446854045 -r ea87bf0407c4 lisp/twizzle.lisp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/twizzle.lisp Thu May 05 17:33:06 2022 -0400 @@ -0,0 +1,394 @@ +(eval-when (:compile-toplevel :load-toplevel :execute) + (ql:quickload '(:adopt :alexandria :cl-ppcre :with-user-abort :local-time) + :silent t)) + +(defpackage :twizzle + (:use :cl) + (:export :toplevel :*ui*)) + +(in-package :twizzle) + +;;;; Configuration ------------------------------------------------------------ +(setf local-time:*default-timezone* local-time:+utc-zone+) + +(defparameter *time-formats* + ;; An alist of (name . (parse-regex local-time-format-spec)), or (name . nil) + ;; for more complicated formats. + `((:rfc-3339 . ("(\\d{4})-(\\d{2})-(\\d{2})[ T](\\d{2}):(\\d{2}):(\\d{2})(?:[.]\\d+)?([+-]\\d{2}:\\d{2}|Z)?" + ,local-time:+rfc3339-format+)) + (:iso-8601 . ("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:,\\d+)?([+-]\\d{2}:\\d{2}|Z)?" + ,local-time:+iso-8601-format+)) + (:simple . ("(\\d{4})/(\\d{2})/(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})()" + ((:year 4) #\/ (:month 2) #\/ (:day 2) #\space (:hour 2) #\: (:min 2) #\: (:sec 2)))) + (:gnuplot . nil) + (:golang . nil) + (:unix-seconds . nil) + (:unix-milliseconds . nil))) + + +;;;; Utilities ---------------------------------------------------------------- +(defmacro match ((register-vars (start end) (regex target)) &body body) + (alexandria:with-gensyms (rs re) + (alexandria:once-only (regex target) + `(multiple-value-bind (,start ,end ,rs ,re) (ppcre:scan ,regex ,target) + (when ,start + (let (,@(loop :for r :from 0 + :for var :in register-vars + :collect `(,var (when (aref ,rs ,r) + (subseq ,target (aref ,rs ,r) (aref ,re ,r)))))) + ,@body)))))) + +(defun i (s) + (parse-integer s)) + +(defun keywordize (s) + (alexandria:make-keyword (string-upcase s))) + + +;;;; Time Formats ------------------------------------------------------------- +(defun microseconds->nanoseconds (msec) + (* msec 1000)) + +(defun milliseconds->nanoseconds (msec) + (* msec 1000 1000)) + + +(defun get-format (format) + (or (alexandria:assoc-value *time-formats* format) + (error "Unknown time format ~S" format))) + +(defun get-regex (format) + (first (get-format format))) + +(defun get-local-time-format (format) + (second (get-format format))) + + +(defun parse-timezone (string) + (if (member string '(nil "" "Z" "UTC" "+00:00" "-00:00") :test #'equal) + local-time:+utc-zone+ + (or (local-time:find-timezone-by-location-name string) + (error "TODO: handle timezone ~S" string)))) + + +(defgeneric make-parser (format) + (:documentation "Return a parsing function for the given format.")) + +(defmethod make-parser (format) + (let ((scanner (ppcre:create-scanner (get-regex format)))) + (lambda (s) + (match ((year month day hour minute second timezone) + (start end) + (scanner s)) + (values + (local-time:encode-timestamp + 0 (i second) (i minute) (i hour) (i day) (i month) (i year) + :timezone (parse-timezone timezone)) + start end))))) + +(defmethod make-parser ((format (eql :golang))) + (let ((scanner (ppcre:create-scanner "(\\d{4})/(\\d{2})/(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{6}))?"))) + (lambda (s) + (match ((year month day hour minute seconds microseconds) + (start end) + (scanner s)) + (values (local-time:encode-timestamp + (microseconds->nanoseconds (i microseconds)) + (i seconds) (i minute) (i hour) (i day) (i month) (i year)) + start end))))) + +(defmethod make-parser ((format (eql :gnuplot))) + (let ((scanner (ppcre:create-scanner "(\\d{2})/(\\d{2})/(\\d{2}),(\\d{2}):(\\d{2})"))) + (lambda (s) + (match ((day month year hour minute) + (start end) + (scanner s)) + (values (local-time:encode-timestamp + 0 0 (i minute) (i hour) (i day) (i month) (+ 2000 (i year))) + start end))))) + +(defmethod make-parser ((format (eql :unix-seconds))) + (let ((scanner (ppcre:create-scanner "(\\d{13,14})"))) + (lambda (s) + (match ((unix) + (start end) + (scanner s)) + (when unix ; shut up sbcl + (values (local-time:unix-to-timestamp (i unix)) start end)))))) + +(defmethod make-parser ((format (eql :unix-milliseconds))) + (let ((scanner (ppcre:create-scanner "(\\d{10,11})"))) + (lambda (s) + (match ((unix) + (start end) + (scanner s)) + (when unix ; shut up sbcl + (multiple-value-bind (sec ms) (truncate (i unix) 1000) + (values (local-time:unix-to-timestamp sec :nsec (milliseconds->nanoseconds ms)) + start end))))))) + + +(defun make-predicate (format start end) + "Return a matching predicate for the user's query. + + This predicate will taka a line and return four values: + + * The timestamp found, if any. + * Whether the timestamp is inside the filtering bounds, if any. + * The start of the timestamp in the string, if any. + * The end of the timestamp in the string, if any. + + " + (let ((parser (make-parser format))) + (lambda (line) + (multiple-value-bind (line-time s e) (funcall parser line) + (values line-time + (and line-time + (or (null start) (local-time:timestamp<= start line-time)) + (or (null end) (local-time:timestamp<= line-time end))) + s + e))))) + + +(defgeneric make-formatter (format)) + +(defmethod make-formatter (format) + (let ((local-time-format (get-local-time-format format))) + (lambda (time stream) + (local-time:format-timestring stream time :format local-time-format)))) + +(defmethod make-formatter ((format (eql :golang))) + (lambda (time stream) + (local-time:format-timestring + stream time + :format '((:year 4) #\/ (:month 2) #\/ (:day 2) #\space (:hour 2) #\: (:min 2) #\: (:sec 2))))) + +(defmethod make-formatter ((format (eql :gnuplot))) + (lambda (time stream) + (let* ((f '((:day 2) #\/ (:month 2) #\/ #\Y #\, (:hour 2) #\: (:min 2))) + (s (local-time:format-timestring nil time :format f))) + ;; "16/07/Y,15:05" + (write-string s stream :start 0 :end 6) + (format stream "~2,'0D" (mod (local-time:timestamp-year time) 100)) + (write-string s stream :start 7)))) + +(defmethod make-formatter ((format (eql :unix-seconds))) + (lambda (time stream) + (format stream "~D" (local-time:timestamp-to-unix time)))) + +(defmethod make-formatter ((format (eql :unix-milliseconds))) + (lambda (time stream) + (format stream "~D" (+ (* 1000 (local-time:timestamp-to-unix time)) + (local-time:timestamp-millisecond time))))) + + +(defun parse-time-flexibly (string) + ;; todo optimize this + (loop :for format :in *time-formats* + :for parser = (make-parser (car format)) + :for result = (funcall parser string) + :when result :do (return-from parse-time-flexibly result)) + (error "Don't know how to parse ~S as a time." string)) + + +;;;; Run ---------------------------------------------------------------------- +(defun run% (predicate in out path prefix reformat only) + (loop + :for line = (read-line in nil) + :while line + ; todo support multiple timestamps per line + :do (multiple-value-bind (time in-bounds start end) (funcall predicate line) + (if (null time) + (unless only + (write-line line out)) + (when in-bounds + (when prefix + (write-string path out) + (write-char #\: out)) + (if reformat + (progn (write-string line out :start 0 :end start) + (funcall reformat time out) + (write-line line out :start end)) + (write-line line out))))))) + +(defun run (paths &key format start end prefix reformat only) + (when (null paths) + (setf paths '("-"))) + (when (and start end (local-time:timestamp< end start)) + (error "Start ~S is after end ~S." start end)) + (when reformat + (setf reformat (make-formatter reformat))) + (let ((pred (make-predicate format start end))) + (dolist (path paths) + (if (string= "-" path) + (run% pred *standard-input* *standard-output* path prefix reformat only) + (with-open-file (stream path :direction :input) + (run% pred stream *standard-output* path prefix reformat only)))))) + + +;;;; User Interface ----------------------------------------------------------- +(defparameter *option-help* + (adopt:make-option 'help + :help "Display help and exit." + :long "help" + :short #\h + :reduce (constantly t))) + + +(adopt:defparameters (*option-prefix* *option-no-prefix*) + (adopt:make-boolean-options 'prefix + :help "Prefix output lines with their path." + :help-no "Do not prefix output lines with their path (default)." + :short #\p + :long "prefix")) + + +(adopt:defparameters (*option-only* *option-all*) + (adopt:make-boolean-options 'only + :help "Only output lines containing a timestamp." + :help-no "Output all lines, even those without a timestamp (default)." + :short #\o + :short-no #\a + :long "only" + :long-no "all")) + + +(defparameter *option-format* + (adopt:make-option 'format + :help "The time format used to parse times from lines." + :parameter "FORMAT" + :long "format" + :short #\f + :initial-value :simple + :key #'keywordize + :reduce #'adopt:last)) + +(defparameter *option-reformat* + (adopt:make-option 'reformat + :help "Reformat parsed timestamps into FORMAT before outputting them." + :parameter "FORMAT" + :long "reformat" + :short #\r + :initial-value nil + :key #'keywordize + :reduce #'adopt:last)) + +(defparameter *option-no-reformat* + (adopt:make-option 'reformat + :help "Do not reformat parsed timestamps (default)." + :long "no-reformat" + :short #\R + :reduce (constantly nil))) + + +(defparameter *option-start* + (adopt:make-option 'start + :help "Only show lines at or after START." + :parameter "START" + :long "start" + :short #\s + :initial-value nil + :key #'parse-time-flexibly + :reduce #'adopt:last)) + +(defparameter *option-end* + (adopt:make-option 'end + :help "Only show lines at or before END." + :parameter "END" + :long "end" + :short #\e + :initial-value nil + :key #'parse-time-flexibly + :reduce #'adopt:last)) + + +(adopt:define-string *help-text* + "twizzle lets you swizzle timestamps.~@ + ~@ + Use --format to select the incoming timestamp format, and --reformat to ~ + swizzle them into a different format if desired. Supported formats:~@ + ~@ + ~: + * simple: 2020/11/23 18:55:30 (default) + * rfc-3339: 2020-11-23 18:55:30Z + * iso-8601: 2020-11-23T18:55:30Z + * gnuplot: 11/23/20,18:55~@ + ~@ + You can additionally filter based on a time range using --start and/or --end. ~ + For convenience, these parameters can be given in any supported timestamp ~ + format, they don't have to match --format.~@ + ~@ + Currently only the first timestamp per line is considered.") + +(defparameter *examples* + '(("Filter standard input and only print lines with an RFC-3339 time:" + . "twizzle --format rfc-3339") + ("Print log lines after a particular time, and prefix each output line with its source filename:" + . "twizzle **.log --prefix --after '2020/06/14 12:22:01'") + ("Print RFC-3339 log lines starting now, with now given in a different format:" + . "tail -f foo | twizzle --format rfc-3339 --after \"$(date --utc --iso-8601=sec)\""))) + + +(defparameter *ui* + (adopt:make-interface + :name "twizzle" + :usage "[OPTIONS] [FILE...]" + :summary "swizzle timestamps" + :help *help-text* + :examples *examples* + :contents (list *option-help* + (adopt:make-group 'timestamp-formats + :title "Timestamp Formats" + :options (list *option-format* + *option-reformat* + *option-no-reformat*)) + (adopt:make-group 'output-filtering + :title "Output Control" + :options (list *option-only* + *option-all* + *option-start* + *option-end* + *option-prefix* + *option-no-prefix*))))) + + +(defmacro exit-on-error (&body body) + `(handler-case (progn ,@body) + (error (c) (adopt:print-error-and-exit c)))) + +(defmacro exit-on-ctrl-c (&body body) + `(handler-case + (with-user-abort:with-user-abort (progn ,@body)) + (with-user-abort:user-abort () (adopt:exit 130)))) + + +(defun toplevel () + #+sbcl (sb-ext:disable-debugger) + (exit-on-error + (exit-on-ctrl-c + (multiple-value-bind (arguments options) (adopt:parse-options-or-exit *ui*) + (cond + ((gethash 'help options) (adopt:print-help-and-exit *ui*)) + (t (progn (local-time:reread-timezone-repository) + (run arguments + :format (gethash 'format options) + :start (gethash 'start options) + :end (gethash 'end options) + :prefix (gethash 'prefix options) + :only (gethash 'only options) + :reformat (gethash 'reformat options))))))))) + + +#; Scratch -------------------------------------------------------------------- + +(run + '("/home/sjl/scratch/logs/logs/prod/saas-warehouse-i-06b0ea6fe4e6dd3fd.log") + :format :golang + :prefix nil + :reformat :rfc-3339) + +(parse-time-flexibly "2020-07-15 16:08:15.0000Z") + +(local-time:find-timezone-by-location-name "EDT") + +(local-time:reread-timezone-repository) diff -r 15f446854045 -r ea87bf0407c4 lispwords --- a/lispwords Thu May 05 17:31:55 2022 -0400 +++ b/lispwords Thu May 05 17:33:06 2022 -0400 @@ -126,7 +126,7 @@ ; adopt (2 define-interface) -(1 make-option make-boolean-options) +(1 make-option make-boolean-options make-group) (1 quit-on-ctrl-c) diff -r 15f446854045 -r ea87bf0407c4 stumpwmrc --- a/stumpwmrc Thu May 05 17:31:55 2022 -0400 +++ b/stumpwmrc Thu May 05 17:33:06 2022 -0400 @@ -520,6 +520,61 @@ ((:integer "Seconds: ")) (run-shell-command (format nil "tea ~D" seconds))) +;;;; Isk ---------------------------------------------------------------------- +(defcommand send-key (key &optional (win (current-window))) (:key) + "Send key press and key release events for KEY to window WIN." + ;; from https://github.com/alezost/stumpwm-config/blob/master/utils.lisp + (let ((xwin (window-xwin win))) + (multiple-value-bind (code state) (stumpwm::key-to-keycode+state key) + (flet ((send (event) + (xlib:send-event xwin event (xlib:make-event-mask event) + :display *display* + :root (screen-root (window-screen win)) + :x 0 :y 0 :root-x 0 :root-y 0 + :window xwin :event-window xwin + :code code + :state state))) + (send :key-press) + (send :key-release) + (xlib:display-finish-output *display*))))) + +(defun send-keys (keys &key (win (current-window)) (sleep 0)) + (dolist (k keys) + (send-key (kbd k) win) + (sleep sleep))) + +(defmacro defmultikey (name key compose-keys) + ;; Unfortunately we can't reliably autogen the name with something like + ;; (symb 'mk- compose-key) here because things like đ (th) and Đ (TH) would + ;; case fold to the same name. + `(progn + (defcommand ,name () () + (send-keys '("Multi_key" ,@(map 'list #'string compose-keys)))) + (define-key *top-map* + (kbd ,key) ,(string name)))) + +(defmacro defmultikeys (&rest bindings) + `(progn ,@(loop for binding :in bindings :collect `(defmultikey ,@binding)))) + +(defmultikeys + (isk-l-á "M-a" "'a") + (isk-u-Á "M-A" "'A") + (isk-l-é "M-e" "'e") + (isk-u-É "M-E" "'E") + (isk-l-í "M-i" "'i") + (isk-u-Í "M-I" "'I") + (isk-l-ó "M-o" "'o") + (isk-u-Ó "M-O" "'O") + (isk-l-ú "M-u" "'u") + (isk-u-Ú "M-U" "'U") + (isk-l-ý "M-y" "'y") + (isk-u-Ý "M-Y" "'Y") + (isk-l-þ "M-t" "th") + (isk-u-Þ "M-T" "TH") + (isk-l-đ "M-d" "dh") + (isk-u-Đ "M-D" "DH")) + + ;;;; Key Mapping -------------------------------------------------------------- ;;; Conventions: @@ -652,6 +707,7 @@ ("H-F12" "refresh-heads")) + ;; (stumpwm::unbind-remapped-keys) (define-remapped-keys '(("st-256color" diff -r 15f446854045 -r ea87bf0407c4 tmux/tmux.conf --- a/tmux/tmux.conf Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -# Use something easier to type as the prefix. -set -g prefix C-f -unbind C-b -bind C-f send-prefix - -# Relax! -set -sg escape-time 0 -set -sg repeat-time 600 - -# Shut up. -#set -g quiet on - -# Focus -set -g focus-events - -# Mouse -set -g mouse on - -# Less stretching to get to the first item. -set -g base-index 1 -setw -g pane-base-index 1 - -# Reload the config. -bind R source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf" - -# Rename session. -bind r command-prompt -I "#S" "rename-session '%%'" - -# Saner splitting. -bind v split-window -h -c '#{pane_current_path}' -bind s split-window -v -c '#{pane_current_path}' -bind S choose-session - -# Pane movement -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R - -# DVTM style pane selection -# bind 1 select-pane -t 1 -# bind 2 select-pane -t 2 -# bind 3 select-pane -t 3 -# bind 4 select-pane -t 4 -# bind 5 select-pane -t 5 -# bind 6 select-pane -t 6 -# bind 7 select-pane -t 7 -# bind 8 select-pane -t 8 -# bind 9 select-pane -t 9 - -# Layouts -# set -g main-pane-width 260 -# bind M select-layout main-vertical -# bind E select-layout even-horizontal - -# Pane resizing -bind -r C-h resize-pane -L 5 -bind -r C-j resize-pane -D 5 -bind -r C-k resize-pane -U 5 -bind -r C-l resize-pane -R 5 - -# Window movement -# Only really makes sense if you have your parens bound to shifts like me. -bind -r ( select-window -t :- -bind -r ) select-window -t :+ -bind-key -r H swap-window -t -1 -bind-key -r L swap-window -t +1 -bind m command-prompt "move-window -t %%" -bind - choose-tree - -# 256 colors please -set -g default-terminal "screen-256color" -# set -g default-terminal "tmux-256color" - -# Bad Wolf -set -g status-fg white -set -g status-bg colour234 -set -g window-status-activity-attr bold -set -g pane-border-fg colour245 -set -g pane-active-border-fg colour39 -set -g message-fg colour16 -set -g message-bg colour221 -set -g message-attr bold - -# Custom status bar -# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤ -set -g status-left-length 32 -set -g status-right-length 150 -set -g status-interval 5 - -set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour238,bg=colour234,nobold] ' - -set -g status-right "#[fg=colour245]#(date -u +%%H:%%M) UTC %d %b #[fg=colour16,bg=colour254,bold] #h " - -set -g window-status-format "#[fg=white,bg=colour234] #I #W " -set -g window-status-current-format "#[fg=colour16,bg=colour39,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold] " - -# Activity -setw -g monitor-activity on -set -g visual-activity off - -# Autorename sanely. -# setw -g automatic-rename on - -# Better name management -bind c new-window -a -bind , command-prompt "rename-window '%%'" -bind > run-shell "tmux rename-window `basename #{pane_current_path}`" - -# Copy mode -setw -g mode-keys vi -bind ` copy-mode -unbind [ -unbind p -bind p paste-buffer - -bind -T copy-mode-vi 'v' send -X begin-selection -bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy -bind -T copy-mode-vi Escape send -X cancel -bind -T copy-mode-vi V send -X rectangle-toggle -bind -T copy-mode-vi H send-keys -X start-of-line -bind -T copy-mode-vi L send-keys -X end-of-line -bind y run "tmux save-buffer - | xsel --clipboard --input" - -# Toggle synchronized panes for the current window -bind S set synchronize-panes - -# Let neovim change the cursor shape -set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' - diff -r 15f446854045 -r ea87bf0407c4 vim/autoload/Powerline/Colorschemes/badwolf.vim --- a/vim/autoload/Powerline/Colorschemes/badwolf.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -call Pl#Hi#Allocate({ - \ 'black' : 16, - \ 'white' : 231, - \ - \ 'darkestgreen' : 22, - \ 'darkgreen' : 28, - \ 'mediumgreen' : 70, - \ 'brightgreen' : 148, - \ - \ 'darkestcyan' : 23, - \ 'mediumcyan' : 117, - \ - \ 'darkestblue' : 24, - \ 'darkblue' : 31, - \ - \ 'darkestred' : 52, - \ 'darkred' : 88, - \ 'mediumred' : 124, - \ 'brightred' : 160, - \ 'brightestred' : 196, - \ - \ 'darkestpurple' : 55, - \ 'mediumpurple' : 98, - \ 'brightpurple' : 189, - \ - \ 'brightorange' : 208, - \ 'brightestorange': 214, - \ - \ 'gray0' : 234, - \ 'gray1' : 235, - \ 'gray2' : 236, - \ 'gray3' : 238, - \ 'gray4' : 240, - \ 'gray5' : 241, - \ 'gray6' : 244, - \ 'gray7' : 245, - \ 'gray8' : 247, - \ 'gray9' : 250, - \ 'gray10' : 252, - \ }) - -let g:Powerline#Colorschemes#badwolf#colorscheme = Pl#Colorscheme#Init([ - \ Pl#Hi#Segments(['SPLIT'], { - \ 'n': ['white', 'gray2'], - \ 'N': ['white', 'gray1'], - \ 'i': ['white', 'darkestblue'], - \ }), - \ - \ Pl#Hi#Segments(['mode_indicator'], { - \ 'n': ['darkestgreen', 'brightgreen', ['bold']], - \ 'i': ['darkestcyan', 'white', ['bold']], - \ 'v': ['darkred', 'brightorange', ['bold']], - \ 'r': ['white', 'brightred', ['bold']], - \ 's': ['white', 'gray5', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['branch', 'scrollpercent', 'raw', 'filesize'], { - \ 'n': ['gray9', 'gray4'], - \ 'N': ['gray4', 'gray2'], - \ 'i': ['mediumcyan', 'darkblue'], - \ }), - \ - \ Pl#Hi#Segments(['fileinfo', 'filename'], { - \ 'n': ['white', 'gray4', ['bold']], - \ 'N': ['gray7', 'gray2', ['bold']], - \ 'i': ['white', 'darkblue', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['fileinfo.filepath'], { - \ 'n': ['gray10'], - \ 'N': ['gray6'], - \ 'i': ['mediumcyan'], - \ }), - \ - \ Pl#Hi#Segments(['static_str'], { - \ 'n': ['white', 'gray4'], - \ 'N': ['gray7', 'gray1'], - \ 'i': ['white', 'darkblue'], - \ }), - \ - \ Pl#Hi#Segments(['fileinfo.flags'], { - \ 'n': ['brightestred', ['bold']], - \ 'N': ['darkred'], - \ 'i': ['brightestred', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['currenttag', 'fullcurrenttag', 'fileformat', 'fileencoding', 'pwd', 'filetype', 'rvm:string', 'rvm:statusline', 'virtualenv:statusline', 'charcode', 'currhigroup'], { - \ 'n': ['gray8', 'gray2'], - \ 'i': ['mediumcyan', 'darkestblue'], - \ }), - \ - \ Pl#Hi#Segments(['lineinfo'], { - \ 'n': ['gray2', 'gray10', ['bold']], - \ 'N': ['gray7', 'gray3', ['bold']], - \ 'i': ['darkestcyan', 'mediumcyan', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['errors'], { - \ 'n': ['brightestorange', 'gray2', ['bold']], - \ 'i': ['brightestorange', 'darkestblue', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['lineinfo.line.tot'], { - \ 'n': ['gray6'], - \ 'N': ['gray5'], - \ 'i': ['darkestcyan'], - \ }), - \ - \ Pl#Hi#Segments(['paste_indicator', 'ws_marker'], { - \ 'n': ['white', 'brightred', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['gundo:static_str.name', 'command_t:static_str.name'], { - \ 'n': ['white', 'mediumred', ['bold']], - \ 'N': ['brightred', 'darkestred', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['gundo:static_str.buffer', 'command_t:raw.line'], { - \ 'n': ['white', 'darkred'], - \ 'N': ['brightred', 'darkestred'], - \ }), - \ - \ Pl#Hi#Segments(['gundo:SPLIT', 'command_t:SPLIT'], { - \ 'n': ['white', 'darkred'], - \ 'N': ['white', 'darkestred'], - \ }), - \ - \ Pl#Hi#Segments(['lustyexplorer:static_str.name', 'minibufexplorer:static_str.name', 'nerdtree:raw.name', 'tagbar:static_str.name'], { - \ 'n': ['white', 'mediumgreen', ['bold']], - \ 'N': ['mediumgreen', 'darkestgreen', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['lustyexplorer:static_str.buffer', 'tagbar:static_str.buffer'], { - \ 'n': ['brightgreen', 'darkgreen'], - \ 'N': ['mediumgreen', 'darkestgreen'], - \ }), - \ - \ Pl#Hi#Segments(['lustyexplorer:SPLIT', 'minibufexplorer:SPLIT', 'nerdtree:SPLIT', 'tagbar:SPLIT'], { - \ 'n': ['white', 'darkgreen'], - \ 'N': ['white', 'darkestgreen'], - \ }), - \ - \ Pl#Hi#Segments(['ctrlp:focus', 'ctrlp:byfname'], { - \ 'n': ['brightpurple', 'darkestpurple'], - \ }), - \ - \ Pl#Hi#Segments(['ctrlp:prev', 'ctrlp:next', 'ctrlp:pwd'], { - \ 'n': ['white', 'mediumpurple'], - \ }), - \ - \ Pl#Hi#Segments(['ctrlp:item'], { - \ 'n': ['darkestpurple', 'white', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['ctrlp:marked'], { - \ 'n': ['brightestred', 'darkestpurple', ['bold']], - \ }), - \ - \ Pl#Hi#Segments(['ctrlp:count'], { - \ 'n': ['darkestpurple', 'white'], - \ }), - \ - \ Pl#Hi#Segments(['ctrlp:SPLIT'], { - \ 'n': ['white', 'darkestpurple'], - \ }), - \ ]) diff -r 15f446854045 -r ea87bf0407c4 vim/colors/molokai.vim --- a/vim/colors/molokai.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +0,0 @@ -" Vim color file -" -" Author: Tomas Restrepo -" Modified by: Steve Losh -" -" Note: Based on the monokai theme for textmate -" by Wimer Hazenberg and its darker variant -" by Hamish Stuart Macpherson -" - -set background=dark -let g:colors_name="molokai" - -" Basic Layout {{{ - -hi Normal guifg=#F8F8F2 guibg=#1B1E1F -hi Folded guifg=#666666 guibg=bg -hi CursorLine guibg=#232728 -hi CursorColumn guibg=#232728 -hi ColorColumn guibg=#232728 -hi LineNr guifg=#AAAAAA guibg=bg -hi FoldColumn guifg=#AAAAAA guibg=bg -hi VertSplit guifg=#AAAAAA guibg=bg gui=none -hi Search guifg=#000000 guibg=#E4E500 -hi IncSearch guibg=#000000 guifg=#FF8D00 -hi Operator guifg=#F92672 -hi MatchParen guifg=#ffec00 guibg=#232728 gui=bold - -" }}} -" Syntax {{{ - -hi Boolean guifg=#AE81FF -hi Comment guifg=#5c7176 -hi Character guifg=#E6DB74 -hi Number guifg=#AE81FF -hi String guifg=#E6DB74 -hi Conditional guifg=#F92672 gui=bold -hi Constant guifg=#AE81FF gui=bold -hi Debug guifg=#BCA3A3 gui=bold -hi Define guifg=#66D9EF -hi Delimiter guifg=#8F8F8F -hi Float guifg=#AE81FF -hi Function guifg=#A6E22E -hi Identifier guifg=#FD971F -hi Error guifg=#960050 guibg=#1E0010 -hi Keyword guifg=#F92672 gui=bold -hi Label guifg=#E6DB74 gui=none -hi Macro guifg=#C4BE89 gui=italic -hi SpecialKey guifg=#66D9EF gui=italic - -" }}} -" Diffs {{{ - -hi DiffAdd guibg=#1e4313 -hi DiffChange guifg=#89807D guibg=#322F2D -hi DiffDelete guifg=#ff0088 guibg=#1B1E1F -hi DiffText guibg=#4A4340 gui=italic,bold - -" }}} -" Cursor {{{ - -hi Cursor guifg=#000000 guibg=#F35FBC -hi iCursor guifg=#000000 guibg=#FDFF00 -hi vCursor guifg=#000000 guibg=#AAF412 - -" }}} -" Block Colors {{{ - -hi BlockColor1 guibg=#2a2a2a -hi BlockColor2 guibg=#333333 -hi BlockColor3 guibg=#3b3b3b -hi BlockColor4 guibg=#424242 - -" }}} -" Makegreen {{{ - -hi GreenBar term=reverse ctermfg=white ctermbg=green guifg=black guibg=#9edf1c -hi RedBar term=reverse ctermfg=white ctermbg=red guifg=white guibg=#C50048 - -" }}} -" EasyMotion {{{ - -hi EasyMotionTarget guifg=#E4E500 guibg=bg gui=bold -hi EasyMotionShade guifg=#444444 guibg=bg - -" }}} - -hi Directory guifg=#A6E22E gui=bold -hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold -hi Exception guifg=#A6E22E gui=bold -hi Ignore guifg=#808080 guibg=bg - - -hi InterestingWord1 guifg=#000000 guibg=#FFA700 -hi InterestingWord2 guifg=#000000 guibg=#53FF00 -hi InterestingWord3 guifg=#000000 guibg=#FF74F8 - - -hi ModeMsg guifg=#E6DB74 -hi MoreMsg guifg=#E6DB74 - -" Completion Menu {{{ -hi Pmenu guifg=#cccccc guibg=#232728 -hi PmenuSel guifg=#000000 guibg=#AAF412 -hi PmenuSbar guibg=#131414 -hi PmenuThumb guifg=#777777 -" }}} - -hi PreCondit guifg=#A6E22E gui=bold -hi PreProc guifg=#A6E22E -hi Question guifg=#66D9EF -hi Repeat guifg=#F92672 gui=bold - -" marks column -hi IndentGuides guibg=#373737 -hi SignColumn guifg=#A6E22E guibg=#151617 -hi SpecialChar guifg=#F92672 gui=bold -hi SpecialComment guifg=#465457 gui=bold -hi Special guifg=#66D9EF guibg=bg gui=italic -hi SpecialKey guifg=#888A85 gui=italic -hi Statement guifg=#F92672 gui=bold -hi StatusLine guifg=#262626 guibg=fg -hi StatusLineNC guifg=#262626 guibg=#080808 -hi StorageClass guifg=#FD971F gui=italic -hi Structure guifg=#66D9EF -hi Tag guifg=#F92672 gui=italic -hi Title guifg=#ef5939 -hi Todo guifg=#FFFFFF guibg=bg gui=bold - -hi Typedef guifg=#66D9EF -hi Type guifg=#66D9EF gui=none -hi Underlined guifg=#808080 gui=underline - -hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold -hi WildMenu guifg=#66D9EF guibg=#000000 - -hi MyTagListFileName guifg=#F92672 guibg=bg gui=bold - -" Spelling {{{ -if has("spell") - hi SpellBad guisp=#FF0000 gui=undercurl - hi SpellCap guisp=#7070F0 gui=undercurl - hi SpellLocal guisp=#70F0F0 gui=undercurl - hi SpellRare guisp=#FFFFFF gui=undercurl -endif -" }}} -" Visual Mode {{{ -hi VisualNOS guibg=#403D3D -hi Visual guibg=#403D3D -" }}} -" Invisible character colors {{{ -highlight NonText guifg=#444444 guibg=bg -highlight SpecialKey guifg=#444444 guibg=bg -" }}} - -" Support for 256-color terminals {{{ -if &t_Co > 255 - hi Boolean ctermfg=135 - hi Character ctermfg=144 - hi Number ctermfg=135 - hi String ctermfg=144 - hi Conditional ctermfg=161 cterm=bold - hi Constant ctermfg=135 cterm=bold - hi Cursor ctermfg=16 ctermbg=253 - hi Debug ctermfg=225 cterm=bold - hi Define ctermfg=81 - hi Delimiter ctermfg=241 - - hi EasyMotionTarget ctermfg=11 - hi EasyMotionShade ctermfg=8 - - hi DiffAdd ctermbg=24 - hi DiffChange ctermfg=181 ctermbg=239 - hi DiffDelete ctermfg=162 ctermbg=53 - hi DiffText ctermbg=102 cterm=bold - - hi Directory ctermfg=118 cterm=bold - hi Error ctermfg=219 ctermbg=89 - hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold - hi Exception ctermfg=118 cterm=bold - hi Float ctermfg=135 - hi FoldColumn ctermfg=67 ctermbg=233 - hi Folded ctermfg=67 ctermbg=233 - hi Function ctermfg=118 - hi Identifier ctermfg=208 - hi Ignore ctermfg=244 ctermbg=232 - hi IncSearch ctermfg=193 ctermbg=16 - - hi Keyword ctermfg=161 cterm=bold - hi Label ctermfg=229 cterm=none - hi Macro ctermfg=193 - hi SpecialKey ctermfg=81 - hi MailHeaderEmail ctermfg=3 ctermbg=233 - hi MailEmail ctermfg=3 ctermbg=233 - - hi MatchParen ctermfg=16 ctermbg=208 cterm=bold - hi ModeMsg ctermfg=229 - hi MoreMsg ctermfg=229 - hi Operator ctermfg=161 - - " complete menu - hi Pmenu ctermfg=81 ctermbg=16 - hi PmenuSel ctermbg=244 - hi PmenuSbar ctermbg=232 - hi PmenuThumb ctermfg=81 - - hi PreCondit ctermfg=118 cterm=bold - hi PreProc ctermfg=118 - hi Question ctermfg=81 - hi Repeat ctermfg=161 cterm=bold - hi Search ctermfg=253 ctermbg=66 - - " marks column - hi SignColumn ctermfg=118 ctermbg=235 - hi SpecialChar ctermfg=161 cterm=bold - hi SpecialComment ctermfg=245 cterm=bold - hi Special ctermfg=81 ctermbg=232 - hi SpecialKey ctermfg=245 - - hi Statement ctermfg=161 cterm=bold - hi StatusLine ctermfg=130 ctermbg=15 - hi StatusLineNC ctermfg=242 ctermbg=15 - hi StorageClass ctermfg=208 - hi Structure ctermfg=81 - hi Tag ctermfg=161 - hi Title ctermfg=166 - hi Todo ctermfg=231 ctermbg=232 cterm=bold - - hi Typedef ctermfg=81 - hi Type ctermfg=81 cterm=none - hi Underlined ctermfg=244 cterm=underline - - hi VertSplit ctermfg=244 ctermbg=232 cterm=bold - hi VisualNOS ctermbg=238 - hi Visual ctermbg=235 - hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold - hi WildMenu ctermfg=81 ctermbg=16 - - hi Normal ctermfg=252 ctermbg=233 - hi Comment ctermfg=59 - hi CursorLine ctermbg=234 cterm=none - hi CursorColumn ctermbg=234 - hi ColorColumn ctermbg=234 - hi LineNr ctermfg=250 ctermbg=233 - hi NonText ctermfg=240 ctermbg=233 -end " }}} diff -r 15f446854045 -r ea87bf0407c4 vim/colors/mustang.vim --- a/vim/colors/mustang.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -" Maintainer: Henrique C. Alves (hcarvalhoalves@gmail.com) -" Version: 1.0 -" Last Change: September 25 2008 - -set background=dark - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "mustang" - -" Vim >= 7.0 specific colors -if version >= 700 - hi CursorLine guibg=#2d2d2d ctermbg=236 - hi ColorColumn guibg=#2d2d2d ctermbg=236 - hi CursorColumn guibg=#2D2D2D ctermbg=236 - hi MatchParen guifg=#d0ffc0 guibg=#2f2f2f gui=bold ctermfg=157 ctermbg=237 cterm=bold - hi Pmenu guifg=#ffffff guibg=#444444 ctermfg=255 ctermbg=238 - hi PmenuSel guifg=#000000 guibg=#b1d631 ctermfg=0 ctermbg=148 -endif - -" General colors -hi Cursor guifg=NONE guibg=#626262 gui=none ctermbg=241 -hi Normal guifg=#e2e2e5 guibg=#202020 gui=none ctermfg=253 ctermbg=234 -hi NonText guifg=#808080 guibg=#202020 gui=none ctermfg=244 ctermbg=235 -hi LineNr guifg=#808080 guibg=#000000 gui=none ctermfg=244 ctermbg=232 -hi StatusLine guifg=#d3d3d5 guibg=#444444 gui=italic ctermfg=253 ctermbg=238 cterm=italic -hi StatusLineNC guifg=#939395 guibg=#444444 gui=none ctermfg=246 ctermbg=238 -hi VertSplit guifg=#444444 guibg=#444444 gui=none ctermfg=238 ctermbg=238 -hi Folded guibg=#202020 guifg=#808080 gui=none ctermbg=4 ctermfg=248 -hi Title guifg=#f6f3e8 guibg=NONE gui=bold ctermfg=254 cterm=bold -hi Visual guifg=#faf4c6 guibg=#3c414c gui=none ctermfg=254 ctermbg=4 -hi SpecialKey guifg=#808080 guibg=#202020 gui=none ctermfg=244 ctermbg=236 - -" Syntax highlighting -hi Comment guifg=#606060 gui=italic ctermfg=244 -hi Todo guifg=#8f8f8f gui=italic ctermfg=245 -hi Boolean guifg=#b1d631 gui=none ctermfg=148 -hi String guifg=#b1d631 gui=italic ctermfg=148 -hi Identifier guifg=#b1d631 gui=none ctermfg=148 -hi Function guifg=#ffffff gui=bold ctermfg=255 -hi Type guifg=#7e8aa2 gui=none ctermfg=103 -hi Statement guifg=#7e8aa2 gui=none ctermfg=103 -hi Keyword guifg=#ff9800 gui=none ctermfg=208 -hi Constant guifg=#ff9800 gui=none ctermfg=208 -hi Number guifg=#ff9800 gui=none ctermfg=208 -hi Special guifg=#ff9800 gui=none ctermfg=208 -hi PreProc guifg=#faf4c6 gui=none ctermfg=230 -hi Todo guifg=#000000 guibg=#e6ea50 gui=italic - -" Code-specific colors -hi pythonOperator guifg=#7e8aa2 gui=none ctermfg=103 - -" Cursor Colors -hi Cursor guifg=#000000 guibg=#F35FBC -hi iCursor guifg=#000000 guibg=#FDFF00 -hi vCursor guifg=#000000 guibg=#AAF412 diff -r 15f446854045 -r ea87bf0407c4 vim/colors/vitamins.vim --- a/vim/colors/vitamins.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -" Maintainer: Henrique C. Alves (hcarvalhoalves@gmail.com) -" Version: 1.1 -" Last Change: September 23 2008 - -set background=dark - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "vitamins" - -" Vim >= 7.0 specific colors -if version >= 700 - hi CursorLine guibg=#2d2d2d ctermbg=236 - hi ColorColumn guibg=#2d2d2d ctermbg=236 - hi CursorColumn guibg=#2d2d2d ctermbg=236 - hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=bold ctermbg=59 - hi Pmenu guifg=#f6f3e8 guibg=#444444 ctermbg=242 - hi PmenuSel guifg=#000000 guibg=#cdd129 ctermfg=0 ctermbg=184 -endif - -" General colors -hi Cursor guifg=NONE guibg=#656565 gui=none ctermbg=0x241 -hi Normal guifg=#f6f3f0 guibg=#212121 gui=none ctermfg=254 ctermbg=235 -hi NonText guifg=#808080 guibg=#212121 gui=none ctermfg=242 ctermbg=237 -hi LineNr guifg=#5c5a4f guibg=#000000 gui=none ctermfg=239 ctermbg=232 -hi StatusLine guifg=#f6f3e8 guibg=#444444 gui=italic -hi StatusLineNC guifg=#857b6f guibg=#444444 gui=none -hi VertSplit guifg=#777777 guibg=#212121 gui=none -hi Folded guibg=#212121 guifg=#777777 gui=none -hi Title guifg=#f6f3e8 guibg=NONE gui=bold -hi Visual guifg=#ffffd7 guibg=#444444 gui=none ctermfg=186 ctermbg=238 -hi SpecialKey guifg=#808080 guibg=#212121 gui=none - -" Syntax highlighting -hi Comment guifg=#aaaaaa gui=italic ctermfg=244 -hi Todo guifg=#8f8f8f gui=italic ctermfg=245 -hi Constant guifg=#acf0f2 gui=none ctermfg=159 -hi String guifg=#ff5d28 gui=italic ctermfg=202 -hi Identifier guifg=#ff5d28 gui=none ctermfg=202 -hi Function guifg=#cdd129 gui=none ctermfg=184 -hi Type guifg=#cdd129 gui=none ctermfg=184 -hi Statement guifg=#af5f5f gui=none ctermfg=131 -hi Keyword guifg=#cdd129 gui=none ctermfg=184 -hi PreProc guifg=#ede39e gui=none ctermfg=187 -hi Number guifg=#ede39e gui=none ctermfg=187 -hi Special guifg=#acf0f2 gui=none ctermfg=159 - -" Cursor Colors -hi Cursor guifg=#000000 guibg=#AAF412 -hi iCursor guifg=#000000 guibg=#FDFF00 -hi vCursor guifg=#000000 guibg=#FDFF00 diff -r 15f446854045 -r ea87bf0407c4 vim/compiler/cake-test-wrapper.py --- a/vim/compiler/cake-test-wrapper.py Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -#!/usr/bin/env python - -import os, subprocess - -def parse_filename(l): - ns = l.split(' ', 3)[-1].rsplit('/', 1)[0] - return os.path.join('./test', *ns.split('.')) + '.clj' - -def process_error(fn, l, lines): - lnum = int(l.rsplit(' ', 1)[-1].split(':')[-1]) - - message = lines.pop(0) - - print '%s:%d:%s' % (fn, lnum, message) - - return message - -if __name__ == '__main__': - out = subprocess.check_output(r"cake test | perl -pe 's/\e\[?.*?[\@-~]//g'", shell=True) - - prev = "" - fn = None - lines = out.splitlines() - while lines: - l = lines.pop(0) - if l.startswith('cake test ') and '/' in l: - fn = parse_filename(l) - - if l.startswith('FAIL!'): - prev = process_error(fn, l, lines) - else: - prev = l - diff -r 15f446854045 -r ea87bf0407c4 vim/compiler/clojure.vim --- a/vim/compiler/clojure.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -"============================================================================ -"Compiler: Clojure (cake test) -"Maintainer: Steve Losh -"License: MIT/X11 -"============================================================================ - -" if exists("current_compiler") -" finish -" endif -let current_compiler = "clojure" - -let s:cpo_save = &cpo -set cpo-=C"endif - -let &l:makeprg=fnameescape(globpath(&runtimepath, 'compiler/cake-test-wrapper.py')) - -setlocal errorformat=%f:%l:%m - -let &cpo = s:cpo_save -unlet s:cpo_save diff -r 15f446854045 -r ea87bf0407c4 vim/custom-dictionary.utf-8.add --- a/vim/custom-dictionary.utf-8.add Thu May 05 17:31:55 2022 -0400 +++ b/vim/custom-dictionary.utf-8.add Thu May 05 17:33:06 2022 -0400 @@ -316,3 +316,4 @@ metaclass async valkyrie +Greatshield diff -r 15f446854045 -r ea87bf0407c4 vim/ftdetect/io.vim --- a/vim/ftdetect/io.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -" Io -au BufNewFile,BufRead *.io set filetype=io - -" Ikefile -au BufNewFile,BufRead [iI]kefile,*.ike set filetype=io diff -r 15f446854045 -r ea87bf0407c4 vim/haskellmode.config --- a/vim/haskellmode.config Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,249 +0,0 @@ --- 7.4.1 -AlternativeLayoutRule -AlternativeLayoutRuleTransitional -Arrows -BangPatterns -CApiFFI -CPP -ConstrainedClassMethods -ConstraintKinds -DataKinds -DatatypeContexts -DefaultSignatures -DeriveDataTypeable -DeriveFoldable -DeriveFunctor -DeriveGeneric -DeriveTraversable -DisambiguateRecordFields -DoAndIfThenElse -DoRec -EmptyDataDecls -ExistentialQuantification -ExplicitForAll -ExtendedDefaultRules -FlexibleContexts -FlexibleInstances -ForeignFunctionInterface -FunctionalDependencies -GADTSyntax -GADTs -GHCForeignImportPrim -GeneralizedNewtypeDeriving -Haskell2010 -Haskell98 -ImplicitParams -ImplicitPrelude -ImpredicativeTypes -IncoherentInstances -InterruptibleFFI -KindSignatures -LiberalTypeSynonyms -MagicHash -MonadComprehensions -MonoLocalBinds -MonoPatBinds -MonomorphismRestriction -MultiParamTypeClasses -NPlusKPatterns -NamedFieldPuns -NoAlternativeLayoutRule -NoAlternativeLayoutRuleTransitional -NoArrows -NoBangPatterns -NoCApiFFI -NoCPP -NoConstrainedClassMethods -NoConstraintKinds -NoDataKinds -NoDatatypeContexts -NoDefaultSignatures -NoDeriveDataTypeable -NoDeriveFoldable -NoDeriveFunctor -NoDeriveGeneric -NoDeriveTraversable -NoDisambiguateRecordFields -NoDoAndIfThenElse -NoDoRec -NoEmptyDataDecls -NoExistentialQuantification -NoExplicitForAll -NoExtendedDefaultRules -NoFlexibleContexts -NoFlexibleInstances -NoForeignFunctionInterface -NoFunctionalDependencies -NoGADTSyntax -NoGADTs -NoGHCForeignImportPrim -NoGeneralizedNewtypeDeriving -NoImplicitParams -NoImplicitPrelude -NoImpredicativeTypes -NoIncoherentInstances -NoInterruptibleFFI -NoKindSignatures -NoLiberalTypeSynonyms -NoMagicHash -NoMonadComprehensions -NoMonoLocalBinds -NoMonoPatBinds -NoMonomorphismRestriction -NoMultiParamTypeClasses -NoNPlusKPatterns -NoNamedFieldPuns -NoNondecreasingIndentation -NoOverlappingInstances -NoOverloadedStrings -NoPackageImports -NoParallelArrays -NoParallelListComp -NoPatternGuards -NoPatternSignatures -NoPolyKinds -NoPolymorphicComponents -NoPostfixOperators -NoQuasiQuotes -NoRank2Types -NoRankNTypes -NoRebindableSyntax -NoRecordPuns -NoRecordWildCards -NoRecursiveDo -NoRelaxedLayout -NoRelaxedPolyRec -NoScopedTypeVariables -NoStandaloneDeriving -NoTemplateHaskell -NoTraditionalRecordSyntax -NoTransformListComp -NoTupleSections -NoTypeFamilies -NoTypeOperators -NoTypeSynonymInstances -NoUnboxedTuples -NoUndecidableInstances -NoUnicodeSyntax -NoUnliftedFFITypes -NoViewPatterns -NondecreasingIndentation -OverlappingInstances -OverloadedStrings -PackageImports -ParallelArrays -ParallelListComp -PatternGuards -PatternSignatures -PolyKinds -PolymorphicComponents -PostfixOperators -QuasiQuotes -Rank2Types -RankNTypes -RebindableSyntax -RecordPuns -RecordWildCards -RecursiveDo -RelaxedLayout -RelaxedPolyRec -Safe -ScopedTypeVariables -StandaloneDeriving -TemplateHaskell -TraditionalRecordSyntax -TransformListComp -Trustworthy -TupleSections -TypeFamilies -TypeOperators -TypeSynonymInstances -UnboxedTuples -UndecidableInstances -UnicodeSyntax -UnliftedFFITypes -Unsafe -ViewPatterns --- --fdo-lambda-eta-expansion --fembed-manifest --fgen-manifest --fghci-history --fghci-sandbox --fhelpful-errors --fignore-interface-pragmas --fimplicit-import-qualified --fno-break-on-error --fno-break-on-exception --fno-building-cabal-package --fno-case-merge --fno-cse --fno-dicts-cheap --fno-do-eta-reduction --fno-eager-blackholing --fno-enable-rewrite-rules --fno-excess-precision --fno-expose-all-unfoldings --fno-ext-core --fno-float-in --fno-force-recomp --fno-full-laziness --fno-hpc-no-auto --fno-ignore-asserts --fno-liberate-case --fno-new-codegen --fno-pedantic-bottoms --fno-print-bind-result --fno-print-evld-with-show --fno-print-explicit-foralls --fno-prof-cafs --fno-regs-graph --fno-regs-iterative --fno-rewrite-rules --fno-run-cps --fno-run-cpsz --fno-spec-constr --fno-specialise --fno-static-argument-transformation --fno-strictness --fno-unbox-strict-fields --fno-vectorise --fno-warn-auto-orphans --fno-warn-dodgy-exports --fno-warn-dodgy-imports --fno-warn-hi-shadowing --fno-warn-identities --fno-warn-implicit-prelude --fno-warn-incomplete-patterns --fno-warn-incomplete-record-updates --fno-warn-incomplete-uni-patterns --fno-warn-missing-import-lists --fno-warn-missing-local-sigs --fno-warn-missing-signatures --fno-warn-monomorphism-restriction --fno-warn-name-shadowing --fno-warn-orphans --fno-warn-safe --fno-warn-tabs --fno-warn-type-defaults --fno-warn-unsafe --fno-warn-unused-binds --fno-warn-unused-do-bind --fno-warn-unused-imports --fno-warn-unused-matches --fomit-interface-pragmas --fprint-bind-contents --fprof-count-entries --fshared-implib --fwarn-alternative-layout-rule-transitional --fwarn-deprecated-flags --fwarn-deprecations --fwarn-dodgy-foreign-imports --fwarn-duplicate-exports --fwarn-lazy-unlifted-bindings --fwarn-missing-fields --fwarn-missing-methods --fwarn-overlapping-patterns --fwarn-unrecognised-pragmas --fwarn-warnings-deprecations --fwarn-wrong-do-bind diff -r 15f446854045 -r ea87bf0407c4 vim/init.vim --- a/vim/init.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/Users/sjl/.vimrc \ No newline at end of file diff -r 15f446854045 -r ea87bf0407c4 vim/jsl.conf --- a/vim/jsl.conf Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -# -# Configuration File for JavaScript Lint 0.3.0 -# Developed by Matthias Miller (http://www.JavaScriptLint.com) -# -# This configuration file can be used to lint a collection of scripts, or to enable -# or disable warnings for scripts that are linted via the command line. -# - -### Warnings -# Enable or disable warnings based on requirements. -# Use "+WarningName" to display or "-WarningName" to suppress. -# -+no_return_value # function {0} does not always return a value -+duplicate_formal # duplicate formal argument {0} -+equal_as_assign # test for equality (==) mistyped as assignment (=)?{0} -+var_hides_arg # variable {0} hides argument -+redeclared_var # redeclaration of {0} {1} -+anon_no_return_value # anonymous function does not always return a value -+missing_semicolon # missing semicolon -+meaningless_block # meaningless block; curly braces have no impact -+comma_separated_stmts # multiple statements separated by commas (use semicolons?) -+unreachable_code # unreachable code -+missing_break # missing break statement -+missing_break_for_last_case # miss-+-------------+ent for last case in switch -+comparison_type_conv # compa|isons against|null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==) -+inc_dec_within_stmt # incre|ent (++) and |ecrement (--) operators used as part of greater statement -+useless_void # use o| the void typ| may be unnecessary (void is always undefined) -+multiple_plus_minus # unkno|n order of op|rations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs -+use_of_label # use o| label | -+block_without_braces # block|statement wit|out curly braces -+leading_decimal_point # leadi|g decimal poi|t may indicate a number or an object member -+trailing_decimal_point # trail|ng decimal po|nt may indicate a number or an object member -+octal_number # leadi|g zeros make |n octal number -+nested_comment # neste+-------------+ -+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma --ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement -+empty_statement # empty statement or extra semicolon --missing_option_explicit # the "option explicit" control comment is missing -+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag -+dup_option_explicit # duplicate "option explicit" control comment -+useless_assign # useless assignment -+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity -+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent) -+missing_default_case # missing default case in switch statement -+duplicate_case_in_switch # duplicate case in switch statements -+default_not_at_end # the default case is not at the end of the switch statement -+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax -+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax -+useless_comparison # useless comparison; comparing identical expressions -+with_statement # with statement hides undeclared variables; use temporary variable instead -+trailing_comma_in_array # extra comma is not recommended in array initializers -+assign_to_function_call # assignment to a function call -+parseint_missing_radix # parseInt missing radix parameter - - -### Output format -# Customize the format of the error message. -# __FILE__ indicates current file path -# __FILENAME__ indicates current file name -# __LINE__ indicates current line -# __ERROR__ indicates error message -# -# Visual Studio syntax (default): -+output-format __FILE__(__LINE__): __ERROR__ -# Alternative syntax: -#+output-format __FILE__:__LINE__: __ERROR__ - - -### Context -# Show the in-line position of the error. -# Use "+context" to display or "-context" to suppress. -# -+context - - -### Semicolons -# By default, assignments of an anonymous function to a variable or -# property (such as a function prototype) must be followed by a semicolon. -# -+lambda_assign_requires_semicolon - - -### Control Comments -# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for -# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is -# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason, -# although legacy control comments are enabled by default for backward compatibility. -# -+legacy_control_comments - - -### JScript Function Extensions -# JScript allows member functions to be defined like this: -# function MyObj() { /*constructor*/ } -# function MyObj.prototype.go() { /*member function*/ } -# -# It also allows events to be attached like this: -# function window::onload() { /*init page*/ } -# -# This is a Microsoft-only JavaScript extension. Enable this setting to allow them. -# --jscript_function_extensions - - -### Defining identifiers -# By default, "option explicit" is enabled on a per-file basis. -# To enable this for all files, use "+always_use_option_explicit" --always_use_option_explicit - -# Define certain identifiers of which the lint is not aware. -# (Use this in conjunction with the "undeclared identifier" warning.) -# -# Common uses for webpages might be: -+define window -+define document diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/_.snippets --- a/vim/snippets/_.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -# Global snippets - -# (c) holds no legal value ;) -snippet c) - `&enc[:2] == "utf" ? "©" : "(c)"` Copyright `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2} -snippet date - `strftime("%Y-%m-%d")` -snippet sl - http://stevelosh.com/ -snippet gh - http://github.com/ -snippet ghs - http://github.com/sjl/ -snippet bb - http://bitbucket.org/ -snippet bbs - http://bitbucket.org/sjl/ diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/autoit.snippets --- a/vim/snippets/autoit.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -snippet if - If ${1:condition} Then - ${2:; True code} - EndIf -snippet el - Else - ${1} -snippet elif - ElseIf ${1:condition} Then - ${2:; True code} -# If/Else block -snippet ifel - If ${1:condition} Then - ${2:; True code} - Else - ${3:; Else code} - EndIf -# If/ElseIf/Else block -snippet ifelif - If ${1:condition 1} Then - ${2:; True code} - ElseIf ${3:condition 2} Then - ${4:; True code} - Else - ${5:; Else code} - EndIf -# Switch block -snippet switch - Switch (${1:condition}) - Case {$2:case1}: - {$3:; Case 1 code} - Case Else: - {$4:; Else code} - EndSwitch -# Select block -snippet select - Select (${1:condition}) - Case {$2:case1}: - {$3:; Case 1 code} - Case Else: - {$4:; Else code} - EndSelect -# While loop -snippet while - While (${1:condition}) - ${2:; code...} - WEnd -# For loop -snippet for - For ${1:n} = ${3:1} to ${2:count} - ${4:; code...} - Next -# New Function -snippet func - Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): - ${4:Return} - EndFunc -# Message box -snippet msg - MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"}) -# Debug Message -snippet debug - MsgBox(0, "Debug", ${1:"Debug Message"}) -# Show Variable Debug Message -snippet showvar - MsgBox(0, "${1:VarName}", $1) diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/c.snippets --- a/vim/snippets/c.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -# main() -snippet main - int main(int argc, const char *argv[]) - { - ${1} - return 0; - } -# #include <...> -snippet inc - #include <${1:stdio}.h>${2} -# #include "..." -snippet Inc - #include "${1:`Filename("$1.h")`}"${2} -# #ifndef ... #define ... #endif -snippet Def - #ifndef $1 - #define ${1:SYMBOL} ${2:value} - #endif${3} -snippet def - #define -snippet ifdef - #ifdef ${1:FOO} - ${2:#define } - #endif -snippet #if - #if ${1:FOO} - ${2} - #endif -# Header Include-Guard -# (the randomizer code is taken directly from TextMate; it could probably be -# cleaner, I don't know how to do it in vim script) -snippet once - #ifndef ${1:`toupper(Filename('', 'UNTITLED').'_'.system("/usr/bin/ruby -e 'print (rand * 2821109907455).round.to_s(36)'"))`} - - #define $1 - - ${2} - - #endif /* end of include guard: $1 */ -# If Condition -snippet if - if (${1:/* condition */}) { - ${2:/* code */} - } -snippet el - else { - ${1} - } -# Tertiary conditional -snippet t - ${1:/* condition */} ? ${2:a} : ${3:b} -# Do While Loop -snippet do - do { - ${2:/* code */} - } while (${1:/* condition */}); -# While Loop -snippet wh - while (${1:/* condition */}) { - ${2:/* code */} - } -# For Loop -snippet for - for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { - ${4:/* code */} - } -# Custom For Loop -snippet forr - for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { - ${5:/* code */} - } -# Function -snippet fun - ${1:void} ${2:function_name}(${3}) - { - ${4:/* code */} - } -# Function Declaration -snippet fund - ${1:void} ${2:function_name}(${3});${4} -# Typedef -snippet td - typedef ${1:int} ${2:MyCustomType};${3} -# Struct -snippet st - struct ${1:`Filename('$1_t', 'name')`} { - ${2:/* data */} - }${3: /* optional variable list */};${4} -# Typedef struct -snippet tds - typedef struct ${2:_$1 }{ - ${3:/* data */} - } ${1:`Filename('$1_t', 'name')`}; -# Typdef enum -snippet tde - typedef enum { - ${1:/* data */} - } ${2:foo}; -# printf -# unfortunately version this isn't as nice as TextMates's, given the lack of a -# dynamic `...` -snippet pr - printf("${1:%s}\n"${2});${3} -# fprintf (again, this isn't as nice as TextMate's version, but it works) -snippet fpr - fprintf(${1:stderr}, "${2:%s}\n"${3});${4} -snippet . - [${1}]${2} -snippet un - unsigned diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/clojure.snippets --- a/vim/snippets/clojure.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -# Fucking imports, how do they work? -snippet nfis - (:use ${1:foo.core}) -snippet nfi - (:use [${1:foo.core} :only (${2:bar})]) -snippet ni - (:require [${1:foo.core}]) -snippet nia - (:require [${1:foo.core} :as ${2:bar}]) -snippet niar - (:require [${1:foo.core}]) - (:import [$1 ${2:Bar}]) diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/cpp.snippets --- a/vim/snippets/cpp.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# Read File Into Vector -snippet readfile - std::vector v; - if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) { - char buf[1024]; - while (size_t len = fread(buf, 1, sizeof(buf), $2)) - v.insert(v.end(), buf, buf + len); - fclose($2); - }${3} -# std::map -snippet map - std::map<${1:key}, ${2:value}> map${3}; -# std::vector -snippet vector - std::vector<${1:char}> v${2}; -# Namespace -snippet ns - namespace ${1:`Filename('', 'my')`} { - ${2} - } /* $1 */ -# Class -snippet cl - class ${1:`Filename('$1_t', 'name')`} { - public: - $1 (${2:arguments}); - virtual ~$1 (); - - private: - ${3:/* data */} - }; diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/django.snippets --- a/vim/snippets/django.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -# Model Fields - -# Note: Optional arguments are using defaults that match what Django will use -# as a default, e.g. with max_length fields. Doing this as a form of self -# documentation and to make it easy to know whether you should override the -# default or not. - -# Note: Optional arguments that are booleans will use the opposite since you -# can either not specify them, or override them, e.g. auto_now_add=False. - -snippet auto - ${1:FIELDNAME} = models.AutoField() -snippet bool - ${1:FIELDNAME} = models.BooleanField(${2:default=True}) -snippet char - ${1:FIELDNAME} = models.CharField(max_length=${2}${3:, blank=True}) -snippet comma - ${1:FIELDNAME} = models.CommaSeparatedIntegerField(max_length=${2}${3:, blank=True}) -snippet date - ${1:FIELDNAME} = models.DateField() -snippet datetime - ${1:FIELDNAME} = models.DateTimeField() -snippet decimal - ${1:FIELDNAME} = models.DecimalField(max_digits=${2}, decimal_places=${3}) -snippet email - ${1:FIELDNAME} = models.EmailField(max_length=${2:75}${3:, blank=True}) -snippet file - ${1:FIELDNAME} = models.FileField(upload_to=${2:path/for/upload}${3:, max_length=100}) -snippet filepath - ${1:FIELDNAME} = models.FilePathField(path=${2:"/abs/path/to/dir"}${3:, max_length=100}${4:, match="*.ext"}${5:, recursive=True}${6:, blank=True, }) -snippet float - ${1:FIELDNAME} = models.FloatField() -snippet image - ${1:FIELDNAME} = FileBrowseField(format='Image', max_length=200) -snippet djangoimage - ${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100}) -snippet int - ${1:FIELDNAME} = models.IntegerField() -snippet ip - ${1:FIELDNAME} = models.IPAddressField() -snippet nullbool - ${1:FIELDNAME} = models.NullBooleanField() -snippet posint - ${1:FIELDNAME} = models.PositiveIntegerField() -snippet possmallint - ${1:FIELDNAME} = models.PositiveSmallIntegerField() -snippet slug - ${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True}) -snippet smallint - ${1:FIELDNAME} = models.SmallIntegerField() -snippet text - ${1:FIELDNAME} = models.TextField(${2:blank=True}) -snippet time - ${1:FIELDNAME} = models.TimeField() -snippet url - ${1:FIELDNAME} = models.URLField(${2:verify_exists=False}${3:, max_length=200}${4:, blank=True}) -snippet xml - ${1:FIELDNAME} = models.XMLField(schema_path=${2:None}${3:, blank=True}) -# Relational Fields -snippet fk - ${1:FIELDNAME} = models.ForeignKey(${2:OtherModel}) -snippet m2m - ${1:FIELDNAME} = models.ManyToManyField(${2:OtherModel}) -snippet bl - blank=True -snippet dc - db_column='${1:colname}' -snippet dt - db_table='${1:tablename}' -snippet o2o - ${1:FIELDNAME} = models.OneToOneField(${2:OtherModel}${3:, parent_link=True}${4:, related_name=''}${5:, limit_choices_to=}${6:, to_field=''}) - -# Code Skeletons - -snippet form - class ${1:FormName}(forms.Form): - """${2:docstring}""" - ${3} - -snippet manager - class ${1:ModelName}Manager(models.Manager): - def get_query_set(self): - return super($1Manager, self).get_query_set() - ${3} - -snippet model - class ${1:ModelName}(${2:models.Model}): - ${4} - - class Meta: - ordering = ('${3:-created}',) - - def __unicode__(self): - return u'%s' % '' - -snippet modeladmin - class ${1:ModelName}Admin(admin.ModelAdmin): - ${2} - - admin.site.register($1, $1Admin) - -snippet r2r - return render_to_response('${1:template.html}', { - ${2} - }${3:, context_instance=RequestContext(request)} - ) - -snippet tabularinline - class ${1:ModelName}Inline(admin.TabularInline): - model = $1 - extra = ${2:3} - -snippet stackedinline - class ${1:ModelName}Inline(admin.StackedInline): - model = $1 - extra = ${2:3} - -# Ugly crap. - -snippet reverse - reverse('${1:view-name}'${2:, args=[]}${3:, kwargs=None})${4} -snippet view - @render_to('${1}') - def ${2:view_name}(request${3:, ...}):${4} - return {} -snippet defu - def __unicode__(self): - return u'${1}' % (${2}) diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/html.snippets --- a/vim/snippets/html.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -# Some useful Unicode entities -# Non-Breaking Space -snippet nbs -   -# ← -snippet left - ← -# → -snippet right - → -# ↑ -snippet up - ↑ -# ↓ -snippet down - ↓ -# ↩ -snippet return - ↩ -# ⇤ -snippet backtab - ⇤ -# ⇥ -snippet tab - ⇥ -# ⇧ -snippet shift - ⇧ -# ⌃ -snippet control - ⌃ -# ⌅ -snippet enter - ⌅ -# ⌘ -snippet command - ⌘ -# ⌥ -snippet option - ⌥ -# ⌦ -snippet delete - ⌦ -# ⌫ -snippet backspace - ⌫ -# ⎋ -snippet escape - ⎋ -# Generic Doctype -snippet doctype HTML 4.01 Strict - -snippet doctype HTML 4.01 Transitional - -snippet doctype HTML 5 - -snippet doctype XHTML 1.0 Frameset - -snippet doctype XHTML 1.0 Strict - -snippet doctype XHTML 1.0 Transitional - -snippet doctype XHTML 1.1 - -# HTML Doctype 4.01 Strict -snippet docts - -# HTML Doctype 4.01 Transitional -snippet doct - -# HTML Doctype 5 -snippet doct5 - -# XHTML Doctype 1.0 Frameset -snippet docxf - -# XHTML Doctype 1.0 Strict -snippet docxs - -# XHTML Doctype 1.0 Transitional -snippet docxt - -# XHTML Doctype 1.1 -snippet docx - -snippet html - - ${1} - -snippet xhtml - - ${1} - -snippet body - - ${1} - -snippet head - - - - ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`} - ${2} - -snippet title - ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}${2} -snippet script - ${2} -snippet scriptsrc - ${2} -snippet style - ${3} -snippet base - -snippet r - -snippet div -
- ${2} -
-# Embed QT Movie -snippet movie - - - - - - ${6} -snippet fieldset -
- ${1:name} - - ${3} -
-snippet form -
- ${3} - - -

-
-snippet h1 -

${2:$1}

-snippet input - ${4} -snippet label - ${7} -snippet link - ${4} -snippet mailto - ${3:email me} -snippet meta - ${3} -snippet opt - ${3} -snippet optt - ${2} -snippet select - ${5} -snippet table - - - -
${2:Header}
${3:Data}
${4} -snippet textarea - ${5} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/htmldjango.snippets --- a/vim/snippets/htmldjango.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -# Generic Tags -snippet % - {% ${1} %}${2} -snippet %% - {% ${1:tag_name} %} - ${2} - {% end$1 %} -snippet { - {{ ${1} }}${2} -snippet gau - get_absolute_url${1} -snippet gfn - get_full_name${1} -# Template Tags - -snippet autoescape - {% autoescape ${1:off} %} - ${2} - {% endautoescape %} -snippet block - {% block ${1} %} - ${2} - {% endblock %} -snippet # - {# ${1:comment} #} -snippet comment - {% comment %} - ${1} - {% endcomment %} -snippet cycle - {% cycle ${1:val1} ${2:val2} ${3:as ${4}} %} -snippet debug - {% debug %} -snippet extends - {% extends "${1:base.html}" %} -snippet filter - {% filter ${1} %} - ${2} - {% endfilter %} -snippet firstof - {% firstof ${1} %} -snippet for - {% for ${1} in ${2} %} - ${3} - {% endfor %} -snippet empty - {% empty %} -snippet if - {% if ${1} %} - ${2} - {% endif %} -snippet else - {% else %} -snippet ifchanged - {% ifchanged %}${1}{% endifchanged %} -snippet ifequal - {% ifequal ${1} ${2} %} - ${3} - {% endifequal %} -snippet ifnotequal - {% ifnotequal ${1} ${2} %} - ${3} - {% endifnotequal %} -snippet include - {% include "${1}" %} -snippet load - {% load ${1} %} -snippet now - {% now "${1:jS F Y H:i}" %} -snippet regroup - {% regroup ${1} by ${2} as ${3} %} -snippet spaceless - {% spaceless %}${1}{% endspaceless %} -snippet ssi - {% ssi ${1} %} -snippet trans - {% trans "${1:string}" %} -snippet url - {% url ${1} as ${2} %} -snippet widthratio - {% widthratio ${1:this_value} ${2:max_value} ${3:100} %} -snippet with - {% with ${1} as ${2} %} -# Template Filters - -# Note: Since SnipMate can't determine which template filter you are -# expanding without the "|" character, these do not add the "|" -# character. These save a few keystrokes still. - -# Note: Template tags that take no arguments are not implemented. - -snippet add - add:"${1}" -snippet center - center:"${1}" -snippet cut - cut:"${1}" -snippet date - date:"${1}" -snippet default - default:"${1}" -snippet defaultifnone - default_if_none:"${1}" -snippet dictsort - dictsort:"${1}" -snippet dictsortrev - dictsortreversed:"${1}" -snippet divisibleby - divisibleby:"${1}" -snippet floatformat - floatformat:"${1}" -snippet getdigit - get_digit:"${1}" -snippet join - join:"${1}" -snippet lengthis - length_is:"${1}" -snippet pluralize - pluralize:"${1}" -snippet removetags - removetags:"${1}" -snippet slice - slice:"${1}" -snippet stringformat - stringformat:"${1}" -snippet time - time:"${1}" -snippet truncatewords - truncatewords:${1} -snippet truncatewordshtml - truncatewords_html:${1} -snippet urlizetrunc - urlizetrunc:${1} -snippet wordwrap - wordwrap:${1} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/htmljinja.snippets --- a/vim/snippets/htmljinja.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/Users/sjl/lib/dotfiles/vim/snippets/jinja.snippets \ No newline at end of file diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/java.snippets --- a/vim/snippets/java.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -snippet main - public static void main (String [] args) - { - ${1:/* code */} - } -snippet pu - public -snippet po - protected -snippet pr - private -snippet st - static -snippet fi - final -snippet ab - abstract -snippet re - return -snippet br - break; -snippet de - default: - ${1} -snippet ca - catch(${1:Exception} ${2:e}) ${3} -snippet th - throw -snippet sy - synchronized -snippet im - import -snippet j.u - java.util -snippet j.i - java.io. -snippet j.b - java.beans. -snippet j.n - java.net. -snippet j.m - java.math. -snippet if - if (${1}) ${2} -snippet el - else -snippet elif - else if (${1}) ${2} -snippet wh - while (${1}) ${2} -snippet for - for (${1}; ${2}; ${3}) ${4} -snippet fore - for (${1} : ${2}) ${3} -snippet sw - switch (${1}) ${2} -snippet cs - case ${1}: - ${2} - ${3} -snippet tc - public class ${1:`Filename()`} extends ${2:TestCase} -snippet t - public void test${1:Name}() throws Exception ${2} -snippet cl - class ${1:`Filename("", "untitled")`} ${2} -snippet in - interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3} -snippet m - ${1:void} ${2:method}(${3}) ${4:throws }${5} -snippet v - ${1:String} ${2:var}${3: = null}${4};${5} -snippet co - static public final ${1:String} ${2:var} = ${3};${4} -snippet cos - static public final String ${1:var} = "${2}";${3} -snippet as - assert ${1:test} : "${2:Failure message}";${3} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/javascript.snippets --- a/vim/snippets/javascript.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -# Prototype -snippet proto - ${1:class_name}.prototype.${2:method_name} = - function(${3:first_argument}) { - ${4:// body...} - }; -# Function -snippet fun - function ${1:function_name} (${2:argument}) { - ${3:// body...} - } -# Anonymous Function -snippet f - function(${1}) {${2}}; -# if -snippet if - if (${1:true}) {${2}}; -# if ... else -snippet ife - if (${1:true}) {${2}} - else{${3}}; -# tertiary conditional -snippet t - ${1:/* condition */} ? ${2:a} : ${3:b} -# switch -snippet switch - switch(${1:expression}) { - case '${3:case}': - ${4:// code} - break; - ${5} - default: - ${2:// code} - } -# case -snippet case - case '${1:case}': - ${2:// code} - break; - ${3} -# for (...) {...} -snippet for - for (var ${2:i} = 0; $2 < ${1:Things}.length; $2${3:++}) { - ${4:$1[$2]} - }; -# for (...) {...} (Improved Native For-Loop) -snippet forr - for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) { - ${4:$1[$2]} - }; -# while (...) {...} -snippet wh - while (${1:/* condition */}) { - ${2:/* code */} - } -# do...while -snippet do - do { - ${2:/* code */} - } while (${1:/* condition */}); -# Object Method -snippet :f - ${1:method_name}: function(${2:attribute}) { - ${4} - }${3:,} -# setTimeout function -snippet timeout - setTimeout(function() {${3}}${2}, ${1:10}; -# Get Elements -snippet get - getElementsBy${1:TagName}('${2}')${3} -# Get Element -snippet gett - getElementBy${1:Id}('${2}')${3} -snippet log - console.log(${1});${2} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/jinja.snippets --- a/vim/snippets/jinja.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -# Generic Tags -snippet % - {% ${1} %}${2} -snippet { - {{ ${1} }}${2} -snippet %% - {% ${1:tag_name} %} - ${2} - {% end$1 %} - -snippet block - {% block ${1:content} %} - ${2} - {% endblock %} -snippet blocki - {% block ${1:content} %}${2}{% endblock %} - diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/lisp.snippets --- a/vim/snippets/lisp.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -snippet defp - (defparameter ${1} ${2})${3} -snippet defv - (defvar ${1} ${2})${3} -snippet defun - (defun ${1} (${2}) - ${3}) -snippet defm - (defmethod ${1} (${2}) - ${3}) -snippet let - (let ((${1} ${2})${3}) - ${4}) -snippet flet - (flet ((${1} (${2}) - ${3})${4}) - ${5}) -snippet labels - (labels ((${1} (${2}) - ${3})${4}) - ${5}) -snippet when - (when ${1} - ${2}) -snippet unless - (unless ${1} - ${2}) -snippet cond - (cond (${1} ${2}) - ${3}) -snippet case - (case ${1} - (${2} ${3}) - ${4}) diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/mako.snippets --- a/vim/snippets/mako.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -snippet def - <%def name="${1:name}"> - ${2:} - -snippet call - <%call expr="${1:name}"> - ${2:} - -snippet doc - <%doc> - ${1:} - -snippet text - <%text> - ${1:} - -snippet for - % for ${1:i} in ${2:iter}: - ${3:} - % endfor -snippet if if - % if ${1:condition}: - ${2:} - % endif -snippet if if/else - % if ${1:condition}: - ${2:} - % else: - ${3:} - % endif -snippet try - % try: - ${1:} - % except${2:}: - ${3:pass} - % endtry -snippet wh - % while ${1:}: - ${2:} - % endwhile -snippet $ - ${ ${1:} } -snippet <% - <% ${1:} %> -snippet -snippet inherit - <%inherit file="${1:filename}" /> -snippet include - <%include file="${1:filename}" /> -snippet namespace - <%namespace file="${1:name}" /> -snippet page - <%page args="${1:}" /> diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/markdown.snippets --- a/vim/snippets/markdown.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -snippet notice - ${1:Notice} -snippet warning - ${1:Warning} -snippet important - ${1:Important} -snippet success - ${1:Success} -snippet label - ${1:Note} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/objc.snippets --- a/vim/snippets/objc.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -# #import <...> -snippet Imp - #import <${1:Cocoa/Cocoa.h}>${2} -# #import "..." -snippet imp - #import "${1:`Filename()`.h}"${2} -# @selector(...) -snippet sel - @selector(${1:method}:)${3} -# @"..." string -snippet s - @"${1}"${2} -# Object -snippet o - ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5} -# NSLog(...) -snippet log - NSLog(@"${1:%@}"${2});${3} -# Class -snippet objc - @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} - { - } - @end - - @implementation $1 - ${3} - @end -# Class Interface -snippet int - @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} - {${3} - } - ${4} - @end -# Class Implementation -snippet impl - @implementation ${1:`Filename('', 'someClass')`} - ${2} - @end -snippet init - - (id)init - { - [super init]; - return self; - } -snippet ifself - if (self = [super init]) { - ${1:/* code */} - } - return self; -snippet ibo - IBOutlet ${1:NSSomeClass} *${2:$1};${3} -# Category -snippet cat - @interface ${1:NSObject} (${2:Category}) - @end - - @implementation $1 ($2) - ${3} - @end -# Category Interface -snippet cath - @interface ${1:NSObject} (${2:Category}) - ${3} - @end -# NSArray -snippet array - NSMutableArray *${1:array} = [NSMutable array];${2} -# NSDictionary -snippet dict - NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2} -# NSBezierPath -snippet bez - NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2} -# Method -snippet m - - (${1:id})${2:method} - { - ${3} - } -# Method declaration -snippet md - - (${1:id})${2:method};${3} -# IBAction declaration -snippet ibad - - (IBAction)${1:method}:(${2:id})sender;${3} -# IBAction method -snippet iba - - (IBAction)${1:method}:(${2:id})sender - { - ${3} - } -# awakeFromNib method -snippet wake - - (void)awakeFromNib - { - ${1} - } -# Class Method -snippet M - + (${1:id})${2:method} - {${3} - return nil; - } -# Sub-method (Call super) -snippet sm - - (${1:id})${2:method} - { - [super $2];${3} - return self; - } -# Method: Initialize -snippet I - + (void) initialize - { - [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys: - ${1}@"value", @"key", - nil]]; - } -# Accessor Methods For: -# Object -snippet objacc - - (${1:id})${2:thing} - { - return $2; - } - - - (void)set$2:($1)${3:new$2} - { - [$3 retain]; - [$2 release]; - $2 = $3; - }${4} -# for (object in array) -snippet forin - for (${1:Class} *${2:some$1} in ${3:array}) { - ${4} - } -snippet forarray - unsigned int ${1:object}Count = [${2:array} count]; - - for (unsigned int index = 0; index < $1Count; index++) { - ${3:id} $1 = [$2 $1AtIndex:index]; - ${4} - } -# IBOutlet -# @property (Objective-C 2.0) -snippet prop - @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4} -# @synthesize (Objective-C 2.0) -snippet syn - @synthesize ${1:property};${2} -# [[ alloc] init] -snippet alloc - [[${1:foo} alloc] init${2}];${3} -# retain -snippet ret - [${1:foo} retain];${2} -# release -snippet rel - [${1:foo} release]; - ${2:$1 = nil;} -# autorelease -snippet arel - [${1:foo} autorelease]; -# autorelease pool -snippet pool - NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init]; - ${2:/* code */} - [$1 drain]; -# Throw an exception -snippet except - NSException *${1:badness}; - $1 = [NSException exceptionWithName:@"${2:$1Name}" - reason:@"${3}" - userInfo:nil]; - [$1 raise]; -snippet prag - #pragma mark ${1:foo} -snippet cl - @class ${1:Foo};${2} -snippet color - [[NSColor ${1:blackColor}] set]; diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/perl.snippets --- a/vim/snippets/perl.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -# #!/usr/bin/perl -snippet #! - #!/usr/bin/perl - -# Hash Pointer -snippet . - => -# Function -snippet sub - sub ${1:function_name} { - ${2:#body ...} - } -# Conditional -snippet if - if (${1}) { - ${2:# body...} - } -# Conditional if..else -snippet ife - if (${1}) { - ${2:# body...} - } else { - ${3:# else...} - } -# Conditional if..elsif..else -snippet ifee - if (${1}) { - ${2:# body...} - } elsif (${3}) { - ${4:# elsif...} - } else { - ${5:# else...} - } -# Conditional One-line -snippet xif - ${1:expression} if ${2:condition};${3} -# Unless conditional -snippet unless - unless (${1}) { - ${2:# body...} - } -# Unless conditional One-line -snippet xunless - ${1:expression} unless ${2:condition};${3} -# Try/Except -snippet eval - eval { - ${1:# do something risky...} - }; - if ($@) { - ${2:# handle failure...} - } -# While Loop -snippet wh - while (${1}) { - ${2:# body...} - } -# While Loop One-line -snippet xwh - ${1:expression} while ${2:condition};${3} -# For Loop -snippet for - for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { - ${4:# body...} - } -# Foreach Loop -snippet fore - foreach my $${1:x} (@${2:array}) { - ${3:# body...} - } -# Foreach Loop One-line -snippet xfore - ${1:expression} foreach @${2:array};${3} -# Package -snippet cl - package ${1:ClassName}; - - use base qw(${2:ParentClass}); - - sub new { - my $class = shift; - $class = ref $class if ref $class; - my $self = bless {}, $class; - $self; - } - - 1;${3} -# Read File -snippet slurp - my $${1:var}; - { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = ; close FILE }${3} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/php.snippets --- a/vim/snippets/php.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ -snippet php - -snippet ec - echo "${1:string}"${2}; -snippet inc - include '${1:file}';${2} -snippet inc1 - include_once '${1:file}';${2} -snippet req - require '${1:file}';${2} -snippet req1 - require_once '${1:file}';${2} -# $GLOBALS['...'] -snippet globals - $GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5} -snippet $_ COOKIE['...'] - $_COOKIE['${1:variable}']${2} -snippet $_ ENV['...'] - $_ENV['${1:variable}']${2} -snippet $_ FILES['...'] - $_FILES['${1:variable}']${2} -snippet $_ Get['...'] - $_GET['${1:variable}']${2} -snippet $_ POST['...'] - $_POST['${1:variable}']${2} -snippet $_ REQUEST['...'] - $_REQUEST['${1:variable}']${2} -snippet $_ SERVER['...'] - $_SERVER['${1:variable}']${2} -snippet $_ SESSION['...'] - $_SESSION['${1:variable}']${2} -# Start Docblock -snippet /* - /** - * ${1} - **/ -# Class - post doc -snippet doc_cp - /** - * ${1:undocumented class} - * - * @package ${2:default} - * @author ${3:`g:snips_author`} - **/${4} -# Class Variable - post doc -snippet doc_vp - /** - * ${1:undocumented class variable} - * - * @var ${2:string} - **/${3} -# Class Variable -snippet doc_v - /** - * ${3:undocumented class variable} - * - * @var ${4:string} - **/ - ${1:var} $${2};${5} -# Class -snippet doc_c - /** - * ${3:undocumented class} - * - * @packaged ${4:default} - * @author ${5:`g:snips_author`} - **/ - ${1:}class ${2:} - {${6} - } // END $1class $2 -# Constant Definition - post doc -snippet doc_dp - /** - * ${1:undocumented constant} - **/${2} -# Constant Definition -snippet doc_d - /** - * ${3:undocumented constant} - **/ - define(${1}, ${2});${4} -# Function - post doc -snippet doc_fp - /** - * ${1:undocumented function} - * - * @return ${2:void} - * @author ${3:`g:snips_author`} - **/${4} -# Function signature -snippet doc_s - /** - * ${4:undocumented function} - * - * @return ${5:void} - * @author ${6:`g:snips_author`} - **/ - ${1}function ${2}(${3});${7} -# Function -snippet doc_f - /** - * ${4:undocumented function} - * - * @return ${5:void} - * @author ${6:`g:snips_author`} - **/ - ${1}function ${2}(${3}) - {${7} - } -# Header -snippet doc_h - /** - * ${1} - * - * @author ${2:`g:snips_author`} - * @version ${3:$Id$} - * @copyright ${4:$2}, `strftime('%d %B, %Y')` - * @package ${5:default} - **/ - - /** - * Define DocBlock - *// -# Interface -snippet doc_i - /** - * ${2:undocumented class} - * - * @package ${3:default} - * @author ${4:`g:snips_author`} - **/ - interface ${1:} - {${5} - } // END interface $1 -# class ... -snippet class - /** - * ${1} - **/ - class ${2:ClassName} - { - ${3} - function ${4:__construct}(${5:argument}) - { - ${6:// code...} - } - } -# define(...) -snippet def - define('${1}'${2});${3} -# defined(...) -snippet def? - ${1}defined('${2}')${3} -snippet wh - while (${1:/* condition */}) { - ${2:// code...} - } -# do ... while -snippet do - do { - ${2:// code... } - } while (${1:/* condition */}); -snippet if - if (${1:/* condition */}) { - ${2:// code...} - } -snippet ife - if (${1:/* condition */}) { - ${2:// code...} - } else { - ${3:// code...} - } - ${4} -snippet else - else { - ${1:// code...} - } -snippet elseif - elseif (${1:/* condition */}) { - ${2:// code...} - } -# Tertiary conditional -snippet t - $${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5} -snippet switch - switch ($${1:variable}) { - case '${2:value}': - ${3:// code...} - break; - ${5} - default: - ${4:// code...} - break; - } -snippet case - case '${1:value}': - ${2:// code...} - break;${3} -snippet for - for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) { - ${4: // code...} - } -snippet foreach - foreach ($${1:variable} as $${2:key}) { - ${3:// code...} - } -snippet fun - ${1:public }function ${2:FunctionName}(${3}) - { - ${4:// code...} - } -# $... = array (...) -snippet array - $${1:arrayName} = array('${2}' => ${3});${4} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/python.snippets --- a/vim/snippets/python.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -snippet #! - #!/usr/bin/env python -snippet from - from ${1:sys} import ${2:*} -snippet while - while ${1:True}: - ${2:pass} -snippet for - for ${1:x} in ${2:xs}: - ${3:pass} -snippet def - def ${1:function}(${2}): - ${3:pass} -snippet defs - def ${1:method}(self${2}): - ${3:pass} -snippet lam - lambda ${1:args}: ${2:action} -snippet ifmain - if __name__ == '__main__': - ${1:main()} -snippet _ - __${1:init}__${2} -snippet *** - *args, **kwargs -snippet af - assert False, repr(${1})$2 -snippet pdbt - import pdb; pdb.set_trace() -snippet pp - from pprint import pprint; pprint($1)$2 diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/ruby.snippets --- a/vim/snippets/ruby.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,420 +0,0 @@ -# #!/usr/bin/ruby -snippet #! - #!/usr/bin/ruby - -# New Block -snippet =b - =begin rdoc - ${1} - =end -snippet y - :yields: ${1:arguments} -snippet rb - #!/usr/bin/env ruby -wKU - -snippet req - require "${1}"${2} -snippet # - # => -snippet end - __END__ -snippet case - case ${1:object} - when ${2:condition} - ${3} - end -snippet when - when ${1:condition} - ${2} -snippet def - def ${1:method_name} - ${2} - end -snippet deft - def test_${1:case_name} - ${2} - end -snippet if - if ${1:condition} - ${2} - end -snippet ife - if ${1:condition} - ${2} - else - ${3} - end -snippet elsif - elsif ${1:condition} - ${2} -snippet unless - unless ${1:condition} - ${2} - end -snippet while - while ${1:condition} - ${2} - end -snippet until - until ${1:condition} - ${2} - end -snippet cla class .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} - ${2} - end -snippet cla class .. initialize .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} - def initialize(${2:args}) - ${3} - end - - - end -snippet cla class .. < ParentClass .. initialize .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} < ${2:ParentClass} - def initialize(${3:args}) - ${4} - end - - - end -snippet cla ClassName = Struct .. do .. end - ${1:`substitute(Filename(), '^.', '\u&', '')`} = Struct.new(:${2:attr_names}) do - def ${3:method_name} - ${4} - end - - - end -snippet cla class BlankSlate .. initialize .. end - class ${1:BlankSlate} - instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } -snippet cla class << self .. end - class << ${1:self} - ${2} - end -# class .. < DelegateClass .. initialize .. end -snippet cla- - class ${1:`substitute(Filename(), '^.', '\u&', '')`} < DelegateClass(${2:ParentClass}) - def initialize(${3:args}) - super(${4:del_obj}) - - ${5} - end - - - end -snippet mod module .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - ${2} - end -snippet mod module .. module_function .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - module_function - - ${2} - end -snippet mod module .. ClassMethods .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - module ClassMethods - ${2} - end - - module InstanceMethods - - end - - def self.included(receiver) - receiver.extend ClassMethods - receiver.send :include, InstanceMethods - end - end -# attr_reader -snippet r - attr_reader :${1:attr_names} -# attr_writer -snippet w - attr_writer :${1:attr_names} -# attr_accessor -snippet rw - attr_accessor :${1:attr_names} -# include Enumerable -snippet Enum - include Enumerable - - def each(&block) - ${1} - end -# include Comparable -snippet Comp - include Comparable - - def <=>(other) - ${1} - end -# extend Forwardable -snippet Forw- - extend Forwardable -# def self -snippet defs - def self.${1:class_method_name} - ${2} - end -# def method_missing -snippet defmm - def method_missing(meth, *args, &blk) - ${1} - end -snippet defd - def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name} -snippet defds - def_delegators :${1:@del_obj}, :${2:del_methods} -snippet am - alias_method :${1:new_name}, :${2:old_name} -snippet app - if __FILE__ == $PROGRAM_NAME - ${1} - end -# usage_if() -snippet usai - if ARGV.${1} - abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} - end -# usage_unless() -snippet usau - unless ARGV.${1} - abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} - end -snippet array - Array.new(${1:10}) { |${2:i}| ${3} } -snippet hash - Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} } -snippet file File.foreach() { |line| .. } - File.foreach(${1:"path/to/file"}) { |${2:line}| ${3} } -snippet file File.read() - File.read(${1:"path/to/file"})${2} -snippet Dir Dir.global() { |file| .. } - Dir.glob(${1:"dir/glob/*"}) { |${2:file}| ${3} } -snippet Dir Dir[".."] - Dir[${1:"glob/**/*.rb"}]${2} -snippet dir - Filename.dirname(__FILE__) -snippet deli - delete_if { |${1:e}| ${2} } -snippet fil - fill(${1:range}) { |${2:i}| ${3} } -# flatten_once() -snippet flao - inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3} -snippet zip - zip(${1:enums}) { |${2:row}| ${3} } -# downto(0) { |n| .. } -snippet dow - downto(${1:0}) { |${2:n}| ${3} } -snippet ste - step(${1:2}) { |${2:n}| ${3} } -snippet tim - times { |${1:n}| ${2} } -snippet upt - upto(${1:1.0/0.0}) { |${2:n}| ${3} } -snippet loo - loop { ${1} } -snippet ea - each { |${1:e}| ${2} } -snippet eab - each_byte { |${1:byte}| ${2} } -snippet eac- each_char { |chr| .. } - each_char { |${1:chr}| ${2} } -snippet eac- each_cons(..) { |group| .. } - each_cons(${1:2}) { |${2:group}| ${3} } -snippet eai - each_index { |${1:i}| ${2} } -snippet eak - each_key { |${1:key}| ${2} } -snippet eal - each_line { |${1:line}| ${2} } -snippet eap - each_pair { |${1:name}, ${2:val}| ${3} } -snippet eas- - each_slice(${1:2}) { |${2:group}| ${3} } -snippet eav - each_value { |${1:val}| ${2} } -snippet eawi - each_with_index { |${1:e}, ${2:i}| ${3} } -snippet reve - reverse_each { |${1:e}| ${2} } -snippet inj - inject(${1:init}) { |${2:mem}, ${3:var}| ${4} } -snippet map - map { |${1:e}| ${2} } -snippet mapwi- - enum_with_index.map { |${1:e}, ${2:i}| ${3} } -snippet sor - sort { |a, b| ${1} } -snippet sorb - sort_by { |${1:e}| ${2} } -snippet ran - sort_by { rand } -snippet all - all? { |${1:e}| ${2} } -snippet any - any? { |${1:e}| ${2} } -snippet cl - classify { |${1:e}| ${2} } -snippet col - collect { |${1:e}| ${2} } -snippet det - detect { |${1:e}| ${2} } -snippet fet - fetch(${1:name}) { |${2:key}| ${3} } -snippet fin - find { |${1:e}| ${2} } -snippet fina - find_all { |${1:e}| ${2} } -snippet gre - grep(${1:/pattern/}) { |${2:match}| ${3} } -snippet sub - ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} } -snippet sca - scan(${1:/pattern/}) { |${2:match}| ${3} } -snippet max - max { |a, b|, ${1} } -snippet min - min { |a, b|, ${1} } -snippet par - partition { |${1:e}|, ${2} } -snippet rej - reject { |${1:e}|, ${2} } -snippet sel - select { |${1:e}|, ${2} } -snippet lam - lambda { |${1:args}| ${2} } -snippet do - do |${1:variable}| - ${2} - end -snippet : - :${1:key} => ${2:"value"}${3} -snippet ope - open(${1:"path/or/url/or/pipe"}, "${2:w}") { |${3:io}| ${4} } -# path_from_here() -snippet patfh - File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2} -# unix_filter {} -snippet unif - ARGF.each_line${1} do |${2:line}| - ${3} - end -# option_parse {} -snippet optp - require "optparse" - - options = {${1:default => "args"}} - - ARGV.options do |opts| - opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} -snippet opt - opts.on( "-${1:o}", "--${2:long-option-name}", ${3:String}, - "${4:Option description.}") do |${5:opt}| - ${6} - end -snippet tc - require "test/unit" - - require "${1:library_file_name}" - - class Test${2:$1} < Test::Unit::TestCase - def test_${3:case_name} - ${4} - end - end -snippet ts - require "test/unit" - - require "tc_${1:test_case_file}" - require "tc_${2:test_case_file}"${3} -snippet as - assert(${1:test}, "${2:Failure message.}")${3} -snippet ase - assert_equal(${1:expected}, ${2:actual})${3} -snippet asne - assert_not_equal(${1:unexpected}, ${2:actual})${3} -snippet asid - assert_in_delta(${1:expected_float}, ${2:actual_float}, ${3:2 ** -20})${4} -snippet asio - assert_instance_of(${1:ExpectedClass}, ${2:actual_instance})${3} -snippet asko - assert_kind_of(${1:ExpectedKind}, ${2:actual_instance})${3} -snippet asn - assert_nil(${1:instance})${2} -snippet asnn - assert_not_nil(${1:instance})${2} -snippet asm - assert_match(/${1:expected_pattern}/, ${2:actual_string})${3} -snippet asnm - assert_no_match(/${1:unexpected_pattern}/, ${2:actual_string})${3} -snippet aso - assert_operator(${1:left}, :${2:operator}, ${3:right})${4} -snippet asr - assert_raise(${1:Exception}) { ${2} } -snippet asnr - assert_nothing_raised(${1:Exception}) { ${2} } -snippet asrt - assert_respond_to(${1:object}, :${2:method})${3} -snippet ass assert_same(..) - assert_same(${1:expected}, ${2:actual})${3} -snippet ass assert_send(..) - assert_send([${1:object}, :${2:message}, ${3:args}])${4} -snippet asns - assert_not_same(${1:unexpected}, ${2:actual})${3} -snippet ast - assert_throws(:${1:expected}) { ${2} } -snippet asnt - assert_nothing_thrown { ${1} } -snippet fl - flunk("${1:Failure message.}")${2} -# Benchmark.bmbm do .. end -snippet bm- - TESTS = ${1:10_000} - Benchmark.bmbm do |results| - ${2} - end -snippet rep - results.report("${1:name}:") { TESTS.times { ${2} }} -# Marshal.dump(.., file) -snippet Md - File.open(${1:"path/to/file.dump"}, "wb") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4} -# Mashal.load(obj) -snippet Ml - File.open(${1:"path/to/file.dump"}, "rb") { |${2:file}| Marshal.load($2) }${3} -# deep_copy(..) -snippet deec - Marshal.load(Marshal.dump(${1:obj_to_copy}))${2} -snippet Pn- - PStore.new(${1:"file_name.pstore"})${2} -snippet tra - transaction(${1:true}) { ${2} } -# xmlread(..) -snippet xml- - REXML::Document.new(File.read(${1:"path/to/file"}))${2} -# xpath(..) { .. } -snippet xpa - elements.each(${1:"//Xpath"}) do |${2:node}| - ${3} - end -# class_from_name() -snippet clafn - split("::").inject(Object) { |par, const| par.const_get(const) } -# singleton_class() -snippet sinc - class << self; self end -snippet nam - namespace :${1:`Filename()`} do - ${2} - end -snippet tas - desc "${1:Task description\}" - task :${2:task_name => [:dependent, :tasks]} do - ${3} - end diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/scheme.snippets --- a/vim/snippets/scheme.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -snippet def - (define (${1:name} ${2:args}) - (${3:body})) diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/sh.snippets --- a/vim/snippets/sh.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -# #!/bin/bash -snippet #! - #!/bin/bash - -snippet if - if [[ ${1:condition} ]]; then - ${2:#statements} - fi -snippet elif - elif [[ ${1:condition} ]]; then - ${2:#statements} -snippet for - for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do - ${3:#statements} - done -snippet wh - while [[ ${1:condition} ]]; do - ${2:#statements} - done -snippet until - until [[ ${1:condition} ]]; do - ${2:#statements} - done -snippet case - case ${1:word} in - ${2:pattern}) - ${3};; - esac diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/snippet.snippets --- a/vim/snippets/snippet.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -# snippets for making snippets :) -snippet snip - snippet ${1:trigger} - ${2} -snippet msnip - snippet ${1:trigger} ${2:description} - ${3} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/tcl.snippets --- a/vim/snippets/tcl.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -# #!/usr/bin/tclsh -snippet #! - #!/usr/bin/tclsh - -# Process -snippet pro - proc ${1:function_name} {${2:args}} { - ${3:#body ...} - } -#xif -snippet xif - ${1:expr}? ${2:true} : ${3:false} -# Conditional -snippet if - if {${1}} { - ${2:# body...} - } -# Conditional if..else -snippet ife - if {${1}} { - ${2:# body...} - } else { - ${3:# else...} - } -# Conditional if..elsif..else -snippet ifee - if {${1}} { - ${2:# body...} - } elseif {${3}} { - ${4:# elsif...} - } else { - ${5:# else...} - } -# If catch then -snippet ifc - if { [catch {${1:#do something...}} ${2:err}] } { - ${3:# handle failure...} - } -# Catch -snippet catch - catch {${1}} ${2:err} ${3:options} -# While Loop -snippet wh - while {${1}} { - ${2:# body...} - } -# For Loop -snippet for - for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { - ${4:# body...} - } -# Foreach Loop -snippet fore - foreach ${1:x} {${2:#list}} { - ${3:# body...} - } -# after ms script... -snippet af - after ${1:ms} ${2:#do something} -# after cancel id -snippet afc - after cancel ${1:id or script} -# after idle -snippet afi - after idle ${1:script} -# after info id -snippet afin - after info ${1:id} -# Expr -snippet exp - expr {${1:#expression here}} -# Switch -snippet sw - switch ${1:var} { - ${3:pattern 1} { - ${4:#do something} - } - default { - ${2:#do something} - } - } -# Case -snippet ca - ${1:pattern} { - ${2:#do something} - }${3} -# Namespace eval -snippet ns - namespace eval ${1:path} {${2:#script...}} -# Namespace current -snippet nsc - namespace current diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/tex.snippets --- a/vim/snippets/tex.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -# \begin{}...\end{} -snippet begin - \begin{${1:env}} - ${2} - \end{$1} -# Tabular -snippet tab - \begin{${1:tabular}}{${2:c}} - ${3} - \end{$1} -# Align(ed) -snippet ali - \begin{align${1:ed}} - ${2} - \end{align$1} -# Gather(ed) -snippet gat - \begin{gather${1:ed}} - ${2} - \end{gather$1} -# Equation -snippet eq - \begin{equation} - ${1} - \end{equation} -# Unnumbered Equation -snippet \ - \\[ - ${1} - \\] -# Enumerate -snippet enum - \begin{enumerate} - \item ${1} - \end{enumerate} -# Itemize -snippet item - \begin{itemize} - \item ${1} - \end{itemize} -# Description -snippet desc - \begin{description} - \item[${1}] ${2} - \end{description} -# Matrix -snippet mat - \begin{${1:p/b/v/V/B/small}matrix} - ${2} - \end{$1matrix} -# Cases -snippet cas - \begin{cases} - ${1:equation}, &\text{ if }${2:case}\\ - ${3} - \end{cases} -# Split -snippet spl - \begin{split} - ${1} - \end{split} -# Part -snippet part - \part{${1:part name}} % (fold) - \label{prt:${2:$1}} - ${3} - % part $2 (end) -# Chapter -snippet cha - \chapter{${1:chapter name}} % (fold) - \label{cha:${2:$1}} - ${3} - % chapter $2 (end) -# Section -snippet sec - \section{${1:section name}} % (fold) - \label{sec:${2:$1}} - ${3} - % section $2 (end) -# Sub Section -snippet sub - \subsection{${1:subsection name}} % (fold) - \label{sub:${2:$1}} - ${3} - % subsection $2 (end) -# Sub Sub Section -snippet subs - \subsubsection{${1:subsubsection name}} % (fold) - \label{ssub:${2:$1}} - ${3} - % subsubsection $2 (end) -# Paragraph -snippet par - \paragraph{${1:paragraph name}} % (fold) - \label{par:${2:$1}} - ${3} - % paragraph $2 (end) -# Sub Paragraph -snippet subp - \subparagraph{${1:subparagraph name}} % (fold) - \label{subp:${2:$1}} - ${3} - % subparagraph $2 (end) -snippet itd - \item[${1:description}] ${2:item} -snippet figure - ${1:Figure}~\ref{${2:fig:}}${3} -snippet table - ${1:Table}~\ref{${2:tab:}}${3} -snippet listing - ${1:Listing}~\ref{${2:list}}${3} -snippet section - ${1:Section}~\ref{${2:sec:}}${3} -snippet page - ${1:page}~\pageref{${2}}${3} diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/vim.snippets --- a/vim/snippets/vim.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -snippet header - " File: ${1:`expand('%:t')`} - " Author: ${2:`g:snips_author`} - " Description: ${3} - ${4:" Last Modified: `strftime("%B %d, %Y")`} -snippet guard - if exists('${1:did_`Filename()`}') || &cp${2: || version < 700} - finish - endif - let $1 = 1${3} -snippet f - fun ${1:function_name}(${2}) - ${3:" code} - endf -snippet for - for ${1:needle} in ${2:haystack} - ${3:" code} - endfor -snippet wh - while ${1:condition} - ${2:" code} - endw -snippet if - if ${1:condition} - ${2:" code} - endif -snippet ife - if ${1:condition} - ${2} - else - ${3} - endif diff -r 15f446854045 -r ea87bf0407c4 vim/snippets/zsh.snippets --- a/vim/snippets/zsh.snippets Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# #!/bin/zsh -snippet #! - #!/bin/zsh - -snippet if - if ${1:condition}; then - ${2:# statements} - fi -snippet ife - if ${1:condition}; then - ${2:# statements} - else - ${3:# statements} - fi -snippet elif - elif ${1:condition} ; then - ${2:# statements} -snippet for - for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do - ${3:# statements} - done -snippet fore - for ${1:item} in ${2:list}; do - ${3:# statements} - done -snippet wh - while ${1:condition}; do - ${2:# statements} - done -snippet until - until ${1:condition}; do - ${2:# statements} - done -snippet repeat - repeat ${1:integer}; do - ${2:# statements} - done -snippet case - case ${1:word} in - ${2:pattern}) - ${3};; - esac -snippet select - select ${1:answer} in ${2:choices}; do - ${3:# statements} - done -snippet ( - ( ${1:#statements} ) -snippet { - { ${1:#statements} } -snippet [ - [[ ${1:test} ]] -snippet always - { ${1:try} } always { ${2:always} } -snippet fun - function ${1:name} (${2:args}) { - ${3:# body} - } diff -r 15f446854045 -r ea87bf0407c4 vim/syntax/confluencewiki.vim --- a/vim/syntax/confluencewiki.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,205 +0,0 @@ -"============================================================================ -" -" Confluence WIKI syntax file -" -" Language: Confluence WIKI -" Version: 0.1.0 -" Maintainer: Daniel Grana -" Thanks: Ingo Karkat -" License: GPL (http://www.gnu.org/licenses/gpl.txt) -" Copyright (C) 2004 Rainer Thierfelder -" -" 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 2 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, write to the Free Software -" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -" -"============================================================================ -" -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish - endif - let main_syntax = 'confluencewiki' -endif - -" Don't use standard HiLink, it will not work with included syntax files -if version < 508 - command! -nargs=+ ConfluenceHiLink highlight link - command! -nargs=+ ConfluenceSynColor highlight -else - command! -nargs=+ ConfluenceHiLink highlight default link - command! -nargs=+ ConfluenceSynColor highlight default -endif - -if v:version >= 700 - syntax spell toplevel -endif - - -"============================================================================ -" Group Definitions: -"============================================================================ - -" Emphasis: -function! s:ConfluenceCreateEmphasis(token, name) - execute 'syntax region confluence'.a:name. - \' oneline start="\(^\|[ ]\)\zs'.a:token.'\%('.a:token.'\)\@!'. - \'" end="'.a:token.'\ze\([,. ?!()[\]{}:\-]\|$\)"' -endfunction - -syntax region confluenceFixed oneline start="\(^\|[ ]\)\zs{{" end="}}\ze\([,. ?!()[\]{}):\-]\|$\)" -" Note: Confluence 2.10.1 ignores escaping of \{{monospaced}} (same as {{monospaced}}). -syntax region confluenceFixed oneline start="{{" end="}}\ze\([,. ?!()[\]{}):\-]\|$\)" contained - -call s:ConfluenceCreateEmphasis('\*', 'Bold') -call s:ConfluenceCreateEmphasis('_', 'Italic') -call s:ConfluenceCreateEmphasis('??', 'Citation') -call s:ConfluenceCreateEmphasis('-', 'Strike') -call s:ConfluenceCreateEmphasis('+', 'Underlined') -call s:ConfluenceCreateEmphasis('\^', 'Superscript') -call s:ConfluenceCreateEmphasis('\~', 'Subscript') - - -" Syntax: -" Note: Confluence 2.10.1 ignores escaping of \{{monospaced}} (same as {{monospaced}}). -"syntax match confluenceEscaping "\\\%(??\|{{\|[*_\-+^~{!\[(]\)" contains=confluenceEscapeCharacter -syntax match confluenceEscaping "\\\%(??\|{{\|[*_\-+^~{!\[(]\)" contains=confluenceEscapeCharacter,confluenceFixed -syntax match confluenceEscapeCharacter "\\" contained -syntax match confluenceDelimiter "|" -syntax match confluenceDelimiter "||[^|]" contains=confluenceTableHeader -syntax match confluenceDelimiter "[^|]||" -syntax match confluenceTableHeader "||\zs[^|]\+\ze||" contained contains=ALLBUT,confluenceDelimiter -syntax match confluenceSymbols "\%(^\|\s\)\zs-\{2,3}\ze\%($\|\s\)" -syntax match confluenceSeparator "^\s*----\s*$" -syntax match confluenceList "^[*#]\+\ze " -syntax match confluenceSingleList "^-\ze " - -"syntax match confluenceVariable "\([^!]\|^\)\zs%\w\+%" - -" tag support is a limited to no white spaces in tag parameters -syntax match confluenceTagParameterName "[:|]\zs\w\+=\?[^|}]\+" contained contains=@NoSpell,confluenceTagParameterValue -syntax match confluenceTagParameterValue "\w\+=\zs[^|}]\+" contained contains=@NoSpell -syntax match confluenceTag "{\%(\w\|-\)\+\(:\(\w\+=\?[^|}]\+|\?\)*\)\?}" contains=@NoSpell,confluenceTagParameterName - -syntax region confluenceComment start="{HTMLcomment\%(:hidden\)\?}" end="{HTMLcomment}" keepend contains=TOP - -syntax match confluenceCodeTag "{code\(:\(\w\+=\?[^|}]\+|\?\)*\)\?}" contains=confluenceTagParameterName,@NoSpell contained -syntax region confluenceCode start="{code\(:\(\w\+=\?[^|}]\+|\?\)*\)\?}" end="{code}" keepend contains=confluenceCodeTag -syntax match confluenceVerbatimTag "{noformat\(:\(\w\+=\?[^|}]\+|\?\)*\)\?}" contains=confluenceTagParameterName,@NoSpell contained -syntax region confluenceVerbatim start="{noformat\(:\(\w\+=\?[^|}]\+|\?\)*\)\?}" end="{noformat}" keepend contains=confluenceVerbatimTag - -syntax match confluenceQuoteMarker "^bq. " contains=@NoSpell contained -syntax match confluenceQuote "^bq. .*$" contains=confluenceQuoteMarker -syntax region confluenceQuote start="{quote}" end="{quote}" keepend contains=TOP - -syntax match confluenceHeadingMarker "^h[1-6]. " contains=@NoSpell contained -syntax match confluenceHeading "^h[1-6]. .*$" contains=confluenceHeadingMarker - -" Note: Confluence 2.10.1 does not escape smileys \:) \:( \:P \:D \;) -syntax match confluenceEmoticons "\%(^\|\s\)\zs\%(:)\|:(\|:P\|:D\|;)\)\ze\%($\|\s\)" -syntax match confluenceEmoticons "\%(^\|[^\\]\)\zs([yni/x!+-?*])\|(\%(on\|off\))" - -let s:wikiWord = '\u[a-z0-9]\+\(\u[a-z0-9]\+\)\+' - -execute 'syntax match confluenceAnchor +^#'.s:wikiWord.'\ze\(\>\|_\)+' -execute 'syntax match confluenceWord +\(\s\|^\)\zs\(\u\l\+\.\)\='.s:wikiWord.'\(#'.s:wikiWord.'\)\=\ze\(\>\|_\)+' -" Regex guide: ^pre ^web name ^wikiword ^anchor ^ post - -" Images: -syntax match confluenceImageParameterName "[,|]\zs\w\+=\?[^,!]\+" contained contains=confluenceImageParameterValue,@NoSpell -syntax match confluenceImageParameterValue "\w\+=\zs[^,!]\+" contained contains=@NoSpell -syntax match confluenceImageLink "!\zs\S[^|!]*" contained contains=@NoSpell -syntax match confluenceImage "!\S[^!]*\S!" contains=confluenceImageLink,confluenceImageParameterName - -" Links: -syntax match confluenceLink "\[[^|\]]\+\]" contains=confluenceLinkStart,confluenceLinkEnd,@NoSpell -syntax match confluenceLink "\[[^|\]]\+|[^|\]]\+\]" contains=confluenceLinkMarker,confluenceLinkEnd,confluenceLinkLabel,@NoSpell -syntax match confluenceLink "\[[^|\]]\+|[^|\]]\+|[^|\]]\+\]" contains=confluenceLinkMarker,confluenceLinkLabel,confluenceLinkTip,@NoSpell - -syntax match confluenceLinkLabel "\[[^|\]]\+\ze|" contained contains=confluenceLinkStart -syntax match confluenceLinkTip "[^|\]]\+\]" contained contains=confluenceLinkEnd -syntax match confluenceLinkMarker "|" contained -syntax match confluenceLinkStart "\[" contained -syntax match confluenceLinkEnd "\]" contained - -"============================================================================ -" Group Linking: -"============================================================================ - -ConfluenceHiLink confluenceEscapeCharacter Type -ConfluenceHiLink confluenceHeading Title -ConfluenceHiLink confluenceHeadingMarker Type -ConfluenceHiLink confluenceVariable PreProc -ConfluenceHiLink confluenceTagParameterName Type -ConfluenceHiLink confluenceTagParameterValue Constant -ConfluenceHiLink confluenceCodeTag PreProc -ConfluenceHiLink confluenceVerbatimTag PreProc -ConfluenceHiLink confluenceTag PreProc -ConfluenceHiLink confluenceQuoteMarker Type -ConfluenceHiLink confluenceQuote String -ConfluenceHiLink confluenceComment Comment -ConfluenceHiLink confluenceWord Tag -ConfluenceHiLink confluenceAnchor PreProc -ConfluenceHiLink confluenceVerbatim Constant -ConfluenceHiLink confluenceCode Constant -ConfluenceHiLink confluenceList Type -ConfluenceHiLink confluenceSingleList Type -ConfluenceSynColor confluenceTableHeader term=bold cterm=bold gui=bold - -ConfluenceHiLink confluenceDelimiter Type -ConfluenceHiLink confluenceSeparator Type - -ConfluenceHiLink confluenceEmoticons Special -ConfluenceHiLink confluenceSymbols Special - -" Images -ConfluenceHiLink confluenceImageParameterName Type -ConfluenceHiLink confluenceImageParameterValue Constant -ConfluenceHiLink confluenceImageLink Underlined -ConfluenceHiLink confluenceImage PreProc - -" Links -ConfluenceHiLink confluenceLinkMarker Type -ConfluenceHiLink confluenceLinkStart Type -ConfluenceHiLink confluenceLinkEnd Type -ConfluenceHiLink confluenceLink Underlined -ConfluenceHiLink confluenceLinkLabel Identifier -ConfluenceHiLink confluenceLinkTip NonText - -" Emphasis -ConfluenceHiLink confluenceFixed Constant -ConfluenceSynColor confluenceBold term=bold cterm=bold gui=bold -ConfluenceSynColor confluenceItalic term=italic cterm=italic gui=italic -ConfluenceHiLink confluenceCitation String -ConfluenceHiLink confluenceStrike Special -ConfluenceSynColor confluenceUnderlined term=underline cterm=underline gui=underline -ConfluenceHiLink confluenceSuperscript Special -ConfluenceHiLink confluenceSubscript Special - -"============================================================================}" Clean Up: {{{1 -"============================================================================ - -delcommand ConfluenceHiLink -delcommand ConfluenceSynColor - -if main_syntax == 'confluencewiki' - unlet main_syntax -endif - -let b:current_syntax = "confluencewiki" - -" vim:fdm=marker diff -r 15f446854045 -r ea87bf0407c4 vim/syntax/creole.vim --- a/vim/syntax/creole.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -" Vim syntax file -" Language: creole -" Maintainer: Peter Hoffmann -" Last Change: 2007 May 31 - -" This syntax file is based on the wiki.vim syntax file from Andreas Kneib - -" Little syntax file to use a wiki-editor with VIM -" (if your browser allow this action) -" To use this syntax file: -" 1. mkdir ~/.vim/syntax -" 2. mv ~/creole.vim ~/.vim/syntax/creole.vim -" 3. :set syntax=creole -" - -"Some hints to extend wiki creole editing -"set path=.,~/wiki/ -"au BufRead,BufNewFile *.txt setfiletype creole - -"write current file and open file under cursor in new tab -"nnoremap gF :w :tabedit - -"use the snippetsEmu plugin for wiki code -"Snippet { {{{<{}>}}}<{}> -"Snippet * **<{}>** <{}> -"Snippet _ __<{}>__ <{}> -"Snippet - --<{}>-- <{}> -"Snippet [ [[<{}>]] <{}> - - -" Quit if syntax file is already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -if version < 508 - command! -nargs=+ WikiHiLink hi link -else - command! -nargs=+ WikiHiLink hi def link -endif - -syn match wikiLine "^----$" -"TODO add different markup for [[link|name]] type of links -syn region wikiLink start=+\[\[+hs=s+2 end=+\]\]+he=e-2 -syn match wikiList "^[*#]* " -syn region wikiCurly start="{\{3\}" end="}\{3\}" -syn region wikiHead start="^=" end="$" -"syn region wikiSubhead start="^== " end="$" -"TODO add syntax for tables - -"try to not get confused with wikiLink -syn region wikiBold start="\*\*[^ ]" end="\*\*" -"try to not get confused with http:// -"FIXME does not work at beginning of line -syn region wikiItalic start="[^:]\/\/"hs=s+1 end="[^:]\/\/" -syn region wikiUnderline start="__" end="__" -"syn region wikiStrike start="--" end="--" -"TODO add regions for mixed markup -"syn region wikiBoldItalic contained start=+\([^']\|^\)''[^']+ end=+[^']''\([^']\|$\)+ -"syn region wikiItalicBold contained start=+'''+ end=+'''+ - -" The default highlighting. -if version >= 508 || !exists("did_wiki_syn_inits") - if version < 508 - let did_wiki_syn_inits = 1 - endif - -WikiHiLink wikiCurly Type -WikiHiLink wikiHead Statement -" WikiHiLink wikiSubhead PreProc -WikiHiLink wikiList String -WikiHiLink wikiExtLink Identifier -WikiHiLink wikiLink Identifier -WikiHiLink wikiLine PreProc - -hi def wikiBold term=bold cterm=bold gui=bold - " hi def wikiBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic -hi def wikiItalic term=italic cterm=italic gui=italic - " hi def wikiItalicBold term=bold,italic cterm=bold,italic gui=bold,italic -hi def wikiUnderline term=underline cterm=underline gui=underline -"hi def wikiStrike ??? - -endif - -delcommand WikiHiLink - -let b:current_syntax = "creole" - -"EOF vim: tw=78:ft=vim:ts=8 - diff -r 15f446854045 -r ea87bf0407c4 vim/syntax/io.vim --- a/vim/syntax/io.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -" Vim Syntax File -" Language: Io -" Creator: Scott Dunlop -" Fixes: Manpreet Singh -" Jonathan Wright -" Erik Garrison -" Last Change: 2006 Nov 16 - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syntax case match - -" equivalent to io-mode-prototype-names in io-mode.el -syntax keyword ioType Array AudioDevice AudioMixer Block Box Buffer CFunction -syntax keyword ioType CGI Color Curses DBM DNSResolver DOConnection DOProxy -syntax keyword ioType DOServer Date Directory Duration DynLib Error Exception -syntax keyword ioType FFT File Fnmatch Font Future GL GLE GLScissor GLU -syntax keyword ioType GLUCylinder GLUQuadric GLUSphere GLUT Host Image Importer -syntax keyword ioType LinkList List Lobby Locals MD5 MP3Decoder MP3Encoder Map -syntax keyword ioType Message Movie Notification Number Object -syntax keyword ioType OpenGL Point Protos Regex SGML SGMLElement SGMLParser SQLite Server Sequence -syntax keyword ioType ShowMessage SleepyCat SleepyCatCursor Socket -syntax keyword ioType SocketManager Sound Soup Store String Tree UDPSender -syntax keyword ioType UPDReceiver URL User Warning WeakLink -syntax keyword ioType true false nil Random BigNum Sequence - -" equivalent to io-mode-message-names in io-mode.el -syntax keyword ioKeyword activate activeCoroCount and asString block break -syntax keyword ioKeyword catch clone collectGarbage compileString continue -syntax keyword ioKeyword do doFile doMessage doString else elseif exit for -syntax keyword ioKeyword foreach forward getSlot getEnvironmentVariable hasSlot if ifFalse -syntax keyword ioKeyword ifNil ifNilEval ifTrue isActive isNil isResumable list message -syntax keyword ioKeyword method or parent pass pause perform -syntax keyword ioKeyword performWithArgList print println proto raise raiseResumable -syntax keyword ioKeyword removeSlot resend resume return -syntax keyword ioKeyword schedulerSleepSeconds self sender -syntax keyword ioKeyword setSchedulerSleepSeconds setSlot shallowCopy -syntax keyword ioKeyword slotNames super system then thisBlock thisContext -syntax keyword ioKeyword call try type uniqueId updateSlot wait while -syntax keyword ioKeyword write yield - -syntax region ioOperator start=':' end='=' -syntax region ioOperator start='!' end='=' -syntax region ioOperator start='@' end='@' -syntax region ioOperator start='@' end='[^@]'he=e-1 -syntax region ioOperator start='?' end='?' -syntax region ioOperator start='?' end='[^?]'he=e-1 -syntax region ioOperator start=';' end=';' -syntax region ioOperator start=';' end='[^;]'he=e-1 -syntax region ioOperator start='\.' end='\.' -syntax region ioOperator start='\.' end='[^\.]'he=e-1 -syntax region ioOperator start='=' end='=' -syntax region ioOperator start='=' end=' 'he=e-1 -syntax region ioOperator start='[*/>=+-]' end='[ 0-9]'he=e-1 - -syntax region ioString start=/"/ skip=/\\./ end=/"/ -syntax region ioString start=/"""/ skip=/\\./ end=/"""/ - -syn match ioHexNumber "\<0[xX]\x\+[lL]\=\>" display -syn match ioHexNumber "\<0[xX]\>" display -syn match ioNumber "\<\d\+[lLjJ]\=\>" display -syn match ioFloat "\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display -syn match ioFloat "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display -syn match ioFloat "\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display - -syn match ioOctalError "\<0\o*[89]\d*[lL]\=\>" display -syn match ioError "\<0[xX]\X\+[lL]\=\>" display - -syntax region ioComment start='#' end='$' keepend -syntax region ioComment start=/\/\*/ end=/\*\// -syntax region ioComment start=/\/\// end=/$/ keepend - -highlight link ioType Type -highlight link ioKeyword Function -highlight link ioString String -highlight link ioComment Comment -highlight link ioOperator Operator - -highlight link ioHexNumber Number -highlight link ioNumber Number -highlight link ioFloat Float -highlight link ioOctalError Error -highlight link ioError Error - -let b:current_syntax = "io" \ No newline at end of file diff -r 15f446854045 -r ea87bf0407c4 vim/syntax/less.vim --- a/vim/syntax/less.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,312 +0,0 @@ -" Vim syntax file -" Language: LESS Cascading Style Sheets -" Maintainer: Leaf Corcoran -" Modifier: Bryan J Swift -" URL: http://leafo.net/lessphp/vim/less.vim -" URL: http://gist.github.com/161047 -" Last Change: 2009 August 4 -" LESS by Leaf Corcoran -" CSS2 by Nikolai Weibull -" Full CSS2, HTML4 support by Yeti - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish -endif - let main_syntax = 'less' -endif - -syn case ignore - - - -syn keyword cssTagName abbr acronym address applet area a b base -syn keyword cssTagName basefont bdo big blockquote body br button -syn keyword cssTagName caption center cite code col colgroup dd del -syn keyword cssTagName dfn dir div dl dt em fieldset font form frame -syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i -syn keyword cssTagName iframe img input ins isindex kbd label legend li -syn keyword cssTagName link map menu meta noframes noscript ol optgroup -syn keyword cssTagName option p param pre q s samp script select small -syn keyword cssTagName span strike strong style sub sup tbody td -syn keyword cssTagName textarea tfoot th thead title tr tt ul u var -syn match cssTagName "\" -syn match cssTagName "\*" - -" HTML 5 -syn keyword cssTagName article aside header hgroup footer section nav figure -syn keyword cssTagName figcaption mark summary command datalist details output -syn keyword cssTagName progress meter time embed keygen wbr audio video canvas - - -syn match cssTagName "@page\>" nextgroup=cssDefinition - -syn match cssSelectorOp "[+>.]" -syn match cssSelectorOp2 "[~|]\?=" contained -syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ - -try -syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*" -catch /^.*/ -syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*" -endtry - -syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl -syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl -syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl -syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier - -syn match cssValueInteger "[-+]\=\d\+" -syn match cssValueNumber "[-+]\=\d\+\(\.\d*\)\=" -syn match cssValueLength "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)" - -syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)" -syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)" -syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)" - -syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl -syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr -syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>" -syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline -syn keyword cssFontDescriptorAttr contained all -syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend -syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+" -syn match cssUnicodeRange contained "U+\x\+-\x\+" - -syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow -" FIXME: These are actually case-insentivie too, but (a) specs recommend using -" mixed-case (b) it's hard to highlight the word `Background' correctly in -" all situations -syn case match -syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background -syn case ignore -syn match cssColor contained "\" -syn match cssColor contained "\" -syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>" -syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>" -"syn match cssColor contained "\" - -syn keyword cssCommonAttr contained auto none inherit -syn keyword cssCommonAttr contained top bottom -syn keyword cssCommonAttr contained medium normal - -syn match cssFontProp contained "\\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\>\)\=" -syn match cssFontAttr contained "\<\(sans-\)\=\" -syn match cssFontAttr contained "\\(-\(caps\|caption\)\>\)\=" -syn match cssFontAttr contained "\" -syn match cssFontAttr contained "\" -syn match cssFontAttr contained "\" -syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>" -syn keyword cssFontAttr contained cursive fantasy monospace italic oblique -syn keyword cssFontAttr contained bold bolder lighter larger smaller -syn keyword cssFontAttr contained icon menu -syn match cssFontAttr contained "\" -syn keyword cssFontAttr contained large smaller larger -syn keyword cssFontAttr contained narrower wider - -syn keyword cssColorProp contained color -syn match cssColorProp contained "\" -syn match cssColorAttr contained "\" - -syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>" -syn match cssTextAttr contained "\" -syn match cssTextAttr contained "\" -syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>" -syn keyword cssTextAttr contained underline overline blink sub super middle -syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super - -syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>" -syn match cssBoxProp contained "\" -syn match cssBoxProp contained "\<\(width\|z-index\)\>" -syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>" -syn keyword cssBoxProp contained width height float clear overflow clip visibility -syn keyword cssBoxAttr contained thin thick both -syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset -syn keyword cssBoxAttr contained hidden visible scroll collapse - -syn keyword cssGeneratedContentProp contained content quotes -syn match cssGeneratedContentProp contained "\" -syn match cssGeneratedContentProp contained "\" -syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" -syn match cssAuralAttr contained "\" -syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" -syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>" -syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>" -syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian -syn keyword cssGeneratedContentAttr contained inside outside - -syn match cssPagingProp contained "\" -syn keyword cssPagingProp contained size marks inside orphans widows -syn keyword cssPagingAttr contained landscape portrait crop cross always avoid - -syn keyword cssUIProp contained cursor -syn match cssUIProp contained "\" -syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>" -syn keyword cssUIAttr contained default crosshair pointer move wait help -syn keyword cssUIAttr contained thin thick -syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset -syn keyword cssUIAttr contained invert - -syn match cssRenderAttr contained "\" -syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>" -syn keyword cssRenderProp contained position top bottom direction -syn match cssRenderProp contained "\<\(left\|right\)\>" -syn keyword cssRenderAttr contained block inline compact -syn match cssRenderAttr contained "\" -syn keyword cssRenderAttr contained static relative absolute fixed -syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap -syn match cssRenderAttr contained "\" - -syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>" -syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>" -syn keyword cssAuralProp contained volume during azimuth elevation stress richness -syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>" -syn keyword cssAuralAttr contained silent -syn match cssAuralAttr contained "\" -syn keyword cssAuralAttr contained non mix -syn match cssAuralAttr contained "\<\(left\|right\)-side\>" -syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>" -syn keyword cssAuralAttr contained leftwards rightwards behind -syn keyword cssAuralAttr contained below level above higher -syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>" -syn keyword cssAuralAttr contained faster slower -syn keyword cssAuralAttr contained male female child code digits continuous - -syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>" -syn keyword cssTableAttr contained fixed collapse separate show hide once always - - - -syn match lessComment "//.*$" contains=@Spell -syn match lessVariable "@[A-Za-z_-][A-Za-z0-9_-]*" -syn region lessVariableDefinition start="^@" end=";" contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssDefinition,cssClassName,cssTagName,cssIdentifier,lessComment,lessVariable,lessFunction - -" captures both the definition and the call -syn region lessFunction matchgroup=lessFuncDef start="@[A-Za-z_-][A-Za-z0-9_-]*(" end=")" contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssDefinition,cssClassName,cssTagName,cssIdentifier,lessComment,lessVariable,lessFunction - - - - - -" FIXME: This allows cssMediaBlock before the semicolon, which is wrong. -syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType -syn match cssBraces contained "[{}]" -syn match cssError contained "{@<>" -syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssDefinition,cssClassName,cssTagName,cssIdentifier,lessComment,lessVariable,lessFunction -" syn match cssBraceError "}" - -syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape -syn keyword cssPseudoClassId contained link visited active hover focus before after left right -syn match cssPseudoClassId contained "\" -syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline - -syn region cssComment start="/\*" end="\*/" contains=@Spell - -syn match cssUnicodeEscape "\\\x\{1,6}\s\?" -syn match cssSpecialCharQQ +\\"+ contained -syn match cssSpecialCharQ +\\'+ contained -syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ -syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ -syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" - - - - -if main_syntax == "css" - syn sync minlines=10 -endif - -" Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_less_syn_inits") - if version < 508 - let did_less_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink lessComment Comment - HiLink lessVariable Special - HiLink lessFuncDef Function - HiLink cssComment Comment - HiLink cssTagName Statement - HiLink cssSelectorOp Special - HiLink cssSelectorOp2 Special - HiLink cssFontProp StorageClass - HiLink cssColorProp storageClass - HiLink cssTextProp StorageClass - HiLink cssBoxProp StorageClass - HiLink cssRenderProp StorageClass - HiLink cssAuralProp StorageClass - HiLink cssRenderProp StorageClass - HiLink cssGeneratedContentProp StorageClass - HiLink cssPagingProp StorageClass - HiLink cssTableProp StorageClass - HiLink cssUIProp StorageClass - HiLink cssFontAttr Type - HiLink cssColorAttr Type - HiLink cssTextAttr Type - HiLink cssBoxAttr Type - HiLink cssRenderAttr Type - HiLink cssAuralAttr Type - HiLink cssGeneratedContentAttr Type - HiLink cssPagingAttr Type - HiLink cssTableAttr Type - HiLink cssUIAttr Type - HiLink cssCommonAttr Type - HiLink cssPseudoClassId PreProc - HiLink cssPseudoClassLang Constant - HiLink cssValueLength Number - HiLink cssValueInteger Number - HiLink cssValueNumber Number - HiLink cssValueAngle Number - HiLink cssValueTime Number - HiLink cssValueFrequency Number - HiLink cssFunction Constant - HiLink cssURL String - HiLink cssFunctionName Function - HiLink cssColor Constant - HiLink cssIdentifier Function - HiLink cssInclude Include - HiLink cssImportant Special - HiLink cssBraces SpecialChar - HiLink cssBraceError Error - HiLink cssError Error - HiLink cssInclude Include - HiLink cssUnicodeEscape Special - HiLink cssStringQQ String - HiLink cssStringQ String - HiLink cssMedia Special - HiLink cssMediaType Special - HiLink cssMediaComma Normal - HiLink cssFontDescriptor Special - HiLink cssFontDescriptorFunction Constant - HiLink cssFontDescriptorProp StorageClass - HiLink cssFontDescriptorAttr Type - HiLink cssUnicodeRange Constant - HiLink cssClassName Function - delcommand HiLink -endif - -let b:current_syntax = "less" - -if main_syntax == 'less' - unlet main_syntax -endif - - -" vim: ts=8 - - diff -r 15f446854045 -r ea87bf0407c4 vim/syntax/pandabt.vim --- a/vim/syntax/pandabt.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syntax region pandabtString start=/"/ skip=/\\./ end=/"/ -syntax region pandabtComment start=/\/\// end=/$/ keepend - -highlight link pandabtString String -highlight link pandabtComment Comment - -let b:current_syntax = "pandabt" diff -r 15f446854045 -r ea87bf0407c4 vim/syntax/pentadactyl.vim --- a/vim/syntax/pentadactyl.vim Thu May 05 17:31:55 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -" Vim syntax file -" Language: Pentadactyl configuration file -" Maintainer: Doug Kearns - -" TODO: make this pentadactyl specific - shared dactyl config? - -if exists("b:current_syntax") - finish -endif - -let s:cpo_save = &cpo -set cpo&vim - -syn include @javascriptTop syntax/javascript.vim -unlet b:current_syntax - -syn include @cssTop syntax/css.vim -unlet b:current_syntax - -syn match pentadactylCommandStart "\%(^\s*:\=\)\@<=" nextgroup=pentadactylCommand,pentadactylAutoCmd - -syn keyword pentadactylCommand run ab[breviate] abc[lear] addo[ns] au[tocmd] ba[ck] bd[elete] bw[ipeout] bun[load] - \ tabc[lose] bma[rk] bmarks b[uffer] buffers files ls tabs ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] cno[remap] - \ colo[rscheme] comc[lear] com[mand] contexts cuna[bbrev] cunm[ap] delbm[arks] delc[ommand] delmac[ros] delm[arks] delqm[arks] - \ dels[tyle] dia[log] doautoa[ll] do[autocmd] downl[oads] dl ec[ho] echoe[rr] echom[sg] em[enu] exe[cute] exta[dd] extde[lete] - \ extd[isable] exte[nable] extens[ions] exts exto[ptions] extp[references] exu[sage] fini[sh] fo[rward] fw frameo[nly] - \ ha[rdcopy] h[elp] helpa[ll] hi[ghlight] hist[ory] hs ia[bbrev] iabc[lear] im[ap] imapc[lear] ino[remap] iuna[bbrev] iunm[ap] - \ javas[cript] js ju[mps] keepa[lt] let loadplugins lpl macros map mapc[lear] ma[rk] marks mes[sages] messc[lear] - \ mkp[entadactylrc] nm[ap] nmapc[lear] nno[remap] noh[lsearch] no[remap] norm[al] nunm[ap] o[pen] optionu[sage] pa[geinfo] - \ pagest[yle] pas pref[erences] prefs pw[d] qma[rk] qmarks q[uit] quita[ll] qa[ll] redr[aw] re[load] reloada[ll] res[tart] - \ runt[ime] sa[nitize] sav[eas] w[rite] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] sb[ar] sbope[n] - \ sil[ent] so[urce] st[op] stopa[ll] sty[le] styled[isable] styd[isable] stylee[nable] stye[nable] stylet[oggle] styt[oggle] - \ tab taba[ttach] tabde[tach] tabd[o] bufd[o] tabdu[plicate] tabl[ast] bl[ast] tabm[ove] tabn[ext] tn[ext] bn[ext] tabo[nly] - \ tabopen t[open] tabnew tabp[revious] tp[revious] tabN[ext] tN[ext] bp[revious] bN[ext] tabr[ewind] tabfir[st] br[ewind] - \ bf[irst] time toolbarh[ide] tbh[ide] toolbars[how] tbs[how] toolbart[oggle] tbt[oggle] una[bbreviate] u[ndo] undoa[ll] - \ unl[et] unm[ap] verb[ose] ve[rsion] vie[wsource] viu[sage] vm[ap] vmapc[lear] vno[remap] vunm[ap] winc[lose] wc[lose] - \ wind[ow] winon[ly] wino[pen] wo[pen] wqa[ll] wq xa[ll] zo[om] - \ contained - -syn match pentadactylCommand "!" contained - -syn keyword pentadactylAutoCmd au[tocmd] contained nextgroup=pentadactylAutoEventList skipwhite - -syn keyword pentadactylAutoEvent BookmarkAdd BookmarkChange BookmarkRemove ColorScheme DOMLoad DownloadPost Fullscreen - \ LocationChange PageLoadPre PageLoad PrivateMode Sanitize ShellCmdPost Enter LeavePre Leave - \ contained - -syn match pentadactylAutoEventList "\(\a\+,\)*\a\+" contained contains=pentadactylAutoEvent - -syn region pentadactylSet matchgroup=pentadactylCommand start="\%(^\s*:\=\)\@<=\<\%(setl\%[ocal]\|setg\%[lobal]\|set\=\)\=\>" - \ end="$" keepend oneline contains=pentadactylOption,pentadactylString - -syn keyword pentadactylOption activate act altwildmode awim autocomplete au cdpath cd complete cpt cookies ck defsearch ds - \ editor encoding enc eventignore ei extendedhinttags eht fbwhitelist fbw fileencoding fenc followhints fh guioptions go - \ helpfile hf hintinputs hin hintkeys hk hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls loadplugins lpl - \ maxitems messages msgs newtab nextpattern pageinfo pa popups pps previouspattern runtimepath rtp sanitizeitems si - \ sanitizetimespan sts scroll scr shell sh shellcmdflag shcf showstatuslinks ssli showtabline stal suggestengines titlestring - \ urlseparator verbose vbs wildanchor wia wildcase wic wildignore wig wildmode wim wildsort wis wordseparators wsp - \ contained nextgroup=pentadactylSetMod - -let s:toggleOptions = ["banghist", "bh", "errorbells", "eb", "exrc", "ex", "flashblock", "fb", "fullscreen", "fs", "hlsearch", - \ "hls", "ignorecase", "ic", "incsearch", "is", "insertmode", "im", "jsdebugger", "jsd", "linksearch", "lks", "more", - \ "online", "private", "pornmode", "showmode", "smd", "smartcase", "scs", "strictfocus", "sf", "usermode", "um", "visualbell", - \ "vb"] -execute 'syn match pentadactylOption "\<\%(no\|inv\)\=\%(' . - \ join(s:toggleOptions, '\|') . - \ '\)\>!\=" contained nextgroup=pentadactylSetMod' - -syn match pentadactylSetMod "\%(\<[a-z_]\+\)\@<=&" contained - -syn region pentadactylJavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline -syn region pentadactylJavaScript matchgroup=pentadactylJavaScriptDelimiter - \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold - -let s:cssRegionStart = '\%(^\s*sty\%[le]!\=\s\+\%(-\%(n\|name\)\%(\s\+\|=\)\S\+\s\+\)\=[^-]\S\+\s\+\)\@<=' -execute 'syn region pentadactylCss start="' . s:cssRegionStart . '" end="$" contains=@cssTop keepend oneline' -execute 'syn region pentadactylCss matchgroup=pentadactylCssDelimiter' - \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' - -syn match pentadactylNotation "<[0-9A-Za-z-]\+>" - -syn match pentadactylComment +".*$+ contains=pentadactylTodo,@Spell -syn keyword pentadactylTodo FIXME NOTE TODO XXX contained - -syn region pentadactylString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline - -syn match pentadactylLineComment +^\s*".*$+ contains=pentadactylTodo,@Spell - -" NOTE: match vim.vim highlighting group names -hi def link pentadactylAutoCmd pentadactylCommand -hi def link pentadactylAutoEvent Type -hi def link pentadactylCommand Statement -hi def link pentadactylComment Comment -hi def link pentadactylJavaScriptDelimiter Delimiter -hi def link pentadactylCssDelimiter Delimiter -hi def link pentadactylNotation Special -hi def link pentadactylLineComment Comment -hi def link pentadactylOption PreProc -hi def link pentadactylSetMod pentadactylOption -hi def link pentadactylString String -hi def link pentadactylTodo Todo - -let b:current_syntax = "pentadactyl" - -let &cpo = s:cpo_save -unlet s:cpo_save - -" vim: tw=130 et ts=4 sw=4: - diff -r 15f446854045 -r ea87bf0407c4 vim/vimrc --- a/vim/vimrc Thu May 05 17:31:55 2022 -0400 +++ b/vim/vimrc Thu May 05 17:33:06 2022 -0400 @@ -462,10 +462,6 @@ " Unfuck my screen nnoremap U :syntax sync fromstart:redraw! -" Pushing -nnoremap Go :Start! git push origin -nnoremap Gu :Start! git push upstream - " Open current directory in Finder nnoremap O :!open . @@ -798,7 +794,7 @@ " 1. Close all folds. " 2. Open just the folds containing the current line. " 3. Move the line to a bit (25 lines) down from the top of the screen. -" 4. Pulse the cursor line. My eyes are bad. +" 4. Pulse the line. " " This mapping wipes out the z mark, which I never use. " @@ -831,17 +827,6 @@ " }}} " Filetype-specific ------------------------------------------------------- {{{ -" Arduino {{{ - -augroup ft_arduino - au! - - au FileType arduino setlocal noexpandtab shiftwidth=8 tabstop=8 softtabstop=8 foldmethod=syntax - au FileType arduino inoremap A; - au FileType arduino inoremap mzA;`z -augroup END - -" }}} " Assembly {{{ augroup ft_asm @@ -1208,18 +1193,6 @@ augroup END " }}} " }}} -" Confluence {{{ - -augroup ft_c - au! - - au BufRead,BufNewFile *.confluencewiki setlocal filetype=confluencewiki - - " Wiki pages should be soft-wrapped. - au FileType confluencewiki setlocal wrap linebreak nolist -augroup END - -" }}} " Cram {{{ let cram_fold=1 @@ -1379,18 +1352,6 @@ augroup END " }}} -" GLSL {{{ - -augroup ft_glsl - au! - - au BufNewFile,BufRead *.shader setlocal filetype=glsl - - au FileType glsl setlocal foldmethod=marker foldmarker={,} - au FileType glsl setlocal ts=8 sts=8 sw=8 noexpandtab -augroup END - -" }}} " gnuplot {{{ function! OpenGnuplotRepl() "{{{ @@ -1500,6 +1461,11 @@ return '=' endfunction +func Eatchar(pat) + let c = nr2char(getchar(0)) + return (c =~ a:pat) ? '' : c +endfunc + augroup ft_go au! @@ -1520,6 +1486,18 @@ au FileType go iabbrev enil if err != nil au FileType go iabbrev rete return err au FileType go iabbrev retne return nil, err + au FileType go iabbrev retse return "", err + au FileType go iabbrev retze return "", err + + au FileType go iabbrev enilre if err != nil {return err + au FileType go iabbrev enilrn if err != nil {return nil, err + au FileType go iabbrev enilrs if err != nil {return "", err + au FileType go iabbrev enilrz if err != nil {return 0, err + + au FileType go iabbrev enilrw if err != nil {return fmt.Errorf(": %w", err=Eatchar('\s') + au FileType go iabbrev enilrwn if err != nil {return nil, fmt.Errorf(": %w", err=Eatchar('\s') + au FileType go iabbrev enilrws if err != nil {return "", fmt.Errorf(": %w", err=Eatchar('\s') + au FileType go iabbrev enilrwz if err != nil {return 0, fmt.Errorf(": %w", err=Eatchar('\s') au FileType gohtmltmpl setlocal shiftwidth=4 augroup END @@ -1564,16 +1542,6 @@ augroup END " }}} -" Jade Templates {{{ - -augroup ft_jade - au! - - au BufRead,BufNewFile *.jade setlocal filetype=jade - au FileType jade setlocal foldmethod=indent -augroup END - -" }}} " Java {{{ augroup ft_java @@ -1614,15 +1582,6 @@ augroup END " }}} -" Lilypond {{{ - -augroup ft_lilypond - au! - - au FileType lilypond setlocal foldmethod=marker foldmarker={,} -augroup END - -" }}} " Mail {{{ augroup ft_mail @@ -1738,15 +1697,6 @@ augroup END " }}} -" Nand2Tetris HDL {{{ - -augroup ft_n2thdl - au! - - au BufNewFile,BufRead *.hdl set filetype=n2thdl -augroup END - -" }}} " Nginx {{{ augroup ft_nginx @@ -1761,25 +1711,6 @@ augroup END " }}} -" PandaBT {{{ - -augroup ft_pandabt - au! - au BufNewFile,BufRead *.BT.txt set filetype=pandabt - - au FileType pandabt setlocal noexpandtab shiftwidth=8 -augroup END - -" }}} -" Pentadactyl {{{ - -augroup ft_pentadactyl - au! - au BufNewFile,BufRead .pentadactylrc set filetype=pentadactyl - au BufNewFile,BufRead ~/Library/Caches/TemporaryItems/pentadactyl-*.tmp set nolist wrap linebreak columns=100 colorcolumn=0 -augroup END - -" }}} " .plan {{{ function! PlanLinkPaste() @@ -1846,7 +1777,7 @@ " override this in a normal way, could you? au FileType python if exists("python_space_error_highlight") | unlet python_space_error_highlight | endif - au FileType python nnoremap gi :Neoformat black + au FileType python nnoremap gi :Neoformat blackzx augroup END " }}} @@ -1861,46 +1792,6 @@ augroup END " }}} -" ReStructuredText {{{ - -augroup ft_rest - au! - - au Filetype rst nnoremap 1 yypVr=:redraw - au Filetype rst nnoremap 2 yypVr-:redraw - au Filetype rst nnoremap 3 yypVr~:redraw - au Filetype rst nnoremap 4 yypVr`:redraw -augroup END - -" }}} -" Rubby {{{ - -augroup ft_ruby - au! - au Filetype ruby setlocal foldmethod=syntax - au BufRead,BufNewFile Capfile setlocal filetype=ruby -augroup END - -" }}} -" Scala {{{ - -augroup ft_scala - au! - - au FileType scala setlocal foldmethod=syntax - au FileType scala setlocal foldlevel=1 - au FileType scala setlocal cc=100 tw=100 - au FileType scala setlocal expandtab - - au FileType scala nnoremap s :SortSimpleScalaImports - au FileType scala nnoremap :call LanguageClient_textDocument_definition() - au FileType scala nnoremap r :call LanguageClient_textDocument_references() - au FileType scala inoremap - - au FileType scala setlocal omnifunc=LanguageClient#complete -augroup END - -" }}} " Sh {{{ function! SendShellParagraph() "{{{ @@ -1918,16 +1809,6 @@ augroup END " }}} -" ShaderLab {{{ - -augroup ft_shaderlab " {{{ - au! - - au FileType shaderlab setlocal shiftwidth=4 - au FileType shaderlab setlocal expandtab -augroup END " }}} - -" }}} " Standard In {{{ augroup ft_stdin @@ -1938,15 +1819,6 @@ augroup END " }}} -" stevelosh.com Blog Entries {{{ - -augroup ft_steveloshcom - au! - au BufRead,BufNewFile */stevelosh/content/blog/20*/*/*.html set ft=markdown - au BufRead,BufNewFile */stevelosh/content/projects/*.html set ft=markdown -augroup END - -" }}} " Terminal {{{ augroup ft_terminal @@ -1997,15 +1869,6 @@ augroup END " }}} -" Wisp {{{ - -augroup ft_wisp - au! - - au BufRead,BufNewFile *.wisp set ft=clojure -augroup END - -" }}} " XML {{{ augroup ft_xml @@ -2119,6 +1982,8 @@ nnoremap gci :Gcommit nnoremap gm :Gmove nnoremap gr :Gremove +nnoremap gpo :!git push origin +nnoremap gpu :!git push upstream nnoremap gl :Clam git gll -100 \| stripcolor @@ -2172,20 +2037,6 @@ let g:atia_attributes_complete = 0 " }}} -" Language Server Protocol {{{ - -let g:LanguageClient_serverCommands = { - \ 'scala': ['netcat', 'localhost', '62831'], - \ 'java': ['netcat', 'localhost', '62831'], - \ } -let g:LanguageClient_autoStart = 1 - -nnoremap gd :call LanguageClient_textDocument_definition() - -" nnoremap K :call LanguageClient_textDocument_hover() -" nnoremap :call LanguageClient_textDocument_rename() - -" }}} " MiniYank {{{ map p (miniyank-autoput) @@ -2356,12 +2207,6 @@ let g:rbpt_max = 1 " }}} -" Scala {{{ - -let g:scala_use_builtin_tagbar_defs = 0 -let g:scala_use_default_keymappings = 0 - -" }}} " Scratch {{{ command! ScratchToggle call ScratchToggle() @@ -2536,13 +2381,6 @@ endfunction " }}} -" Supertab {{{ - -let g:SuperTabDefaultCompletionType = "" -let g:SuperTabLongestHighlight = 1 -let g:SuperTabCrMapping = 1 - -"}}} " Splice {{{ let g:splice_prefix = "-" @@ -2610,6 +2448,18 @@ \ "SPEED": 1 \ } +let g:vlime_contribs = [ + \ "SWANK-ASDF", + \ "SWANK-PACKAGE-FU", + \ "SWANK-PRESENTATIONS", + \ "SWANK-FANCY-INSPECTOR", + \ "SWANK-C-P-C", + \ "SWANK-ARGLISTS", + \ "SWANK-REPL", + \ "SWANK-FUZZY", + \ "SWANK-TRACE-DIALOG" + \ ] + " let g:vlime_indent_keywords = {"defsystem": 1} function! CleanVlimeWindows() @@ -2756,7 +2606,7 @@ " Mini-plugins ------------------------------------------------------------ {{{ " Stuff that should probably be broken out into plugins, but hasn't proved to be " worth the time to do so just yet. -" + " HTTP Statuses {{{ function! HTTPStatuses() @@ -2766,7 +2616,6 @@ command! HTTPStatuses call HTTPStatuses() " }}} - " Synstack {{{ " Show the stack of syntax hilighting classes affecting whatever is under the @@ -2814,9 +2663,6 @@ nnoremap V :call ToggleVirtualEdit() -" TODO: Figure out the diffexpr shit necessary to make this buffer-local. -" nnoremap W :call ToggleDiffWhitespace() - " }}} " Error Toggles {{{ @@ -2942,15 +2788,6 @@ nnoremap h :!hg " }}} -" J {{{ - -function! s:JumpTo(dest) - call system("tmux split-window -h 'j " . a:dest . "; and myctags &; and nvim .'") -endfunction - -command! -nargs=1 J call s:JumpTo() - -" }}} " Ack motions {{{ " Motions to Ack for things. Works with pretty much everything, including: @@ -3024,6 +2861,7 @@ execute 'hi ' . old_hi endfunction " }}} + command! -nargs=0 Pulse call s:Pulse() " }}} @@ -3155,7 +2993,6 @@ end else " Console Vim - " For me, this means iTerm2, possibly through tmux " Mouse support set mouse=a