https://github.com/matt-dray/backtick
:back::heavy_check_mark: R package: insert backtick structures with an RStudio Addin
https://github.com/matt-dray/backtick
backticks r rstats rstats-package rstudio-addin
Last synced: 13 days ago
JSON representation
:back::heavy_check_mark: R package: insert backtick structures with an RStudio Addin
- Host: GitHub
- URL: https://github.com/matt-dray/backtick
- Owner: matt-dray
- License: other
- Created: 2022-02-19T14:19:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-22T21:19:59.000Z (about 3 years ago)
- Last Synced: 2025-03-27T04:38:16.845Z (19 days ago)
- Topics: backticks, r, rstats, rstats-package, rstudio-addin
- Language: R
- Homepage:
- Size: 574 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - matt-dray/backtick - :back::heavy_check_mark: R package: insert backtick structures with an RStudio Addin (R)
README
# {backtick}
[](https://www.repostatus.org/#concept)
[](https://github.com/matt-dray/backtick/actions)
[](https://www.rostrum.blog/2022/02/19/backtick/)Is the backtick key, `, [missing from your keyboard](https://commons.wikimedia.org/wiki/File:Italian_Keyboard_layout.svg)? Has it been [mapped for use by other software](https://twitter.com/ShinyBlackShoe/status/1494987656924737537?s=20&t=QlPfudvICLEaFcyTSoE9QQ)? Scratch your backtick itch with {backtick}.
{backtick} is a very tiny R package containing functions that insert backticks into R scripts and R Markdown documents. It's intended for use as an RStudio Addin.
Install with:
```r
install.packages("remotes") # if not yet installed
remotes::install_github("matt-dray/backtick")
```On restart, the functions will be available to you from the RStudio Addins menu. You could also set them to keyboard shortcuts.
With these functions you can:
* insert a single backtick (
`
)
* surround selected text with backticks (selection
becomes\`selection\`
)
* surround selected text with backticks for execution as inline R code in an R Markdown document (selection
becomes\`r selection\`
)
* surround selected text with backticks for execution as an R code chunk in an R Markdown document (selection
is surrounded by\`\`\`{r}
above and\`\`\`
below)This gif shows each one in action:
Leave an issue or provide a PR for suggestions or additions.