You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in the process of migrating all my pipe usage from the magrittr%>% pipe to the R native |> pipe. But old habits truly die hard and I find my self mixing the two pipes all the time in my script. As a result, I have to do global replacement often. I'm wondering if it's possible to enable some kind of auto-replacement of %>% to |> in real time when typing. There can be a setting which turns on and off this behavior.
Congrats on the new launch and thanks for all the hard work over many years!
The text was updated successfully, but these errors were encountered:
I tried to set up the abbreviation, but it doesn't work. It may have something to do with the characters allowed in abbreviation.
I ended up doing this in 2 steps.
I used grep --include={*.R,*.r,*.qmd,*.rmd} -rli '%>%' * | xargs -i@ sed -i 's/%>%/|>/g' @ to replace all existing %>% with |> in my folder.
I included autocmd BufWritePre *.R,*.r,*.qmd,*.rmd,*.Qmd,*.Rmd :%s/%>%/|>/ge | write in my setup to automatically replace %>% with |> in R files when saving.
It doesn't solve the real-time replacement when typing, but at least help make sure that my R files now always have |> instead of %>%.
This is a feature request.
I'm in the process of migrating all my pipe usage from the
magrittr
%>%
pipe to the R native|>
pipe. But old habits truly die hard and I find my self mixing the two pipes all the time in my script. As a result, I have to do global replacement often. I'm wondering if it's possible to enable some kind of auto-replacement of%>%
to|>
in real time when typing. There can be a setting which turns on and off this behavior.Congrats on the new launch and thanks for all the hard work over many years!
The text was updated successfully, but these errors were encountered: