# HG changeset patch # User Steve Losh # Date 1458994456 0 # Node ID 8ce6e1e14b220fcc3dcb48592af9f01ee7bc2426 # Parent af9026179cd34bbae76a82dc0274f21906a58695 Fix a few lisp things diff -r af9026179cd3 -r 8ce6e1e14b22 bin/nrepl --- a/bin/nrepl Fri Mar 25 21:41:27 2016 +0000 +++ b/bin/nrepl Sat Mar 26 12:14:16 2016 +0000 @@ -2,4 +2,4 @@ set -e -lisp --eval "(ql:quickload 'nrepl)" --eval "(nrepl:start-server)" "$@" +rlwrap sbcl --eval "(ql:quickload 'nrepl)" --eval "(nrepl:start-server)" "$@" diff -r af9026179cd3 -r 8ce6e1e14b22 vim/vimrc --- a/vim/vimrc Fri Mar 25 21:41:27 2016 +0000 +++ b/vim/vimrc Sat Mar 26 12:14:16 2016 +0000 @@ -890,6 +890,7 @@ " }}} " Common Lisp {{{ +" (Neo)REPL Functions {{{ function! HighlightLispRepl() "{{{ " set syntax=lisp syn match replPrompt /\v^[-._a-zA-Z]+\>/ @@ -983,6 +984,7 @@ function! MacroexpandLispPrompt() "{{{ call NeoReplSendRaw("(macroexpand-1 '" . input("? ") . ")\n") endfunction "}}} +" }}} augroup ft_commonlisp au! @@ -991,56 +993,12 @@ au FileType lisp call SetLispWords() - " Set up some basic neorepl mappings until I shave the fuckin - " swank/neovim yak. - " - " key desc mnemonic - " \o - connect neorepl [o]pen lisp - " \f - send current form [f]orm - " \e - send top-level form [e]val - " \r - send entire file [r]eload file - " \c - send ctrl-l [c]lear - " \d - describe symbol [d]escribe - " \D - describe prompt [d]escribe - " \m - macroexpand form [m]acroexpand - " \M - macroexpand prompt [m]acroexpand - - " au FileType lisp nnoremap o :call OpenLispRepl() - - " " Send the current form to the REPL - " au FileType lisp nnoremap f :call SendLispForm() - - " " Send the current top-level form to the REPL - " au FileType lisp nnoremap e :call SendToplevelLispForm() - - " " Send the entire buffer to the REPL ([r]eload) - " au FileType lisp nnoremap r :call SendLispBuffer() - - " " Clear the REPL - " au FileType lisp nnoremap c :call NeoReplSendRaw(" ") - - " " Describe symbol under the cursor - " au FileType lisp nnoremap d :call DescribeLispSymbol() - - " " Describe the last thing we typed - " au FileType lisp inoremap mzb:call DescribeLispSymbol()`za - - " " Describe prompt - " au FileType lisp nnoremap D :call DescribeLispPrompt() - - " " Macroexpand form - " au FileType lisp nnoremap m :call MacroexpandLispForm() - - " " Macroexpand prompt - " au FileType lisp nnoremap M :call MacroexpandLispPrompt() - au FileType lisp RainbowParenthesesActivate au syntax lisp RainbowParenthesesLoadRound - au syntax lisp RainbowParenthesesLoadSquare - au syntax lisp RainbowParenthesesLoadBraces au FileType lisp silent! call TurnOnLispFolding() + " Paredit mappings au FileType lisp noremap () :call PareditWrap("(", ")") au FileType lisp noremap )( :call PareditSplice() au FileType lisp noremap (( :call PareditMoveLeft() @@ -1054,24 +1012,29 @@ " )) " Indent top-level form. - " au FileType lisp nmap = mz:silent normal99[(v%='z au FileType lisp nmap gi mz:silent normal99[(v%='z " ]) au FileType lisp setlocal equalprg=lispindentclean " s/it/happening/ + " + " Map the Ooze keys, then add a few extra on top to work with the REPL. + " + " [o]pen repl + " [s]end to repl + " [c]lear repl au FileType lisp silent! call OozeMapKeys() au FileType lisp nnoremap o :call OpenLispRepl() - au FileType lisp nnoremap p :call SendToplevelLispForm() - au FileType lisp nnoremap c :call NeoReplSendRaw("nil\n ") + au FileType lisp nnoremap s :call SendToplevelLispForm() + au FileType lisp nnoremap c :call NeoReplSendRaw("nil\n"):sleep 20m:call NeoReplSendRaw(" ") " Navigate trees of sexps with arrows au FileType lisp call s:vim_sexp_mappings() - au FileType lisp noremap :call SexpBack() + au FileType lisp noremap :call SexpBack() au FileType lisp noremap :call SexpForward() - au FileType lisp noremap :call SexpUp() - au FileType lisp noremap :call SexpDown() + au FileType lisp noremap :call SexpUp() + au FileType lisp noremap :call SexpDown() augroup END " }}}