80eba4a6004d
shavin'
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Fri, 14 Feb 2014 21:37:00 -0500 |
parents | 76ebf5e214a1 |
children | 7fe54290c135 |
branches/tags | (none) |
files | vim/vimrc |
Changes
--- 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 <buffer> <silent> <localleader>f :let lisp_tslime_view = winsaveview()<cr>vab"ry:call SendToTmuxStripped(@r)<cr>:call winrestview(lisp_tslime_view)<cr> + + " Send the current top-level form to the REPL + au FileType lisp nnoremap <buffer> <silent> <localleader>e :let lisp_tslime_view = winsaveview()<cr>l:call PareditFindDefunBck()<cr>vab"ry:call SendToTmuxStripped(@r)<cr>:call winrestview(lisp_tslime_view)<cr> + + " Send the entire buffer to the REPL + au FileType lisp nnoremap <buffer> <silent> <localleader>r :let lisp_tslime_view = winsaveview()<cr>ggVG"ry:call SendToTmuxStripped(@r)<cr>:call winrestview(lisp_tslime_view)<cr> + + " Clear the REPL + au FileType lisp nnoremap <buffer> <silent> <localleader>c :call SendToTmuxRaw("")<cr> + 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 = '<localleader>t' +let g:tslime_normal_mapping = '<localleader>T' let g:tslime_visual_mapping = '<localleader>t' -let g:tslime_vars_mapping = '<localleader>T' +let g:tslime_vars_mapping = '<localleader>t' " }}} " YankRing {{{