7fe54290c135

shit
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 15 Feb 2014 14:19:27 -0500
parents 80eba4a6004d
children 292a50987061
branches/tags (none)
files vim/vimrc

Changes

--- a/vim/vimrc	Fri Feb 14 21:37:00 2014 -0500
+++ b/vim/vimrc	Sat Feb 15 14:19:27 2014 -0500
@@ -766,10 +766,25 @@
 function! SendToTmuxStripped(text)
     call SendToTmux(substitute(a:text, '\v\n*$', '', ''))
 endfunction
+function! SetLispWords()
+    if exists("g:did_set_lisp_words")
+        return
+    endif
+
+    let g:did_set_lisp_words = 1
+
+    set lispwords+=switch
+    set lispwords+=cswitch
+    set lispwords+=eswitch
+endfunction
 
 augroup ft_commonlisp
     au!
 
+    au BufNewFile,BufRead *.asd setfiletype lisp
+
+    au FileType lisp call SetLispWords()
+
     " Set up some basic tslime mappings until I shave the fuckin
     " Fireplace/Common Lisp yak.
     "
@@ -784,7 +799,7 @@
     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>
+    au FileType lisp nnoremap <buffer> <silent> <localleader>e :let lisp_tslime_view = winsaveview()<cr>:silent! normal! l<cr>: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>