aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-03 19:17:05 +0800
committerGuangxiong Lin <[email protected]>2022-04-03 19:19:12 +0800
commit2b4aff213c914c02f89a26bbbdd6d0bd8c63b027 (patch)
treeff7719ffe58b2f5d670177b0c808d9650d56ee31
parentd9dcd9e1fcf86716fc3a06d0e41d2df2dba695cb (diff)
downloaddotfiles-2b4aff213c914c02f89a26bbbdd6d0bd8c63b027.tar.gz
dotfiles-2b4aff213c914c02f89a26bbbdd6d0bd8c63b027.tar.bz2
dotfiles-2b4aff213c914c02f89a26bbbdd6d0bd8c63b027.zip
Add vim-slime
-rw-r--r--.vim/after/plugin/minpac.vim1
-rw-r--r--.vim/after/plugin/slime.vim12
2 files changed, 13 insertions, 0 deletions
diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim
index 4cf5921..3435629 100644
--- a/.vim/after/plugin/minpac.vim
+++ b/.vim/after/plugin/minpac.vim
@@ -50,6 +50,7 @@ function! InitMinpac() abort
call minpac#add('https://github.com/tpope/vim-fugitive.git')
call minpac#add('https://github.com/rbong/vim-flog.git')
call minpac#add('https://github.com/iberianpig/tig-explorer.vim')
+ call minpac#add('https://github.com/jpalardy/vim-slime', {'type': 'opt'})
" appearance
call minpac#add('https://github.com/joshdick/onedark.vim.git', {'type': 'opt'})
diff --git a/.vim/after/plugin/slime.vim b/.vim/after/plugin/slime.vim
new file mode 100644
index 0000000..3a48656
--- /dev/null
+++ b/.vim/after/plugin/slime.vim
@@ -0,0 +1,12 @@
+let g:slime_no_mappings = 1
+
+xmap <leader>gz <Plug>SlimeRegionSend
+nmap <leader>gz <Plug>SlimeLineSend
+
+let g:slime_target = 'vimterminal'
+let g:slime_vimterminal_config =
+ \{'term_finish': 'close'}
+
+autocmd FileType python let g:slime_vimterminal_cmd = 'python3'
+
+packadd vim-slime