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 preferences toggle (or new shortcut) for the forthcoming (and now in R-devel) native pipe symbol (|>) #8534
Comments
|
Suggested ways it could be supported (from user perspective, without comments on implementation which is beyond my ken):
|
|
Just a comment on accessibility from Barry Rowlingson:
Implication: any changes should not become the default and people should think twice before setting ligatures. |
|
Um, ligatures are a personal choice. Nobody has to use a ligature-enabled font. Barry's comment is woefully uninformed. |
I don't know much about it. Is there any evidence about it? The reason for raising this was that it seemed to ring try: if newbies start seeing triangles and arrows could that not make R seem harder than it is? Slightly off topic but interesting ideas both ways. |
|
All other decent coding editors provide the option to support ligatures.
Flat out preventing the ability to choose to use them seems pretty counter
intuitive to me.
I’m not trying to counter any accessibility claims, but dictating to me
that I should not be able to use them if I want to is a pretty strong and
wrong position for him or anyone to hold.
…On Fri, Dec 4, 2020 at 06:19 Robin ***@***.***> wrote:
Um, ligatures are a personal choice. Nobody has to use a ligature-enabled
font. Barry's comment is woefully uninformed.
I don't know much about it. Is there any evidence about it? The reason for
raising this was that it seemed to ring try: if newbies start seeing
triangles and arrows could that not make R seem harder than it is? Slightly
off topic but interesting ideas both ways.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8534 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD4PNVHPLYIRVC4SS2RBTDSTDATLANCNFSM4UNFPPYQ>
.
|
|
I see your point. Barry's comment on Twitter was a bit dictatorial. Hopefully my suggestion that
is more nuanced and compatible with that - agree, I'm 'pro choice' on this ; ) |
|
Ligature fonts are so popular that we briefly entertained the idea of shipping a couple with RStudio Server, but decided against it for the reasons @Robinlovelace mentioned. However we'd like them to work correctly for folks who prefer them. @hrbrmstr Feel free to file a separate issue on the ligature. We'll need to know what specific ligature font you're using, too. |
|
The issue with ligatures will be fixed by #8533 (we need to ensure Having Cmd + Shift + M use the new native pipe operator wouldn't be too difficult: rstudio/src/gwt/src/org/rstudio/studio/client/workbench/views/source/editors/text/AceEditor.java Lines 656 to 667 in 5ace473
We'd just have to use the native pipe operator if the user is running R (>= 4.1.0), or if they've explicitly opted in to using it. |
|
Wow fast work guys, seems the solutions are in place less than 24 hours after R's 'native pipe' was available! |
|
sorry @kevinushey. I updated the newest version of Rstudio and R-devel but I can not display the native pipe like that. Also we should consider about the short cut for it. It should be different with Ctrl + Shift + M |
|
Ctrl + Shift + P gets my vote |
|
That makes sense |
|
Ctrl+Shift+P is already used by the new command-palette feature in 1.4. |
|
Aha. M is my vote then, unless there are reasons not to go for that |
|
I suspect that there will be quite a long transition period where the Thus I suggest the keyboard shortcut |
|
I think Ctrl + Shift + > may be easier to remember as ">" symbol meaning forward. In addition, the symbol ">" is near with letter M |
|
I would recommend making the existing pipe shortcut configurable rather than adding a new keyboard shortcut. It should definitely require user opt-in, since while the magrittr 2.0.0 pipe and the base pipe are very similar, there are a few differences on edge cases that might catch folks out. |
|
To consider for 1.4-Juliet-Rose or 1.5. |
|
@hadley: do you imagine that in the future, use of the native pipe over the magrittr pipe will be encouraged in the tidyverse? Or will they just be two potential alternatives based on what the user wants to do? |
|
(Another way of putting it: will some future version of tidyverse documentation use |
|
@kevinushey the plan is to gradually switch to use the base pipe. Unfortunately we don't have an exact plan for how to do while keeping our guarantee that the tidyverse works with the last five versions of R. We'll probably need to do some |
|
This is now implemented in the Juliet Rose branch. |
|
Verified setting shows now in Version 1.4.1507-1 and R 3.6.0. Added QA automation test to verify changing this setting and the output text that shows when the hot key command is used. |
|
Column name hints are not yet available when using |> (version 1.4.1714) |

While not a trivial feature request ask, a toggle to have
cmd-shift-Muse the new native pipe symbol vs {magrittr}'s would be great! The suggestion for an alternate keybinding by @Robinlovelace (in the parallel feature req) for a separate keybinding would be a fine alternative as well, cmd-shift-> (greater than) seems to be available at least on macOS and seems like a pretty good one.A cosmetic A++ parallel request to this is to figure out why |> does not render ligatured (as a right-facing triangle) as it does in Sublime, iTerm, VS Code, etc. (this may be an un-fixable-by-RStudio QT issue, tho).
The ligature rendering works fine when backtick-quoted or single/double quoted.
The text was updated successfully, but these errors were encountered: