# Shortcut to type |\>?

**URL:** https://discourse.julialang.org/t/shortcut-to-type/47012
**Category:** VS Code
**Created:** [September 21, 2020, 2:24pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012 "2020-09-21T14:24:45Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)
#### Post date: [September 21, 2020, 2:24pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/1 "2020-09-21T14:24:45Z")

</div>

The piping operator `|>` is very useful, especially when working in the REPL. However I do not find it convenient to type, it requires some finger gymnastic and it’s not very fast. Maybe it is the case because I have a french keyboard.

Does anyone knows a VSCode plugin that creates a shortcut to insert it ?

Thanks \<3

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [September 21, 2020, 2:26pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/2 "2020-09-21T14:26:42Z")

</div>

I map it to ctrl-shift-m which is how RStudio maps `%>%`

---

<div class="post-metadata">

### Author: ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)
#### Post date: [September 21, 2020, 2:30pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/3 "2020-09-21T14:30:52Z")

</div>

Ha sweet, how do you do that ?

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [September 21, 2020, 2:41pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/4 "2020-09-21T14:41:42Z")

</div>

Hard to describe but google how to map keyboard shortcuts vscode

---

<div class="post-metadata">

### Author: ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)
#### Post date: [September 21, 2020, 3:26pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/5 "2020-09-21T15:26:33Z")

</div>

For future reference:

Adding the following in the keybindings.json file works in editor but does not in the REPL.  
Tutorial:

> **[Visual Studio Code Key Bindings](https://code.visualstudio.com/docs/getstarted/keybindings)**
>
> Here you will find the complete list of key bindings for Visual Studio Code and how to change them.

```julia
[{
    "key": "ctrl+shift+m",
    "command": "type",  
    "args": { "text": "|>" },
    "when": "editorTextFocus && editorLangId == 'julia'"
},{
    "key": "ctrl+shift+m",
    "command": "type",
    "args": { "text": "|>" },
    "when": "terminalFocus && terminalProcessSupported"
}
]

```

---

<div class="post-metadata">

### Author: ![fieldofnodes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fieldofnodes/32/15858_2.png) [@fieldofnodes](https://discourse.julialang.org/u/fieldofnodes)
#### Post date: [February 15, 2021, 12:38am UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/6 "2021-02-15T00:38:48Z")

</div>

Works perfectly. Also, I made one that inserts the `@pipe` operator as well.

---

<div class="post-metadata">

### Author: ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discourse.julialang.org/u/Hugo)
#### Post date: [November 15, 2022, 10:10pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/7 "2022-11-15T22:10:18Z")

</div>

@HenriDeh, do you have know if now the shortcut command for the pipe will work in the REPL? I have been trying to make it work, but it’s been to no avail. Please let me know if you know a way — thank you.

---

<div class="post-metadata">

### Author: ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)
#### Post date: [November 16, 2022, 10:44am UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/8 "2022-11-16T10:44:15Z")

</div>

I quickly gave up on using this. As far as I can remember it did not work reliably and ended up being more time consuming than typing the symbols normally.

---

<div class="post-metadata">

### Author: ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discourse.julialang.org/u/Hugo)
#### Post date: [November 16, 2022, 4:55pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/9 "2022-11-16T16:55:46Z")

</div>

Thanks, HenriDeh.

---

<div class="post-metadata">

### Author: ![martin.auer](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@martin.auer](https://discourse.julialang.org/u/martin.auer)
#### Post date: [November 7, 2023, 10:58am UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/10 "2023-11-07T10:58:38Z")

</div>

Maybe have a look at our new [Pipette.jl](https://github.com/umlet/Pipette.jl) – it lets you enter `" |> "` via double-tapping cursor-right at the end of a REPL line, or pressing [Ctrl+cursor right] anywhere on a line. (It is also now in the general registry!)

---

<div class="post-metadata">

### Author: ![bert](https://avatars.discourse-cdn.com/v4/letter/b/9e8a1a/32.png) [@bert](https://discourse.julialang.org/u/bert)
#### Post date: [November 7, 2023, 7:23pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/11 "2023-11-07T19:23:49Z")

</div>

There are also macro-based solutions like Chain.jl and Lazy.jl that obviate the need for the `|>` altogether by letting native Julia syntax stand for chained/piped function calls.

---

<div class="post-metadata">

### Author: ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)
#### Post date: [November 7, 2023, 8:53pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012/12 "2023-11-07T20:53:01Z")

</div>

Use the english keyboard layout `;)`
