Rstudio 管道运算符 (%>%) 快捷键 (Ctrl+Shift+M) 不起作用

Dyl*_*mes 9 keyboard-shortcuts r rstudio

最近,管道操作符的 RStudio 快捷方式%>%停止工作。这似乎是随机发生的,因为我没有更新任何内容。有谁知道发生了什么事以及我该如何解决这个问题?

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_1.0.7

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13  knitr_1.34       magrittr_2.0.1   tidyselect_1.1.1
 [5] R6_2.5.1         rlang_0.4.11     fastmap_1.1.0    fansi_0.5.0     
 [9] tools_4.1.0      xfun_0.25        utf8_1.2.2       cli_3.0.1       
[13] DBI_1.1.1        htmltools_0.5.2  ellipsis_0.3.2   yaml_2.2.1      
[17] digest_0.6.27    assertthat_0.2.1 tibble_3.1.3     lifecycle_1.0.0 
[21] crayon_1.4.1     purrr_0.3.4      vctrs_0.3.8      glue_1.4.2      
[25] evaluate_0.14    rmarkdown_2.10   compiler_4.1.0   pillar_1.6.2    
[29] generics_0.1.0   pkgconfig_2.0.3 
Run Code Online (Sandbox Code Playgroud)

Dyl*_*mes 11

似乎很多人在 R 和 RStudio 版本中都遇到了这个问题(https://community.rstudio.com/t/ctrl-shift-m-pipe-operator-shortcut-is-suddenly-stop-working-since-this -morning/118362),可能是由于与作为另一个进程的快捷方式的默认 Ctrl+Shift+M 发生冲突(对于许多人来说,在 WebEx 中似乎“静音”;请参阅下面的评论和其他答案)。

在 RStudio IDE 中,如果转到“工具”选项卡并选择“修改键盘快捷键...”,您可以看到快捷键列表。如果您在顶部的搜索栏中输入“pipe”,您将看到“插入管道运算符”仍然设置为 Ctrl+Shift+M,但它不起作用。

我选择的简单解决方案是单击此“Ctrl+Shift+M”,突出显示后,通过按您将用于该快捷方式的键来键入新的快捷方式(尽管可能有比更改快捷方式更优雅的解决方案)。

我选择了“Ctrl+Shift+”,因为我键盘上的逗号与 M 只隔了一个空格。

  • 以下是可能性列表:https://defkey.com/what-means/shift-command-m (3认同)
  • ^显然 WebEx 最近将 Ctrl+Shift+M 更新为“静音” (3认同)