# HG changeset patch # User Steve Losh # Date 1467286911 0 # Node ID 774253fee5f6df9bb1b3c514624283f6661d284b # Parent 1ff33bef59847fa2fcec2e172e16c010080923dd Updates diff -r 1ff33bef5984 -r 774253fee5f6 fish/config.fish --- a/fish/config.fish Sun May 29 10:19:33 2016 +0000 +++ b/fish/config.fish Thu Jun 30 11:41:51 2016 +0000 @@ -9,7 +9,6 @@ function ei; vim ~/Dropbox/inventory.markdown; end function ek; vim ~/lib/dotfiles/keymando/keymandorc.rb; end function em; vim ~/.mutt/muttrc; end -function ep; vim ~/.pentadactylrc; end function es; vim ~/.slate; end function et; vim ~/.tmux.conf; end function ev; vim ~/.vimrc; end diff -r 1ff33bef5984 -r 774253fee5f6 hgrc --- a/hgrc Sun May 29 10:19:33 2016 +0000 +++ b/hgrc Thu Jun 30 11:41:51 2016 +0000 @@ -119,7 +119,7 @@ qfdiff = qdiff -U 10000000000000 # Push to the git mirror at the same time. -pg = !"$HG" push && "$HG" push git +pg = !"$HG" push; "$HG" push git # Push the qparent revision (mnemonic: q push parent). qpp = push -r qparent diff -r 1ff33bef5984 -r 774253fee5f6 lispwords --- a/lispwords Sun May 29 10:19:33 2016 +0000 +++ b/lispwords Thu Jun 30 11:41:51 2016 +0000 @@ -7,6 +7,7 @@ (1 :shadowing-import-from :import-from) (1 symbol-macrolet) (1 print-unreadable-object) +(1 pprint-logical-block) ; my own weird things (1 make-array) diff -r 1ff33bef5984 -r 774253fee5f6 vim/bundle/ooze/plugin/ooze.vim --- a/vim/bundle/ooze/plugin/ooze.vim Sun May 29 10:19:33 2016 +0000 +++ b/vim/bundle/ooze/plugin/ooze.vim Thu Jun 30 11:41:51 2016 +0000 @@ -127,25 +127,6 @@ let @z = z endfunction " }}} -function! OozeQuickload(system) " {{{ - let msg = {"op": "eval", "code": "(ql:quickload :" . a:system . ")"} - call OozeSendMessage(msg) -endfunction " }}} -function! OozeQuickloadCurrent() " {{{ - let systems = split(system('ls -1 *.asd | grep -v test')) - if len(systems) == 0 - echom "Could not find any .asd files..." - return - elseif len(systems) > 1 - echom "Found too many any .asd files..." - return - endif - - let system = split(systems[0], '[.]')[0] - - call OozeQuickload(system) -endfunction " }}} - function! OozeDocument(symbol) " {{{ let msg = {"op": "documentation", "symbol": a:symbol} call OozeSendMessage(msg) @@ -232,9 +213,6 @@ nnoremap C :call OozeConnect() nnoremap K :call OozeDisconnect() - nnoremap q :call OozeQuickloadCurrent() - nnoremap Q :call OozeQuickload(input("? ")) - nnoremap h :call OozeHyperspecForm() nnoremap H :call OozeHyperspec(input("? ")) diff -r 1ff33bef5984 -r 774253fee5f6 vim/custom-dictionary.utf-8.add --- a/vim/custom-dictionary.utf-8.add Sun May 29 10:19:33 2016 +0000 +++ b/vim/custom-dictionary.utf-8.add Thu Jun 30 11:41:51 2016 +0000 @@ -178,3 +178,6 @@ greyscale heightmap pathfinding +Prolog +REPL +handwaved diff -r 1ff33bef5984 -r 774253fee5f6 vim/ftplugin/lisp/lispfolding.vim --- a/vim/ftplugin/lisp/lispfolding.vim Sun May 29 10:19:33 2016 +0000 +++ b/vim/ftplugin/lisp/lispfolding.vim Thu Jun 30 11:41:51 2016 +0000 @@ -151,7 +151,7 @@ elseif getline(a:lnum) =~ '^(declaim\( \|$\)' " fold top level declaims return ">1" - elseif getline(a:lnum) =~ '^(def\S\+ ' + elseif getline(a:lnum) =~ '^(def' " fuck it just fold everything that looks kinda deffy return ">1" elseif getline(a:lnum) =~ '^$' && getline(a:lnum - 1) =~ '^$' diff -r 1ff33bef5984 -r 774253fee5f6 vim/vimrc --- a/vim/vimrc Sun May 29 10:19:33 2016 +0000 +++ b/vim/vimrc Thu Jun 30 11:41:51 2016 +0000 @@ -538,7 +538,8 @@ nnoremap eh :vsplit ~/.hgrc nnoremap el :vsplit ~/.lispwords nnoremap em :vsplit ~/.mutt/muttrc -nnoremap ep :vsplit ~/.pentadactylrc +nnoremap ep :vsplit ~/.plan/README.markdown +nnoremap ep :!vim ~/.plan/README.markdown && hg -R ~/.plan ci -m 'Update' nnoremap eq :vsplit ~/Dropbox/quotes.txtGzz nnoremap et :vsplit ~/.tmux.conf nnoremap ev :vsplit $MYVIMRC @@ -914,6 +915,7 @@ hi def link replResult Debug hi def link replComment Comment endfunction "}}} + function! OpenLispReplSBCL() "{{{ NeoRepl sbcl-nrepl call HighlightLispRepl() @@ -922,6 +924,7 @@ NeoRepl ccl-nrepl call HighlightLispRepl() endfunction "}}} + function! SetLispWords() "{{{ setlocal isk+=. @@ -958,6 +961,7 @@ " alexandria setlocal lispwords+=define-constant endfunction "}}} + function! SendLispForm() "{{{ let view = winsaveview() @@ -985,31 +989,7 @@ call winrestview(view) endfunction "}}} -function! SendLispBuffer() "{{{ - call NeoReplSendRaw('(load "'. expand("%:p") . '")' . "\n") -endfunction "}}} -function! DescribeLispSymbol() "{{{ - let old_z = @z - - normal! "zyiw - call NeoReplSendRaw("(describe '" . @z . ")\n") -endfunction "}}} -function! DescribeLispPrompt() "{{{ - call NeoReplSendRaw("(describe '" . input("? ") . ")\n") -endfunction "}}} -function! MacroexpandLispForm() "{{{ - let view = winsaveview() - let old_z = @z - - normal! "zyab - call NeoReplSendRaw("(macroexpand-1 '" . @z . ")\n") - - let @z = old_z - call winrestview(view) -endfunction "}}} -function! MacroexpandLispPrompt() "{{{ - call NeoReplSendRaw("(macroexpand-1 '" . input("? ") . ")\n") -endfunction "}}} + function! DisassembleLispSymbol() "{{{ let old_z = @z @@ -1018,6 +998,7 @@ let @z = old_z endfunction "}}} + function! DuplicateLispForm() " {{{ let old_z = @z @@ -1029,18 +1010,39 @@ normal! "zy normal! "zP - " move right and insert the line break + " select the thing we just pasted, move to the right of it and insert the + " line break + execute "normal v\(sexp_outer_list)\" execute "normal! a\\" - " jump back to our previous position and indent + " fix indentation + call IndentToplevelLispForm() + + " jump back to our previous position and move to the next form, + " to get to the correct final place normal! `z - call IndentToplevelLispForm() - - " move down so we're on the duplicate line, but in the right place - normal! j + call SexpForward() let @z = old_z endfunction " }}} + +function! QuickloadLispSystem() " {{{ + let systems = split(system('ls -1 *.asd | grep -v test')) + if len(systems) == 0 + echom "Could not find any .asd files..." + return + elseif len(systems) > 1 + echom "Found too many any .asd files..." + return + endif + + let system = split(systems[0], '[.]')[0] + + call NeoReplSendRaw("(ql:quickload :" . system . ")\n") +endfunction " }}} +function! QuickloadLispPrompt() " {{{ + call NeoReplSendRaw("(ql:quickload :" . input("? ") . ")\n") +endfunction " }}} " }}} augroup ft_commonlisp @@ -1089,6 +1091,8 @@ au FileType lisp nnoremap c :call NeoReplSendRaw("nil\n"):sleep 20m:call NeoReplSendRaw(" ") au FileType lisp nnoremap gi :call IndentToplevelLispForm() au FileType lisp nnoremap d :call DisassembleLispSymbol() + au FileType lisp nnoremap q :call QuickloadLispSystem() + au FileType lisp nnoremap Q :call QuickloadLispPrompt() " Navigate trees of sexps with arrows au FileType lisp call s:vim_sexp_mappings()