Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'other' magrittr pipe operators #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Imports:
formatR
License: MIT + file LICENSE
LazyData: true
RoxygenNote: 6.0.1
RoxygenNote: 7.2.3
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export(insertBizzaroPipeAddin)
export(insertColonEqual)
export(insertDotArrowPipeAddin)
export(insertMagrittrCompoundPipeAddin)
export(insertMagrittrExpositionPipeAddin)
export(insertMagrittrPipeAddin)
export(insertMagrittrTeePipeAddin)
export(insertToDotPipeAddin)
export(insertUsr1Addin)
export(insertUsr2Addin)
Expand Down
8 changes: 8 additions & 0 deletions R/insertMagrittrExpositionPipeAddin.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#' Insert \%$\% .
#'
#' Call this function as an addin to insert \code{\link[magrittr]{\%$\%}} (Magrittr pipe, \url{https://github.com/tidyverse/magrittr}) at the cursor position.
#'
#' @export
insertMagrittrExpositionPipeAddin <- function() {
rstudioapi::insertText(" %$% ")
}
8 changes: 8 additions & 0 deletions R/insertMagrittrTeePipeAddin.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#' Insert \%T>\% .
#'
#' Call this function as an addin to insert \code{\link[magrittr]{\%T>\%}} (Magrittr pipe, \url{https://github.com/tidyverse/magrittr}) at the cursor position.
#'
#' @export
insertMagrittrTeePipeAddin <- function() {
rstudioapi::insertText(" %T>% ")
}
10 changes: 10 additions & 0 deletions inst/rstudio/addins.dcf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ Description: Inserts %<>% (Magrittr compound pipe) at the cursor position.
Binding: insertMagrittrCompoundPipeAddin
Interactive: false

Name: Insert %$%
Description: Inserts %$% (Magrittr Exposition pipe) at the cursor position.
Binding: insertMagrittrExpositionPipeAddin
Interactive: false

Name: Insert %T>%
Description: Inserts %T>% (Magrittr Tee pipe) at the cursor position.
Binding: insertMagrittrTeePipeAddin
Interactive: false

Name: Insert :=
Description: Inserts := at the cursor position.
Binding: insertColonEqual
Expand Down
1 change: 0 additions & 1 deletion man/addinexamplesWV.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions man/insertMagrittrExpositionPipeAddin.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions man/insertMagrittrTeePipeAddin.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.