774253fee5f6

Updates
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 30 Jun 2016 11:41:51 +0000
parents 1ff33bef5984
children aeab9d321fea
branches/tags (none)
files fish/config.fish hgrc lispwords vim/bundle/ooze/plugin/ooze.vim vim/custom-dictionary.utf-8.add vim/ftplugin/lisp/lispfolding.vim vim/vimrc

Changes

--- 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
--- 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
--- 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)
--- 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 <buffer> <localleader>C :call OozeConnect()<cr>
     nnoremap <buffer> <localleader>K :call OozeDisconnect()<cr>
 
-    nnoremap <buffer> <localleader>q :call OozeQuickloadCurrent()<cr>
-    nnoremap <buffer> <localleader>Q :call OozeQuickload(input("? "))<cr>
-
     nnoremap <buffer> <localleader>h :call OozeHyperspecForm()<cr>
     nnoremap <buffer> <localleader>H :call OozeHyperspec(input("? "))<cr>
 
--- 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
--- 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) =~ '^$'
--- 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 <leader>eh :vsplit ~/.hgrc<cr>
 nnoremap <leader>el :vsplit ~/.lispwords<cr>
 nnoremap <leader>em :vsplit ~/.mutt/muttrc<cr>
-nnoremap <leader>ep :vsplit ~/.pentadactylrc<cr>
+nnoremap <leader>ep :vsplit ~/.plan/README.markdown<cr>
+nnoremap <leader>ep :!vim ~/.plan/README.markdown && hg -R ~/.plan ci -m 'Update'<cr>
 nnoremap <leader>eq :vsplit ~/Dropbox/quotes.txt<cr>Gzz
 nnoremap <leader>et :vsplit ~/.tmux.conf<cr>
 nnoremap <leader>ev :vsplit $MYVIMRC<cr>
@@ -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\<Plug>(sexp_outer_list)\<esc>"
     execute "normal! a\<cr>\<esc>"
 
-    " 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 <buffer> <silent> <localleader>c :call NeoReplSendRaw("nil\n")<cr>:sleep 20m<cr>:call NeoReplSendRaw("")<cr>
     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()