-
Notifications
You must be signed in to change notification settings - Fork 0
Quit R automatically
Jakson Alves de Aquino edited this page Sep 23, 2025
·
2 revisions
If you are running R in an external terminal emulator and want to quit it
automatically when quitting Vim, put in your vimrc (replace "nosave" with
"save" if you want to save R's workspace):
autocmd VimLeave * if exists("g:SendCmdToR") && string(g:SendCmdToR) != "function('SendCmdToR_fake')" | call RQuit("nosave") | endifIf R is running in the built-in terminal, sending the command
quit(save = "no") while leaving the editor will be meaningless because
R will be killed by Vim before having time to quit gracefully.