How to get links when using @which in REPL

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

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

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?

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

1 Like

You can open the code location directly with

@edit occursin(1)

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

2 Likes

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.

1 Like