最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

visual studio code - Save R terminal history from within VSCode - Stack Overflow

programmeradmin5浏览0评论

When using an R terminal from within vscode, I need to type savehistory() at the end of my session, before exitting vscode, otherwise my history is lost next time I open the project. I’d like it to be saved automatically when exitting. One possibility would be to automatically run some code when exitting, but I cannot find such configuration option. Actually, I am dubious that this option does not already exit, considering that (I guess) most developers want this. But I cannot find it!

Note that, inspired by this post (or similar ones on the internet), I have tried running the following code in my R terminal under VSCode:

.Last <- function() try(savehistory())

but this does not seem to be ever executed when I quit VSCode. I guess VSCode ends the terminal “too brutally”. (I also tried this variant, to no avail.)

Any help or pointer appreciated.

发布评论

评论列表(0)

  1. 暂无评论