# How to get links when using @which in REPL

**URL:** <https://discourse.julialang.org/t/how-to-get-links-when-using-which-in-repl/78855>\
**Category:** General Usage\
**Tags:** repl\
**Created:** [April 1, 2022, 9:05am UTC](https://discourse.julialang.org/t/how-to-get-links-when-using-which-in-repl/78855 "2022-04-01T09:05:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rex\_Wang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rex_wang/32/35108_2.png) [@Rex\_Wang](https://discourse.julialang.org/u/Rex_Wang)\
**Post date:** [April 1, 2022, 9:05am UTC](https://discourse.julialang.org/t/how-to-get-links-when-using-which-in-repl/78855/1 "2022-04-01T09:05:49Z")

</div>

When typing `@which(occursin(1))` in Jupyter-notebook, I get the following

> occursin(haystack) in Base at [strings/search.jl:635](https://github.com/JuliaLang/julia/tree/ae8452a9e0b973991c30f27beb2201db1b0ea0d3/base/strings/search.jl#L635)

However, typing the same message in REPL, I get only plain text

> occursin(haystack) in Base at strings/search.jl:635

* * *

Whenever I want to read the source code of a function, I need to start the Jupyter-notebook to view it. That is quite inconvenient.  
Currently, I am coding in vscode. **Is there a more direct way to get links of a function using @which in REPL or in vscode?**

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [April 1, 2022, 9:17am UTC](https://discourse.julialang.org/t/how-to-get-links-when-using-which-in-repl/78855/2 "2022-04-01T09:17:15Z")

</div>

I use `@less` to see the code in the REPL, but it’s not perfect neither.

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [April 1, 2022, 10:25am UTC](https://discourse.julialang.org/t/how-to-get-links-when-using-which-in-repl/78855/3 "2022-04-01T10:25:06Z")

</div>

You can open the code location directly with

```julia
@edit occursin(1)

```

where you control which editor is opened using the `EDITOR` environment variable.

---

<div class="post-metadata">

**Author:** ![Rex\_Wang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rex_wang/32/35108_2.png) [@Rex\_Wang](https://discourse.julialang.org/u/Rex_Wang)\
**Post date:** [April 1, 2022, 11:10am UTC](https://discourse.julialang.org/t/how-to-get-links-when-using-which-in-repl/78855/4 "2022-04-01T11:10:06Z")

</div>

Thank you @jd-foster and @oheil for your replies!  
`@edit` works very well for my needs in vscode, although I still can’t view the link.
