GithubHelp home page GithubHelp logo

r-kenk / remedy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thinkr-open/remedy

0.0 1.0 0.0 76.62 MB

RStudio Addins to Simplify Markdown Writing

Home Page: https://thinkr-open.github.io/remedy/

License: Other

R 100.00%

remedy's Introduction

CRAN_Status_Badge Travis-CI Build StatusCoverage statusCovrpage Summary

remedy

{remedy} provides addins to facilitate writing in markdown with RStudio.

All the functions are meant to be mapped to keyboard shortcuts. A list of suggested shortcuts is provided towards the end of this README.

Note that most of the addins/shortcuts below will also work without selecting any text.

Install

remotes::install_github("ThinkR-open/remedy")

Once you’ve installed the package, you don’t need to load it with library(), the addins are installed on your machine as part of the package install process.

Using {remedy}

Write quicker in markdown with {remedy}!
Read the full manual in the associated {pkgdown} website: https://thinkr-open.github.io/remedy/

Here’s a list of all available helpers:

You can also have an overview of how the functions behave with the remedy_example() function:

library(remedy)
remedy_example( c("Never gonna", "give you up", "let you down"), listr )

Align

Align selected blocks to their assignment operator, either <-

or =

Backtick

Enclose the selected word(s) in backticks.

Blockquote

Turn selected line(s) to blockquote.

Chunk

Turn the selected text into a chunk.

Note that every chunk is given a name.

chunksplit split the chunk at a given spot.

Cross references

ID, table and figure cross-reference

Emphasize

Embolden, italicize or strikethrough the selected text.

Footnotes

Turn the given text into a footnote.

Headers

Turn the selected text into a header.

HTML Comment

Turn the text into an html comment

Image

Turn the selected path into an image.

This element is context aware: if you select a text and a link, it turns the text into title between ![], and puts the link between ().

If the last element of the selection is not a link, you get an error message straight into you markdown document.

LaTeX

LaTeX syntax :

List

Turn the selected text into an unordered list.

Moving

On the right

Copy the selected text or the current line to the right.

Table

Insert a table inside your doc.

There are basically two way to do that with remedy :

Ttable

Parse your data

Turn your dataframe into a markdown table :

URL

Turn the selected text into a link.

This element is context aware: if you select a text and a link, it turns the text into title between [], and puts the link between ().

If the last element of the selection is not a link, you get an error message straight into you markdown document.

Youtube

Turn an url into a youtube embed:

xaringan

Insert a xaringan pull-left and pull-right template.

Recommended shortcuts (macOS)

Here’s a list of recommended shortcuts:

remedy::remedy_opts$get('hotkeys')
#>           backtick               bold              chunk         chunksplit 
#>       "Ctrl+Cmd+`"       "Ctrl+Cmd+B"   "Ctrl+Alt+Cmd+C" "Ctrl+Shift+Alt+C" 
#>          chunkname           footnote                 h1                 h2 
#> "Ctrl+Shift+Alt+N" "Ctrl+Cmd+Shift+6"       "Ctrl+Cmd+1"       "Ctrl+Cmd+2" 
#>                 h3                 h4                 h5                 h6 
#>       "Ctrl+Cmd+3"       "Ctrl+Cmd+4"       "Ctrl+Cmd+5"       "Ctrl+Cmd+6" 
#>        htmlcomment              image            italics              latex 
#>       "Ctrl+Alt+C"       "Ctrl+Cmd+P"       "Ctrl+Cmd+I"       "Ctrl+Cmd+L" 
#>               list              right             strike              table 
#> "Ctrl+Shift+Cmd+="    "Alt+Cmd+Right"       "Ctrl+Cmd+S"       "Ctrl+Cmd+T" 
#>                url           xaringan            youtube 
#>       "Ctrl+Cmd+U"       "Ctrl+Cmd+X"       "Ctrl+Cmd+Y"

Managing Shortcuts

Use the {rsam} package to set and manage for you the hotkey settings of {remedy}.

If you want to edit the default settings you can view the defaults remedy_opts$get('hotkeys') and change them through remedy_opts$set(hotkeys=<NEW_SETTINGS>).

hotkeys <- remedy::remedy_opts$get("hotkeys")
rsam::set_shortcut(sprintf('remedy::%sr',names(hotkeys)), hotkeys)

Feedback and enhancement

You’ve found a bug, or have an enhancement idea? Feel free to open an issue : https://github.com/ThinkR-open/remedy/issues.

Code of conduct

Please note that the ‘remedy’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

remedy's People

Contributors

colinfay avatar yonicd avatar dpprdan avatar aoles avatar statnmap avatar jonmcalder avatar jonocarroll avatar r-kenk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.