Commits

Steve Losh committed 7fe5429

shit

Comments (0)

Files changed (1)

 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.
     "
     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>