# HG changeset patch # User Steve Losh # Date 1441730360 0 # Node ID 54df794e9d59f0d23a4dcff396ce76be5b889e83 # Parent 54484a3a4dfd417d9412505666d7c5da80e7a76d More vimrc stuff diff -r 54484a3a4dfd -r 54df794e9d59 vim/vimrc --- a/vim/vimrc Mon Aug 31 13:19:45 2015 +0000 +++ b/vim/vimrc Tue Sep 08 16:39:20 2015 +0000 @@ -407,6 +407,9 @@ " The normal use of S is covered by cc, so don't worry about shadowing it. nnoremap S i^mwgk:silent! s/\v +$//:noh`w +" Substitute +nnoremap :%s/ + " HTML tag closing inoremap :call InsertCloseTag()a @@ -869,12 +872,7 @@ call winrestview(view) endfunction "}}} function! SendLispBuffer() "{{{ - let view = winsaveview() - - execute "normal! ggVG\" - call NeoReplSendSelection() - - call winrestview(view) + call NeoReplSendRaw('(load "'. expand("%:p") . '")' . "\n") endfunction "}}} function! DescribeLispSymbol() "{{{ let old_z = @z @@ -887,6 +885,19 @@ 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 "}}} augroup ft_commonlisp au! @@ -906,6 +917,8 @@ " \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() @@ -927,6 +940,12 @@ " 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