Skip to content

umlet/Pipette.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipette: A Smoother Pipe Operator

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.



Usage

  • 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() or Pipette.off(). To keep the [Ctrl+➔]-behavior, and just turn off the double-tap one, set the range to zeros.



Install

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.)






Refs



Version History

  • 0.1 Initial version


Footnotes

Footnotes

  1. On a German keyboard, e.g., you need to type [Space] [AltGr+"|"] [Shift+">"] [Space].

About

A Smoother Pipe Operator in the Julia REPL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages