Nvim-R 단축키
16 Sep 2018
|
Vim
Nvim-R
Nvim-R의 shortcut
- ubuntu bionic-beaver 18.04 기준
Nvim-R 설치 후 R 파일을 open 해보자.
R 파일에 간단한 내용을 작성해보자.
library(ggplot2)
head(cars)
ggplot(data = cars, aes(x = speed, y = dist)) + geom_line()
’\‘를 누른 상태에서 rf를 누르면 R 프롬프트 창이 켜진다.
그 상태에서 \pp를 누르면 파일이 실행된다.
Nvim-R 적용 화면
다음은 Nvim-R 문서에서 설명하는 단축키이다.
Start/Close
| Menu entry |
Default shortcut |
| . Start R (default) |
\rf |
| . Start R (custom) |
\rc |
| . Close R (no save) |
\rq |
| . Stop R |
:RStop |
Send
| Menu entry |
Default shortcut |
| . File |
\aa |
| . File (echo) |
\ae |
| . File (open .Rout) |
\ao |
| . Block (cur) |
\bb |
| . Block (cur, echo) |
\be |
| . Block (cur, down) |
\bd |
| . Block (cur, echo and down) |
\ba |
| . Chunk (cur) |
\cc |
| . Chunk (cur, echo) |
\ce |
| . Chunk (cur, down) |
\cd |
| . Chunk (cur, echo and down) |
\ca |
| . Chunk (from first to here) |
\ch |
| . Function (cur) |
\ff |
| . Function (cur, echo) |
\fe |
| . Function (cur and down) |
\fd |
| . Function (cur, echo and down) |
\fa |
| . Selection |
\ss |
| . Selection (echo) |
\se |
| . Selection (and down) |
\sd |
| . Selection (echo and down) |
\sa |
| . Selection (evaluate and insert output in new tab) |
\so |
| . Paragraph |
\pp |
| . Paragraph (echo) |
\pe |
| . Paragraph (and down) |
\pd |
| . Paragraph (echo and down) |
\pa |
| . Line |
\l |
| . Line (and down) |
\d |
| . Line (and new one) |
\q |
| . Left part of line (cur) |
\r |
| . Right part of line (cur) |
\r |
| . Line (evaluate and insert the output as comment) |
\o |
Command
| Menu entry |
Default shortcut |
| . List space |
\rl |
| . Clear console |
\rr |
| . Remove objects and clear console |
\rm |
| . Print (cur) |
\rp |
| . Names (cur) |
\rn |
| . Structure (cur) |
\rt |
| . View data.frame (cur) |
\rv |
| . Run dput(cur) and show output in new tab |
\td |
| . Run print(cur) and show output in new tab |
\tp |
| . Arguments (cur) |
\ra |
| . Example (cur) |
\re |
| . Help (cur) |
\rh |
| . Summary (cur) |
\rs |
| . Plot (cur) |
\rg |
| . Plot and summary (cur) |
\rb |
| . Set working directory (cur file path) |
\rd |
| . Sweave (cur file) |
\sw |
| . Sweave and PDF (cur file) |
\sp |
| . Sweave, BibTeX and PDF (cur file) (Linux/Unix) |
\sb |
| . Knit (cur file) |
\kn |
| . Knit, BibTeX and PDF (cur file) (Linux/Unix) |
\kb |
| . Knit and PDF (cur file) |
\kp |
| . Knit and Beamer PDF (cur file) |
\kl |
| . Knit and HTML (cur file, verbose) |
\kh |
| . Knit and ODT (cur file) |
\ko |
| . Knit and Word Document (cur file) |
\kw |
| . Markdown render (cur file) |
\kr |
| . Spin (cur file) (only .R) |
\ks |
| . Open attachment of reference (Rmd, Rnoweb) |
\oa |
| . Open PDF (cur file) |
\op |
| . Search forward (SyncTeX) |
\gp |
| . Go to LaTeX (SyncTeX) |
\gt |
| . Build tags file (cur dir) |
:RBuildTags |
Edit
| Menu entry |
Default shortcut |
| . Insert “<-“ |
_ |
| . Complete object name |
CTRL-X CTRL-O |
| . Indent (line) |
== |
| . Indent (selected lines) |
= |
| . Indent (whole buffer) |
gg=G |
| . Toggle comment (line, sel) |
\xx |
| . Comment (line, sel) |
\xc |
| . Uncomment (line, sel) |
\xu |
| . Add/Align right comment (line, sel) |
\; |
| . Go (next R chunk) |
\gn |
| . Go (previous R chunk) |
\gN |
Object Browser
| Menu entry |
Default shortcut |
| . Open/Close |
\ro |
| . Expand (all lists) |
\r= |
| . Collapse (all lists) |
\r- |
| . Toggle (cur) |
Enter |
Help (plugin)
| Menu entry |
Default shortcut |
| . Help (R) |
:Rhelp |
Comments