最近,在试用 VSCode 的过程中,发现一个问题(可能是问题,也可能是我比较菜,不知道怎么配置),预览博文的时候,想从预览里复制文本/代码到源码窗口里,却发现无法复制,很奇怪。
VSCode 预览窗口显示的文本无法复制
- 已编辑
经查 https://github.com/REditorSupport/vscode-R/issues/204
可以从 R 帮助文档里复制文本,但是不能在 blogdown 网站的预览里复制文本,尽管都是某种形式的网页。现象很奇怪,不知道 @yihui 有没有什么想法?
补充运行环境信息
> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.8.2 ps_1.6.0 later_1.3.0
[4] R6_2.5.1 jsonlite_1.8.0 magrittr_2.0.2
[7] blogdown_1.8 rlang_1.0.2 cli_3.2.0
[10] rstudioapi_0.13 promises_1.2.0.1 tools_4.1.1
[13] servr_0.24 httpuv_1.6.5 xfun_0.30
[16] yaml_2.3.5 compiler_4.1.1 processx_3.5.2
[19] knitr_1.37
我在 VS Code 用 blogdown 已经几个月了,之前可以在预览界面右键弹出菜单来复制。刚刚试了下,右击弹不出菜单了,但是按 Ctrl + C
快捷键可以复制。要是你实在复制不了,可以用浏览器打开预览画面,在浏览器复制。
这是我的运行环境信息:
+> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux
Matrix products: default
BLAS: /usr/lib/libblas.so.3.10.0
LAPACK: /usr/lib/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.3 magrittr_2.0.1 R6_2.5.1 bookdown_0.24
[5] promises_1.2.0.1 later_1.3.0 tools_4.1.3 rstudioapi_0.13
[9] yaml_2.2.1 Rcpp_1.0.7 blogdown_1.6 knitr_1.36
[13] xfun_0.28 jsonlite_1.7.2 httpuv_1.6.3 rlang_0.4.12
[17] servr_0.24
Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T15:36:26.048Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.16.15-zen1-1-zen
12 天 后
Cloud2016 已经反馈给 VSCode-R 团队,先链接在此,等后续进展 https://github.com/REditorSupport/vscode-R/issues/1062