jpalardy / vim-slime

A vim plugin to give you some slime. (Emacs)
http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/
MIT License
1.83k stars 223 forks source link

Unexpected behavior when open multi slime session in different filetype. #363

Closed hungpham3112 closed 1 year ago

hungpham3112 commented 1 year ago

I have 3 file in 3 different filetype: julia, python, r. SlimeConfig is used to select new instance of slime each file type. But it seems slime don't allow that.

https://user-images.githubusercontent.com/75968004/219615565-4e695163-da1f-4f89-b2d2-cdd9357a5aee.mp4

I think that I miss something in here.

Slime settings:

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                             Plugin: Vim-slime                              "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
vim9script
g:slime_target = "vimterminal"
g:slime_vimterminal_config = {"vertical": 55, "term_finish": "close"}
autocmd FileType javascript g:slime_vimterminal_cmd = "node"
autocmd FileType julia g:slime_vimterminal_cmd = "julia"
autocmd FileType python g:slime_vimterminal_cmd = "python"
autocmd FileType r g:slime_vimterminal_cmd = "r"
jpalardy commented 1 year ago

Hi @hungpham3112

There's a lot going on in that video and I'm not sure I understand where it's going.

I'll say that using g: (global) variables would override each other as you open another buffer. Can you try this with b: (buffer) variables and see if that improves things?

If not, we can iterate and try other things.

Thanks

hungpham3112 commented 1 year ago

It worked. Now I can run multiple session without conflict. Thanks for your suggestion.