13ec2c64c7a6

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 17 Jun 2020 12:29:36 -0400
parents a5781ceaf296
children 05244afc5b3f
branches/tags (none)
files .hgsubstate ffignore lisp/lispindent.lisp lispwords stumpwmrc vim/custom-dictionary.utf-8.add vim/vimrc

Changes

--- a/.hgsubstate	Tue Mar 17 11:28:35 2020 -0700
+++ b/.hgsubstate	Wed Jun 17 12:29:36 2020 -0400
@@ -38,5 +38,5 @@
 f6f2d6618a321f5b0065586a7bc934325fec81ab vim/bundle/targets
 c860f7c3ae0e0287f143a5b3e58873fc0a9fbda9 vim/bundle/vim-go
 5d5c71044880443035e07009497962feacb56b20 vim/bundle/vimtex
-51d42776a11f0941df3a530bc465aa040ea7538c vim/bundle/vlime
+3203be247b574529f1c43973e4f7294abcda392b vim/bundle/vlime
 6876fe38b33732cb124d415ffc4156f16da5e118 vim/bundle/windowswap
--- a/ffignore	Tue Mar 17 11:28:35 2020 -0700
+++ b/ffignore	Wed Jun 17 12:29:36 2020 -0400
@@ -6,6 +6,7 @@
 .m2
 node_modules
 fake-gopath
+slug
 
 syntax:regex
 \btags$
--- a/lisp/lispindent.lisp	Tue Mar 17 11:28:35 2020 -0700
+++ b/lisp/lispindent.lisp	Wed Jun 17 12:29:36 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	Tue Mar 17 11:28:35 2020 -0700
+++ b/lispwords	Wed Jun 17 12:29:36 2020 -0400
@@ -127,7 +127,7 @@
 (1 quit-on-ctrl-c)
 
 ; boots
-(1 make-widget)
+(1 with-layer)
 
 ; metabang-bind
 (1 bind)
--- a/stumpwmrc	Tue Mar 17 11:28:35 2020 -0700
+++ b/stumpwmrc	Wed Jun 17 12:29:36 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	Tue Mar 17 11:28:35 2020 -0700
+++ b/vim/custom-dictionary.utf-8.add	Wed Jun 17 12:29:36 2020 -0400
@@ -303,3 +303,5 @@
 Illumina
 Phred
 FastQC
+tradeoffs
+Hox
--- a/vim/vimrc	Tue Mar 17 11:28:35 2020 -0700
+++ b/vim/vimrc	Wed Jun 17 12:29:36 2020 -0400
@@ -451,7 +451,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 +491,6 @@
 nnoremap ]Z ]Sz=
 nnoremap [Z [Sz=
 
-" Upcase
-nnoremap U gUiww
-
 " Insert Mode Completion {{{
 
 inoremap <c-f> <c-x><c-f>
@@ -722,9 +719,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 +858,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
 
@@ -2718,6 +2706,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 +2724,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>