RStdio 常用快捷键

Rstdio常用快捷键总结

       在R语言里面输入了一个不完整的指令以后 左下方的console pane一直有加号+,不管输入什么都是加号,只用推出重新打开Rstudio才行,后来google了下按左上角的Esc键也可以回到命令提示符状态,顺便总结下一些常用快捷键。


 1、在编辑窗口,光标选中要执行的语句,敲快捷键(ctrl+enter)或者鼠标点击run按钮,就是执行当前行。
      光标随着移动到下一行;在console窗口,会输出执行行的语句,哪怕是注释#;

 2、当你觉得console窗口显示的信息很多,是不是有一种清空的冲动呢?
       按ctrl + L:console干干净净,而且光标也在console控制台窗口;


3、在编辑窗口和console窗口间光标切换

     按ctrl+1:切换到console窗口 ; 按ctrl+2:切换到编辑窗口;


4、tab键

     在console窗口 ,按tab键可以代码提示;


搜索引用快捷键,完整版:

控制台

功能Windows & LinuxMac
移动鼠标到控制台 Ctrl+2 Ctrl+2
控制台清屏 Ctrl+L Command+L
移动鼠标至第一行 Home Command+Left
移动鼠标至最后一行 End Command+Right
历史记录翻滚 Up/Down Up/Down
弹出历史记录栏 Ctrl+Up Command+Up
终止目前命令 Esc Esc
改变工作路径 Ctrl+Shift+K Ctrl+Shift+K
 

代码区

功能Windows & LinuxMac
移动鼠标到文件搜索区 Ctrl+. Ctrl+.
移动鼠标至文件编辑区 Ctrl+1 Ctrl+1
新文档(chrome除外) Ctrl+Shift+N Command+Shift+N
打开文档 Ctrl+O Command+O
保存当前文档 Ctrl+S Command+S
关闭当前文档(chrome除外) Ctrl+W Command+W
关闭当前文档(chrome) Ctrl+Shift+Z Command+Shift+Z
关闭所有文档 Ctrl+Shift+W Command+Shift+W
预览HTML Ctrl+Shift+Y Command+Shift+Y
转换为HTML Ctrl+Shift+H Command+Shift+H
编译PDF (TeX and Sweave) Ctrl+Shift+I Command+Shift+I
插入块 Ctrl+Alt+I Command+Option+I
插入代码块 Ctrl+Shift+R Command+Shift+R
运行当前行 Ctrl+Enter Command+Enter
重新运行当前区 Ctrl+Shift+P Command+Shift+P
运行当前文档 Ctrl+Alt+R Command+Option+R
从开始运行至当前行 Ctrl+Alt+B Command+Option+B
从当前行运行至结尾 Ctrl+Alt+E Command+Option+E
运行当前函数定义 Ctrl+Alt+F Command+Option+F
运行当前块 Ctrl+Alt+C Command+Option+C
运行下一个块 Ctrl+Alt+N Command+Option+N
执行一个文件 Ctrl+Shift+O Command+Shift+O
执行当前文档 Ctrl+Shift+S Command+Shift+S
执行当前文档并且显示 Ctrl+Shift+Enter Command+Shift+Enter
折叠选项 Alt+L Command+Option+L
打开选项 Shift+Alt+L Command+Shift+Option+L
折叠所有 Alt+0 Command+Option+0
打开所有 Shift+Alt+0 Command+Shift+Option+0
前往行 Shift+Alt+G Command+Shift+Option+G
跳至 Shift+Alt+J Command+Shift+Option+J
换页 Ctrl+Alt+Down Ctrl+Option+Down
前一页 Win: Ctrl+Alt+Left, Linux: Ctrl+PageUp Ctrl+Option+Left
后一页 Win: Ctrl+Alt+Right, Linux: Ctrl+PageDown Ctrl+Option+Right
第一页 Ctrl+Shift+Alt+Left Ctrl+Shift+Option+Left
最后一页 Ctrl+Shift+Alt+Right Ctrl+Shift+Option+Right
往回导航 Ctrl+F9 Command+F9
向前导航 Ctrl+F10 Command+F10
行缩进 Ctrl+I Command+I
从选择中抽取函数 Ctrl+Shift+U Command+Shift+U
注释/取消注释当前行 Ctrl+Shift+C Command+Shift+C
重新注释 Ctrl+Shift+/ Command+Shift+/
Transpose Letters   Ctrl+T
Move Lines Up/Down Alt+Up/Down Option+Up/Down
Copy Lines Up/Down Ctrl+Alt+Up/Down Command+Option+Up/Down
Jump to Matching Brace/Paren Ctrl+P Ctrl+P
Find and Replace Ctrl+F Command+F
Find Next Win: F3, Linux: Ctrl+G Command+G
Find Previous Win: Shift+F3, Linux: Ctrl+Shift+G Command+Shift+G
Replace and Find Ctrl+= Command+=
Find in Files Ctrl+Shift+F Command+Shift+F
Check spelling F7 F7
 

Editing (Console and Source)

DescriptionWindows & LinuxMac
Undo Ctrl+Z Command+Z
Redo Ctrl+Shift+Z Command+Shift+Z
Cut Ctrl+X Command+X
Copy Ctrl+C Command+C
Paste Ctrl+V Command+V
Select All Ctrl+A Command+A
Jump to Word Ctrl+Left/Right Option+Left/Right
Jump to Start/End Ctrl+Home/End or Ctrl+Up/Down Command+Home/End or Command+Up/Down
Delete Line Ctrl+D Command+D
Select Shift+[Arrow] Shift+[Arrow]
Select Word Ctrl+Shift+Left/Right Option+Shift+Left/Right
Select to Line Start Shift+Home Command+Shift+Left or Shift+Home
Select to Line End Shift+End Command+Shift+Right or Shift+End
Select Page Up/Down Shift+PageUp/PageDown Shift+PageUp/Down
Select to Start/End Ctrl+Shift+Home/End or Shift+Alt+Up/Down Command+Shift+Up/Down
Delete Word Left Ctrl+Backspace Option+Backspace or Ctrl+Option+Backspace
Delete Word Right   Option+Delete
Delete to Line End   Ctrl+K
Delete to Line Start   Option+Backspace
Indent Tab (at beginning of line) Tab (at beginning of line)
Outdent Shift+Tab Shift+Tab
Yank line up to cursor Ctrl+U Ctrl+U
Yank line after cursor Ctrl+K Ctrl+K
Insert currently yanked text Ctrl+Y Ctrl+Y
Insert assignment operator Alt+- Option+-
Show help for function at cursor F1 F1
Show source code for function at cursor F2 F2
 

Completions (Console and Source)

DescriptionWindows & LinuxMac
Attempt completion Tab or Ctrl+Space Tab or Command+Space
Navigate candidates Up/Down Up/Down
Accept selected candidate Enter, Tab, or Right Enter, Tab, or Right
Dismiss completion popup Esc Esc
 

Views

DescriptionWindows & LinuxMac
Goto File/Function Ctrl+. Ctrl+.
Move cursor to Source Editor Ctrl+1 Ctrl+1
Move cursor to Console Ctrl+2 Ctrl+2
Move focus to Help Ctrl+3 Ctrl+3
Show History Ctrl+4 Ctrl+4
Show Files Ctrl+5 Ctrl+5
Show Plots Ctrl+6 Ctrl+6
Show Packages Ctrl+7 Ctrl+7
Show Workspace Ctrl+8 Ctrl+8
Show Git/SVN Ctrl+9 Ctrl+9
Show Build Ctrl+0 Ctrl+0
Sync Editor and PDF Preview Ctrl+F8 Command+F8
 

Build

DescriptionWindows & LinuxMac
Build and Reload Ctrl+Shift+B Command+Shift+B
Load All (devtools) Ctrl+Shift+L Command+Shift+L
Check Package Ctrl+Shift+E Command+Shift+E
 

Plots

DescriptionWindows & LinuxMac
Previous plot Ctrl+Shift+PageUp Command+Shift+PageUp
Next plot Ctrl+Shift+PageDown Command+Shift+PageDown
Show manipulator Ctrl+Shift+M Command+Shift+M
 

Git/SVN

DescriptionWindows & LinuxMac
Diff active source document Ctrl+Shift+D Command+Shift+D
Commit changes Ctrl+Shift+M Command+Shift+M
Scroll diff view Ctrl+Up/Down Ctrl+Up/Down
Stage/Unstage (Git) Spacebar Spacebar
Stage/Unstage and move next (Git) Enter Enter

  • 7
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值