# HG changeset patch # User Steve Losh # Date 1392431820 18000 # Node ID 80eba4a6004da6dde77e79bc5b4b181c108c899d # Parent 76ebf5e214a143e5cf05046046fc80a974b30f78 shavin' diff -r 76ebf5e214a1 -r 80eba4a6004d vim/vimrc --- a/vim/vimrc Fri Feb 14 19:29:44 2014 -0500 +++ b/vim/vimrc Fri Feb 14 21:37:00 2014 -0500 @@ -763,9 +763,35 @@ " }}} " Common Lisp {{{ +function! SendToTmuxStripped(text) + call SendToTmux(substitute(a:text, '\v\n*$', '', '')) +endfunction + augroup ft_commonlisp au! + " Set up some basic tslime mappings until I shave the fuckin + " Fireplace/Common Lisp yak. + " + " key desc mnemonic + " \t - connect tslime [t]slime + " \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 + + " Send the current form to the REPL + au FileType lisp nnoremap f :let lisp_tslime_view = winsaveview()vab"ry:call SendToTmuxStripped(@r):call winrestview(lisp_tslime_view) + + " Send the current top-level form to the REPL + au FileType lisp nnoremap e :let lisp_tslime_view = winsaveview()l:call PareditFindDefunBck()vab"ry:call SendToTmuxStripped(@r):call winrestview(lisp_tslime_view) + + " Send the entire buffer to the REPL + au FileType lisp nnoremap r :let lisp_tslime_view = winsaveview()ggVG"ry:call SendToTmuxStripped(@r):call winrestview(lisp_tslime_view) + + " Clear the REPL + au FileType lisp nnoremap c :call SendToTmuxRaw(" ") + au FileType lisp RainbowParenthesesActivate au syntax lisp RainbowParenthesesLoadRound au syntax lisp RainbowParenthesesLoadSquare @@ -1552,9 +1578,9 @@ " tslime {{{ let g:tslime_ensure_trailing_newlines = 1 -let g:tslime_normal_mapping = 't' +let g:tslime_normal_mapping = 'T' let g:tslime_visual_mapping = 't' -let g:tslime_vars_mapping = 'T' +let g:tslime_vars_mapping = 't' " }}} " YankRing {{{