c3167738abd5

A bunch of shit
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 20 Jan 2017 11:57:07 +0000
parents 68fb1509991b
children ab96bcc7a4c0
branches/tags (none)
files .hgsubstate addcss.js bin/sbcl-rlwrap fish/config.fish fish/functions/fzf-fish.fish hgrc lispwords roswell/lispindent.ros sbclrc vim/bundle/ooze/plugin/ooze.vim vim/custom-dictionary.utf-8.add vim/vimrc

Changes

--- a/.hgsubstate	Mon Jan 02 12:58:36 2017 +0000
+++ b/.hgsubstate	Fri Jan 20 11:57:07 2017 +0000
@@ -7,7 +7,7 @@
 a59cea9cae61654d7ba98ef100e3e8883c4b4022 vim/bundle/airline-themes
 6c4663589e73e21e77a9ea8403dcf2bf6cf9c11c vim/bundle/argumentative
 54deda1ad27d7def8fbfebc03ae583f4b0752dd9 vim/bundle/asmx86
-7d56e6fbb1b352c35baed5978a1a249875908dc9 vim/bundle/badwolf
+a6f651fa86068b8edb6799c9979a71e40caa3b42 vim/bundle/badwolf
 2975b6f50397cc4912f04e3986906eca8fa441e7 vim/bundle/bencode
 a4d79fc208764917cb58e2aed6fbaeb5e3356d33 vim/bundle/clam
 f1c53e290b16885c2eb3fc96e57d9984b627f735 vim/bundle/clojure-static
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/addcss.js	Fri Jan 20 11:57:07 2017 +0000
@@ -0,0 +1,1 @@
+javascript:(function(){sjlCss=document.createElement('link');sjlCss.type='text/css';sjlCss.rel='stylesheet';sjlCss.href='http://stevelosh.com/media/css/fixer.css';document.getElementsByTagName("head")[0].appendChild(sjlCss)}());
--- a/bin/sbcl-rlwrap	Mon Jan 02 12:58:36 2017 +0000
+++ b/bin/sbcl-rlwrap	Fri Jan 20 11:57:07 2017 +0000
@@ -1,4 +1,4 @@
 #!/usr/bin/env bash
 
 set -e
-rlwrap ros -L sbcl run -l ~/.sbclrc "$@"
+rlwrap --histsize 1000 --history-filename "$HOME/.rlwrap-lisp-history" -- ros -L sbcl run -l ~/.sbclrc "$@"
--- a/fish/config.fish	Mon Jan 02 12:58:36 2017 +0000
+++ b/fish/config.fish	Fri Jan 20 11:57:07 2017 +0000
@@ -43,6 +43,7 @@
 function jesus_fucking_christ_bind_the_fucking_keys_fish
     bind \cn accept-autosuggestion
     bind \cw backward-kill-word
+    bind \cf fzf-fish
 end
 function fish_user_keybindings
     jesus_fucking_christ_bind_the_fucking_keys_fish
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/functions/fzf-fish.fish	Fri Jan 20 11:57:07 2017 +0000
@@ -0,0 +1,9 @@
+function fzf-fish
+  set -q FZF_FIND_FILE_COMMAND
+  or set -l FZF_FIND_FILE_COMMAND "ffind --semi-restricted --depth=15 --follow"
+  fish -c "$FZF_FIND_FILE_COMMAND" | fzf -m --height 15 | read -l selects
+  and commandline -i "\"$selects\""
+  commandline -f repaint
+end
+
+# https://github.com/fisherman/fzf/blob/master/key_bindings.fish
--- a/hgrc	Mon Jan 02 12:58:36 2017 +0000
+++ b/hgrc	Fri Jan 20 11:57:07 2017 +0000
@@ -73,6 +73,17 @@
 kal.executable = /usr/local/bin/ksdiff
 kal.args = --merge --output $output --base $base -- $local $other
 
+unityyamlmerge.executable = /Applications/Unity/Unity.app/Contents/Tools/UnityYAMLMerge
+unityyamlmerge.args = merge -p --force $base $other $local $output
+unityyamlmerge.checkprompt = True
+unityyamlmerge.premerge = False
+unityyamlmerge.binary = False
+
+[merge-patterns]
+**.unity = unityyamlmerge
+**.prefab = unityyamlmerge
+
+
 [email]
 method = smtp
 from = Steve Losh <steve@stevelosh.com>
--- a/lispwords	Mon Jan 02 12:58:36 2017 +0000
+++ b/lispwords	Fri Jan 20 11:57:07 2017 +0000
@@ -14,6 +14,7 @@
 
 ; my own weird things
 (1 make-array)
+(1 return-from)
 (1 make-instance)
 (1 dis)
 (1 do-array)
@@ -71,12 +72,19 @@
 
 ; cl-losh
 (1 recursively)
-(2 when-found)
+(2 when-found if-found)
 (1 when-let*)
 (1 multiple-value-bind*)
 
 ; qtools
 (1 qtenumcase)
+(1 with-main-window)
 
 ; portaudio
 (1 with-default-audio-stream)
+
+; beast
+(1 create-entity)
+
+; temperance
+(1 push-logic-frame-with)
--- a/roswell/lispindent.ros	Mon Jan 02 12:58:36 2017 +0000
+++ b/roswell/lispindent.ros	Fri Jan 20 11:57:07 2017 +0000
@@ -171,7 +171,7 @@
          (left-indent
            (if (= j i) 1
              (let ((w (subseq s i j)))
-               (if (and (>= i 2) (member (char s (- i 2)) '(#\' #\`))) 1
+               (if (and (>= i 2) (member (char s (- i 2)) '(#\' #\`))) 2
                  (let ((nas (if (in-labels-p stack)
                               1
                               (lisp-indent-number w))))
@@ -266,4 +266,5 @@
 (defun main (&rest argv)
   (declare (ignore argv))
   (source-config-files)
-  (indent-lines))
+  (indent-lines)
+  t)
--- a/sbclrc	Mon Jan 02 12:58:36 2017 +0000
+++ b/sbclrc	Fri Jan 20 11:57:07 2017 +0000
@@ -24,5 +24,7 @@
 (setf sb-int:*repl-prompt-fun* #'package-prompt)
 (setf sb-debug:*debug-beginner-help-p* nil)
 
+(defun :fg ()
+  (sb-thread:release-foreground))
 
 ; '(ql:update-client)' --eval '(ql:update-all-dists)'
--- a/vim/bundle/ooze/plugin/ooze.vim	Mon Jan 02 12:58:36 2017 +0000
+++ b/vim/bundle/ooze/plugin/ooze.vim	Fri Jan 20 11:57:07 2017 +0000
@@ -26,11 +26,48 @@
 let g:ooze_scratch_buffer_name = '__OozeScratch__'
 let g:ooze_traceback_buffer_name = '__OozeTraceback__'
 
+function! s:OpenOrGotoBuffer(name) " {{{
+    let existing_buffer = bufnr(a:name)
+
+    if existing_buffer == -1
+        " The buffer doesn't exist at all.
+        " Split and edit.
+        wincmd s
+        execute "edit " . a:name
+    else
+        " The buffer exists, now we look for a window.
+        let existing_window = bufwinnr(existing_buffer)
+
+        if existing_window == -1
+            " The window doesn't exist.  Split and show the (existing) buffer.
+            execute "split +buffer" . existing_buffer
+        else
+            " The window exists.  Are we already in it?
+            let current_window = winnr()
+
+            if current_window != existing_window
+                " We're not in it.  Jump to it.
+                execute existing_window . "wincmd w"
+            else
+                " We're already where we need to be.  Noop.
+            endif
+        endif
+    endif
+endfunction " }}}
 function! s:OpenOozeScratch(contents) " {{{
     if bufname('%') != g:ooze_scratch_buffer_name
-        " TODO: go to the window if it's already showing...
-        wincmd s
-        execute "edit " . g:ooze_scratch_buffer_name
+        " Preserve the current window's package (lame hack)
+        if exists("b:ooze_buffer_package")
+            let package = b:ooze_buffer_package
+        else
+            let package = ""
+        endif
+
+        call s:OpenOrGotoBuffer(g:ooze_scratch_buffer_name)
+
+        if package != ""
+            let b:ooze_buffer_package = package
+        endif
     endif
 
     set filetype=lisp
@@ -40,10 +77,11 @@
     setlocal noswapfile
     setlocal buflisted
 
-    setlocal noreadonly
+    " setlocal noreadonly
     normal! gg"_dG
     call append(0, a:contents)
-    setlocal readonly
+    normal! gg=G
+    " setlocal readonly
 endfunction " }}}
 function! s:DumpTraceback(frames) " {{{
     let current = bufnr('%')
@@ -170,7 +208,7 @@
 
         let result = ""
         call cursor(1, 1)
-        if search('\v^\(in-package>\s*(\n\s*)?.', 'c', 40)
+        if search('\v^\(in-package>\s*(\n\s*)?\k', 'c', 40)
             normal! W
             execute "normal v\<plug>(sexp_inner_element)"
             let old_z = @z
--- a/vim/custom-dictionary.utf-8.add	Mon Jan 02 12:58:36 2017 +0000
+++ b/vim/custom-dictionary.utf-8.add	Fri Jan 20 11:57:07 2017 +0000
@@ -209,3 +209,7 @@
 roguelikelike
 unpausing
 unpause
+ROMs
+NREPL
+unpartnered
+bitrot
--- a/vim/vimrc	Mon Jan 02 12:58:36 2017 +0000
+++ b/vim/vimrc	Fri Jan 20 11:57:07 2017 +0000
@@ -361,8 +361,7 @@
 nnoremap <leader>ww mz:%s/\s\+$//<cr>:let @/=''<cr>`z
 
 " Send visual selection to paste.stevelosh.com
-" TODO: fix this
-vnoremap <c-p> :w !curl -sF 'sprunge=<-' 'http://paste.stevelosh.com' \| tr -d '\n ' \| pbcopy && open `pbpaste`<cr>
+vnoremap <leader>P :w !pb && open `pbpaste`<cr>
 
 " Select entire buffer
 nnoremap vaa ggvGg_
@@ -1062,6 +1061,7 @@
     au FileType lisp nnoremap <buffer> <silent> <localleader>oa :call OpenLispReplABCL()<cr>
     au FileType lisp nnoremap <buffer> <silent> <localleader>s :call SendToplevelLispForm()<cr>
     au FileType lisp nnoremap <buffer> <silent> <localleader>c :call NeoReplSendRaw("nil\n")<cr>:sleep 20m<cr>:call NeoReplSendRaw("")<cr>
+    au FileType lisp nnoremap <buffer> <silent> <localleader>Q :call NeoReplSendRaw("(load \"vendor/quickutils.lisp\")\n")<cr>
     au FileType lisp nnoremap <buffer> <silent> <localleader>0 :call NeoReplSendRaw("0\n")<cr>
     au FileType lisp nnoremap <buffer> <silent> <localleader>1 :call NeoReplSendRaw("1\n")<cr>
     au FileType lisp nnoremap <buffer> <silent> <localleader>2 :call NeoReplSendRaw("2\n")<cr>
@@ -1069,7 +1069,6 @@
     au FileType lisp nnoremap <buffer> gi :call IndentToplevelLispForm()<cr>
     au FileType lisp nnoremap <buffer> <silent> <localleader>d :call DisassembleLispSymbol()<cr>
     au FileType lisp nnoremap <buffer> <silent> <localleader>q :call QuickloadLispSystem()<cr>
-    au FileType lisp nnoremap <buffer> <silent> <localleader>Q :call QuickloadLispPrompt()<cr>
 
     " Navigate trees of sexps with arrows
     au FileType lisp call s:vim_sexp_mappings()
@@ -1405,6 +1404,9 @@
 
     au Filetype markdown nnoremap <buffer> <localleader>p VV:'<,'>!python -m json.tool<cr>
     au Filetype markdown vnoremap <buffer> <localleader>p :!python -m json.tool<cr>
+
+    au Filetype markdown nnoremap <localleader>w /\v<(many\|various\|very\|fairly\|several\|extremely\|exceedingly\|quite\|remarkably\|surprisingly\|mostly\|largely\|huge\|tiny\|((are\|is) a number)\|excellent\|interestingly\|significantly\|substantially\|clearly\|vast\|relatively\|completely)><cr>
+
 augroup END
 
 " }}}
@@ -1990,7 +1992,6 @@
 
 nmap <leader>c <Plug>CommentaryLine
 xmap <leader>c <Plug>Commentary
-nmap <leader>t OTODO: <esc><Plug>CommentaryLineA
 
 augroup plugin_commentary
     au!
@@ -2048,6 +2049,19 @@
 let g:deoplete#sources._ = []
 let g:deoplete#sources.lisp = ['buffer', 'tag']
 
+" Unfuck deoplete's autocomplete menu
+" I hate computers so much
+inoremap <silent> <CR> <C-r>=<SID>unfuck_deoplete_enter()<CR>
+" inoremap <silent> ) <C-r>=<SID>unfuck_deoplete_rparen()<CR>
+
+function! s:unfuck_deoplete_enter() abort
+    return deoplete#close_popup() . "\<CR>"
+endfunction
+
+function! s:unfuck_deoplete_rparen() abort
+    return deoplete#close_popup() . ")"
+endfunction
+
 " let g:deoplete#disable_auto_complete = 1
 
 " inoremap <silent><expr> <c-n>
@@ -2198,6 +2212,7 @@
                     \ 'xapian_index', '.*.pid', 'monitor.py', '.*-fixtures-.*.json',
                     \ '.*\.o$', 'db.db', 'tags.bak', '.*\.pdf$', '.*\.mid$',
                     \ '^tags$',
+                    \ '^.*\.meta$',
                     \ '.*\.bcf$', '.*\.blg$', '.*\.fdb_latexmk$', '.*\.bbl$', '.*\.aux$', '.*\.run.xml$', '.*\.fls$',
                     \ '.*\.midi$']
 
@@ -2213,8 +2228,10 @@
 let g:paredit_smartjump = 1
 let g:paredit_shortmaps = 0
 let g:paredit_electric_return = 1
+let g:paredit_matchlines = 200
+
 let g:paredit_disable_lisp = 1
-let g:paredit_matchlines = 200
+let g:paredit_disable_clojure = 1
 
 function! EnableParedit()
     call PareditInitBuffer()