dotfiles

Author: Kyle Fuller <kyle@fuller.li> 2024-02-24 21:44:25 +0000 +0000
Committer: Kyle Fuller <kyle@fuller.li> 2024-02-24 21:44:25 +0000 +0000
Commit: 8391c4a7fddeb84ad18449a030843a5106bca667
Parent: f88bf1623dc4ddf5602af985008f33db179db69b


fix(vim): run vim-test over tmux when in tmux
diff --git a/.vim/vimrc b/.vim/vimrc
index 24720306769e15d6bc5bc6f487ce5c63ce6a4cf2..1fce51314ca5483d91a9a6c64d7adf515fe48ff6 100644
--- a/.vim/vimrc
+++ b/.vim/vimrc
@@ -3,6 +3,7 @@ filetype off
 
 call plug#begin('~/.vim/plugged')
 
+Plug 'benmills/vimux'
 Plug 'majutsushi/tagbar'
 Plug 'sjl/vitality.vim'
 Plug 'tpope/vim-sensible'
@@ -54,6 +55,7 @@ nnoremap <Leader>ag :Ag <cword><cr>
 nnoremap <Leader>b :Buffers<cr>
 
 " Testing
+nnoremap <Leader><CR> :TestNearest<cr>
 nnoremap <Leader>t :TestFile<cr>
 nnoremap <Leader>T :TestSuite<cr>
 
@@ -146,7 +148,12 @@ " Syntastic
 let g:syntastic_python_flake8_args="--max-complexity 10"
 
 " vim-test
-let test#strategy = "vimterminal"
+if &term =~ "^screen"
+  let test#strategy = "vimux"
+  map <Leader>q :call VimuxCloseRunner()<CR>
+else
+  let test#strategy = "neovim"
+endif
 
 if &shell =~# 'fish$'
   set shell=bash