Closed brucejuz closed 1 year ago
Hi @brucejuz
You can try the &ft
(filetype) variable, which reflects the type of file vim thinks you've got open.
Let me know how that goes 👍
I add these line to my vimrc
autocmd Filetype scheme let g:slime_vimterminal_cmd = "scheme"
autocmd Filetype python let g:slime_vimterminal_cmd = "**python3**"
Now, when I open .py, send a line, it will open python automatically; if I open .scm, send a line then it will open scheme. Nice:)
But in python, it must set cmd to "python3"; set cmd to "python" just does not work in vim-slime, even though in my terminal when I input "python", it can open python.
Thanks a lot!
I add these line to my vimrc
autocmd Filetype scheme let g:slime_vimterminal_cmd = "scheme"
autocmd Filetype python let g:slime_vimterminal_cmd = "**python3**"
Now, when I open .py, send a line, it will open python automatically; if I open .scm, send a line then it will open scheme. Nice:)
But in python, it must set cmd to "python3"; set cmd to "python" just does not work in vim-slime, even though in my terminal when I input "python", it can open python.
Thanks a lot!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have set the slime automatic start the interpreter as this
so each time I send a line, it will automatic open a window, run "scheme" and the line.
Is there a way, slime can know the language I use, so when I use "R", it will open "R", or when I use "Python", it will open "Python", or "C"... automatically.
Thanks a lot! By the way this plugin helps a lot!