Skip to content

Instantly share code, notes, and snippets.

@MilesMcBain
Last active August 9, 2020 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MilesMcBain/139134e65bc817cff7d5ad469498540f to your computer and use it in GitHub Desktop.
Save MilesMcBain/139134e65bc817cff7d5ad469498540f to your computer and use it in GitHub Desktop.
shrtcts.yaml
{
"fnmate::rs_fnmate": "Ctrl+Shift+F",
"drake::rs_addin_r_make": "Ctrl+M",
"drake::rs_addin_loadd": "Ctrl+L",
"shrtcts::shortcut_01": "Ctrl+P",
"shrtcts::shortcut_02": "Ctrl+O",
"shrtcts::shortcut_03": "Ctrl+T"
}
{
"activateTerminal": "Ctrl+3",
"insertAssignmentOperator": "Ctrl+'",
"insertPipeOperator": "Ctrl+Shift+'",
"jumpTo": "Ctrl+J",
"goToDefinition": "Ctrl+Shift+J"
}
- Name: Source ./packages.R
Binding: |
cat(glue::glue('> source(\"./packages.R\")\n\n'))
source("./packages.R")
Interactive: true
- Name: Output symbol at cursor
Binding: |
target <- mmmisc::rs_get_symbol_at_cursor(rstudioapi::getActiveDocumentContext())
cat(glue::glue("> {target}\n\n"))
eval(as.symbol(target))
Interactive: true
- Name: Thead at symbol at cursor
Binding: |
target <- mmmisc::rs_get_symbol_at_cursor(rstudioapi::getActiveDocumentContext())
eval(parse(text = glue::glue("t(head({target}))")))
Interactive: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment