Is there a keyboard shortcut for the Elixir pipe operator in Livebook?

Hi everyone,

I’ve been working predominantly with R for most of my projects, and I’ve grown quite accustomed to using Shift+Command+M to insert the pipe operator (%>%) in RStudio. Naturally, when I started exploring Elixir, I was excited to discover the Explorer library—its functionality is very reminiscent of R’s dplyr package, which has made the transition even smoother.

Now that I’m diving into Livebook for my Elixir work, I’m wondering: Does Livebook have a built-in keyboard shortcut for inserting the Elixir pipe operator (|>) similar to what I was used to in R? If not, are there any recommended workarounds or configurations that could help emulate this behavior?

Any insights or suggestions would be greatly appreciated!

Thanks in advance for your help.

1 Like

Hey @octavio-robles! There is no such shortcut. I am not convinced that having a shortcut like this is worth it. I expect |> is much easier to type than %>% (but I guess it depends on the keyboard layout used), and if you need to jump the cursor to the end of the cell, you can do Cmd + Down.

I imagine it should be possible to define a system-wide shortcut for inserting the pipe text, but maybe that’s too much.

It could be done at the system level (macOS).

I’m not sure if recent versions of macOS have a built-in solution, but there are projects like https://karabiner-elements.pqrs.org/.