6f0af1e0b0c9

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 13 Jul 2020 11:52:11 -0400
parents ccc0ace2e343 (diff) 1d7d7c65d893 (current diff)
children b0c1c5bcfc3b 32bdaee0bb8b
branches/tags (none)
files lispwords stumpwmrc vim/custom-dictionary.utf-8.add vim/vimrc

Changes

--- a/.hgsubstate	Wed Jun 17 21:35:35 2020 -0400
+++ b/.hgsubstate	Mon Jul 13 11:52:11 2020 -0400
@@ -36,7 +36,7 @@
 aa1f120ad3a29c27cc41d581cda3751c59343cce vim/bundle/surround
 19c3d966440b6cfe8d74251881a48e961ddb8648 vim/bundle/swig
 f6f2d6618a321f5b0065586a7bc934325fec81ab vim/bundle/targets
-c860f7c3ae0e0287f143a5b3e58873fc0a9fbda9 vim/bundle/vim-go
+2c6bffb492f4f9b101e45610b0d7b9c328916894 vim/bundle/vim-go
 5d5c71044880443035e07009497962feacb56b20 vim/bundle/vimtex
-b225d82f4eeed35738158f9bff2c1cbbb5d5081e vim/bundle/vlime
+a928999f0564dce49e9a368c1b0ce06ed6e3dcf9 vim/bundle/vlime
 6876fe38b33732cb124d415ffc4156f16da5e118 vim/bundle/windowswap
--- a/bin/cmrm	Wed Jun 17 21:35:35 2020 -0400
+++ b/bin/cmrm	Mon Jul 13 11:52:11 2020 -0400
@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
 
 set -euo pipefail
+set -x
 
 rm ~/.ssh/controlmaster/*
+ps auxww | grep 'ssh.*[.]sock.*mux' | f 2 | xargs kill
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/hi	Mon Jul 13 11:52:11 2020 -0400
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+set -m
+
+REGEX="$1"
+shift
+
+batchcolor '('"$REGEX"')'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/ms-to-utc	Mon Jul 13 11:52:11 2020 -0400
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+SEC="$(echo "$1" | sed -e 's/...$//')"
+sec-to-utc "$SEC"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/sec-to-utc	Mon Jul 13 11:52:11 2020 -0400
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+date --utc --date="@$1"
--- a/ffignore	Wed Jun 17 21:35:35 2020 -0400
+++ b/ffignore	Mon Jul 13 11:52:11 2020 -0400
@@ -6,6 +6,7 @@
 .m2
 node_modules
 fake-gopath
+slug
 
 syntax:regex
 \btags$
--- a/fish/config.fish	Wed Jun 17 21:35:35 2020 -0400
+++ b/fish/config.fish	Mon Jul 13 11:52:11 2020 -0400
@@ -14,6 +14,7 @@
 
 function js; cd ~/scratch; end
 function jd; cd /dump; end
+function jl; cd ~/scratch/logs; end
 
 function histgrep; history | grep "$argv" | tac; end
 
@@ -134,6 +135,7 @@
 # Go {{{
 
 set -g -x GOPATH "$HOME/.go"
+set -g -x GOSUMDB off
 
 # }}}
 # R {{{
--- a/fish/functions/ms-to-utc.fish	Wed Jun 17 21:35:35 2020 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function ms-to-utc -d "convert epoch milliseconds to UTC"
-    date -ur (echo -n $argv[1] | sed -e 's/...$//')
-end
--- a/lisp/lispindent.lisp	Wed Jun 17 21:35:35 2020 -0400
+++ b/lisp/lispindent.lisp	Mon Jul 13 11:52:11 2020 -0400
@@ -106,7 +106,7 @@
                    (let ((c (char s j)))
                      (cond ((char= c #\\) (setq escapep t i j))
                            (t (return i)))))))
-              ((member c '(#\space #\tab #\( #\) #\[ #\] #\" #\' #\` #\, #\;))
+              ((member c '(#\space #\tab #\{ #\} #\( #\) #\[ #\] #\" #\' #\` #\, #\;))
                (return i))))
       (incf i))))
 
@@ -170,19 +170,24 @@
          (left-indent
            (if (= j i) 1
              (let ((w (subseq s i j)))
-               (if (and (>= i 2) (member (char s (- i 2)) '(#\' #\`))) 2
-                 (let ((nas (if (in-labels-p stack)
-                              1
-                              (lisp-indent-number w))))
-                   (cond ((or (in-lambda-list-p stack)
-                              (in-case-p stack)) 1)
-                         ((>= nas 0) (setq num-aligned-subforms nas)
-                          2)
-                         ((literal-token-p w) 1)
-                         ((= j n) 2)
-                         (t (+ (- j i) 2)))))))))
+               (cond
+                 ((and (>= i 2) (member (char s (- i 2)) '(#\' #\`))) 2)
+                 ((and (>= i 2) (member (subseq s (- i 2) i) '("#(" "#{" "#[") :test 'string=) 1))
+                 ((and (>= i 1) (member (subseq s (- i 1) i) '("[" "{") :test 'string=) 1))
+                 (t (let ((nas (if (in-labels-p stack)
+                                 1
+                                 (lisp-indent-number w))))
+                      (cond ((or (in-lambda-list-p stack)
+                                 (in-case-p stack)) 1)
+                            ((>= nas 0) (setq num-aligned-subforms nas)
+                             2)
+                            ((literal-token-p w) 1)
+                            ((= j n) 2)
+                            (t (+ (- j i) 2))))))))))
     (values left-indent num-aligned-subforms (1- j))))
 
+;; (trace calc-subindent)
+
 (defun num-leading-spaces (s)
   (let ((n (length s))
         (i 0) (j 0))
@@ -241,7 +246,7 @@
                        (let ((lp (car paren-stack)))
                          (when lp
                            (incf (lparen-num-finished-subforms lp))))))
-                    ((member c '(#\( #\[) :test #'char=)
+                    ((member c '(#\( #\[ #\{) :test #'char=)
                      (setq inter-word-space-p nil)
                      (multiple-value-bind (left-indent num-aligned-subforms j)
                          (calc-subindent paren-stack curr-line (1+ i) n)
@@ -251,7 +256,7 @@
                                       :num-aligned-subforms num-aligned-subforms)
                          paren-stack)
                        (setq i j)))
-                    ((member c '(#\) #\]) :test #'char=)
+                    ((member c '(#\) #\] #\}) :test #'char=)
                      (setq inter-word-space-p nil)
                      (cond (paren-stack (pop paren-stack))
                            (t (setq left-i 0)))
--- a/lispwords	Wed Jun 17 21:35:35 2020 -0400
+++ b/lispwords	Mon Jul 13 11:52:11 2020 -0400
@@ -126,8 +126,6 @@
 (1 make-option make-boolean-options)
 (1 quit-on-ctrl-c)
 
-; boots
-(1 with-screen)
 
 ; metabang-bind
 (1 bind)
--- a/mutt/muttrc	Wed Jun 17 21:35:35 2020 -0400
+++ b/mutt/muttrc	Mon Jul 13 11:52:11 2020 -0400
@@ -56,7 +56,7 @@
 
 set pgp_import_command="gpg --no-verbose --import -v %f"
 set pgp_export_command="gpg --no-verbose --export --armor %r"
-set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" 
+set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
 set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
 
 set crypt_verify_sig=yes
@@ -171,10 +171,13 @@
 bind index p        recall-message
 bind index <space>  collapse-thread
 bind index N        search-opposite
-bind index <f1>     sort-mailbox
 bind index B        sidebar-toggle-visible
 # macro index s "<pipe-message>cat > ~/Desktop/"  "save message as"
 
+# Sorting
+macro index <f1> "<enter-command>set sort = threads<enter><enter-command>set sort_aux = reverse-last-date-received<enter>" "sort with newest first"
+macro index <f2> "<enter-command>set sort = threads<enter><enter-command>set sort_aux = date-received<enter>" "sort with oldest first"
+
 # Mark all as read
 macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
 
--- a/stumpwmrc	Wed Jun 17 21:35:35 2020 -0400
+++ b/stumpwmrc	Mon Jul 13 11:52:11 2020 -0400
@@ -703,4 +703,6 @@
 (defvar *dunst*
   (run-shell-command "/usr/bin/dunst -conf ~/.dunstrc"))
 
-;;;; Scratch ------------------------------------------------------------------
+#;;; Scratch ------------------------------------------------------------------
+(message (format nil "~S" (remove #\newline (run-shell-command "acpi" t))))
+
--- a/vim/custom-dictionary.utf-8.add	Wed Jun 17 21:35:35 2020 -0400
+++ b/vim/custom-dictionary.utf-8.add	Mon Jul 13 11:52:11 2020 -0400
@@ -303,5 +303,7 @@
 Illumina
 Phred
 FastQC
+tradeoffs
+Hox
 deduplication
 deduplicating
--- a/vim/vimrc	Wed Jun 17 21:35:35 2020 -0400
+++ b/vim/vimrc	Mon Jul 13 11:52:11 2020 -0400
@@ -84,6 +84,7 @@
 " Better Completion
 set complete=.,w,b,u,t
 set completeopt=longest,menuone
+inoremap <c-o> <c-x><c-o>
 
 " Save when losing focus
 au FocusLost * :silent! wall
@@ -451,7 +452,7 @@
 command! -bang Wqa wqa<bang>
 
 " Unfuck my screen
-nnoremap <leader>u :syntax sync fromstart<cr>:redraw!<cr>
+nnoremap U :syntax sync fromstart<cr>:redraw!<cr>
 
 " Pushing
 nnoremap <leader>Go :Start! git push origin<cr>
@@ -491,9 +492,6 @@
 nnoremap ]Z ]Sz=
 nnoremap [Z [Sz=
 
-" Upcase
-nnoremap U gUiww
-
 " Insert Mode Completion {{{
 
 inoremap <c-f> <c-x><c-f>
@@ -722,9 +720,9 @@
 cnoremap <c-a> <home>
 cnoremap <c-e> <end>
 
-" gi already moves to "last place you exited insert mode", so we'll map gI to
-" something similar: move to last change
-nnoremap gI `.
+" go indent
+nnoremap gi mzVap=`z
+nnoremap gI mzgg=G`z
 
 " Fix linewise visual selection of various text objects
 nnoremap VV V
@@ -861,20 +859,11 @@
 " }}}
 " C# {{{
 
-let g:OmniSharp_selector_ui = 'ctrlp'
-
 augroup ft_csharp
     au!
     au FileType cs setlocal foldmethod=marker foldmarker={,}
-    au FileType cs setlocal ts=4 sts=4 sw=4 expandtab
     au FileType cs setlocal foldtext=MyFoldText()
-    " au FileType cs inoremap <c-n> <c-x><c-o>
-
-    au FileType cs nnoremap <buffer> <c-]> :OmniSharpGotoDefinition<cr>
-    au FileType cs nnoremap <buffer> M :OmniSharpDocumentation<cr>
-
     au FileType cs nnoremap <buffer> gi mz=ap`z
-
     au FileType cs setlocal ts=4 sw=4 sts=4 noexpandtab
 augroup END
 
@@ -2147,6 +2136,7 @@
     au FileType lisp setlocal commentstring=;;\ %s
     au FileType makerlisp setlocal commentstring=;;\ %s
     au FileType puppet setlocal commentstring=#\ %s
+    au FileType nginx setlocal commentstring=#\ %s
     au FileType fish setlocal commentstring=#\ %s
     au FileType gnuplot setlocal commentstring=#\ %s
     au FileType cs setlocal commentstring=//\ %s
@@ -2218,8 +2208,14 @@
 " }}}
 " Go {{{
 
-let g:go_fmt_command = "goimports"
+let g:go_fmt_command = "gofmt"
+let g:go_fmt_options = {
+    \ 'gofmt': '-s',
+    \ 'goimports': '',
+    \ }
 let g:go_fmt_experimental = 1
+let g:go_fmt_autosave = 1
+let g:go_imports_autosave = 1
 let g:go_doc_keywordprg_enabled = 0
 let g:go_def_mode = "godef"
 
@@ -2718,6 +2714,7 @@
     au FileType lisp nnoremap <buffer> <nowait> <localleader>I :call vlime#plugin#Inspect()<cr>
     au FileType lisp nnoremap <buffer> M :call vlime#plugin#DocumentationSymbol(vlime#ui#CurAtom())<cr>
     au FileType lisp nnoremap <buffer> gi :call IndentToplevelLispForm()<cr>
+    au FileType lisp vnoremap <buffer> gi =
     au FileType lisp setlocal indentexpr=vlime#plugin#CalcCurIndent()
 
     " Keys for the REPL
@@ -2735,6 +2732,7 @@
     au FileType lisp,vlime_repl,vlime_inspector,vlime_sldb,vlime_notes,vlime_xref,vlime_preview call MapVlimeKeys()
 
     " Fix <cr>
+    au FileType lisp            inoremap <buffer> <cr> <cr><c-r>=vlime#plugin#VlimeKey("cr")<cr>
     au FileType vlime_xref      nnoremap <buffer> <cr> :call vlime#ui#xref#OpenCurXref()<cr>
     au FileType vlime_notes     nnoremap <buffer> <cr> :call vlime#ui#compiler_notes#OpenCurNote()<cr>
     au FileType vlime_sldb      nnoremap <buffer> <cr> :call vlime#ui#sldb#ChooseCurRestart()<cr>