Rstudio: R Markdown - Select text and convert to chunk with ctrl-alt-i

Created on 27 Aug 2019  路  3Comments  路  Source: rstudio/rstudio

After selecting some text, typing for example " or ( will surround the text accordingly.

The same behaviour with ctrl-alt-i would be efficient.

Current behaviour: ctrl-alt-i inserts an empty chunk below selected text.

Proposed behaviour: ctrl-alt-i creates a new chunk surrounding the selected text.

enhancement

All 3 comments

@Emmanuel-R8 Thank you for the interesting suggestion. We'll review it during our ongoing development of RStudio.

You can achieve this by using RStudio add-ins and assigning the desired keyboard shortcut :

1) package addins.rmd: https://gegznav.github.io/addins.rmd/#create-r-code-chunks
2) package remedy: https://github.com/ThinkR-open/remedy#chunk

Thanks. ThinkR/remedy with a few dedicated keyboard shortcuts is perfect.

Was this page helpful?
0 / 5 - 0 ratings