If you love the Julia REPL and the pipe operator,
if you have a problem with typing the prickly " |> "
sequence1,
and if no one else can help,
maybe you can hire Pipette and insert " |> "
with double-tapping arrow-right [➔] at the end of the line:
julia> get_transmogrifying_iterator()#..now just double tap [➔]..
Voilà:
julia> get_transmogrifying_iterator() |> #<- ta ta-da TAAAA!
Alternatively, press [Ctrl+➔]
to insert the string " |> "
anywhere on a line.
-
The delay between [➔]-taps must be <300 milli-seconds to register as double-tap.
It also must be >100 milli-seconds -- this avoids pipes galore when you keep pressing the cursor to reach the end of a line.
You can configure this with
julia> Pipette.set_doubletap_delay(from=100, to=300)
-
To tune this, find out your tapping speed and keyboard repeat delay with
Pipette.tune_doubletap_delay()
. -
To turn Pipette on or off, use
Pipette.on()
orPipette.off()
. To keep the[Ctrl+➔]
-behavior, and just turn off the double-tap one, set the range to zeros.
Just ]add Pipette
and keep using Pipette
.
To turn it on by default, you can modify .julia/config/startup.jl
:
atreplinit() do repl
try @eval using Pipette
catch e; @warn "Pipette startup error" e end
end
(Pipette exports nothing, btw.)
- Startup logic pilfered from OhMyREPL.jl -- thanks!
- 0.1 Initial version
Footnotes
-
On a German keyboard, e.g., you need to type
[Space]
[AltGr+"|"]
[Shift+">"]
[Space]
. ↩