brew install neovim/neovim/neovim
ln -s $HOME/.vim $HOME/.config/nvim
ln -s $HOME/.vimrc $HOME/.config/nvim/init.vim
" vim-test maps
map <silent> <leader>t :TestNearest<CR>
map <silent> <leader>f :TestFile<CR>
map <silent> <leader>T :TestSuite<CR>
map <silent> <leader>r :TestLast<CR>
map <silent> <leader>g :TestVisit<CR>
" neovim config
if has("nvim")
" change cursor to bar in insert mode
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
" disable mouse support, what am I a vimposer?
set mouse-=a
" run tests with :T
let test#strategy = "neoterm"
" vertical split instead of the default horizontal
let g:neoterm_position = "vertical"
" pretty much essential: by default in terminal mode, you have to press ctrl-\-n to get into normal mode
" ain't nobody got time for that
tnoremap <Esc> <C-\><C-n>
" optional: make it easier to switch between terminal splits
" ctrl doesn't work for some reason so I use alt
" I think the terminal is capturing ctrl and not bubbling to vim or something
tnoremap <A-h> <C-\><C-n><C-w>h
tnoremap <A-j> <C-\><C-n><C-w>j
tnoremap <A-k> <C-\><C-n><C-w>k
tnoremap <A-l> <C-\><C-n><C-w>l
" totally optional: mirror the alt split switching in non-terminal splits
nnoremap <A-h> <C-w>h
nnoremap <A-j> <C-w>j
nnoremap <A-k> <C-w>k
nnoremap <A-l> <C-w>l
endif
💥 Done