# ANN: InteractiveCodeSearch.jl --- Interactively search Julia code

**URL:** <https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657>\
**Category:** Package Announcements\
**Created:** [November 17, 2018, 8:00pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657 "2018-11-17T20:00:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [November 17, 2018, 8:00pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/1 "2018-11-17T20:00:31Z")

</div>

Let me introduce my package [InteractiveCodeSearch.jl](https://github.com/tkf/InteractiveCodeSearch.jl). It helps you searching Julia code.

![gif animation](https://global.discourse-cdn.com/julialang/original/3X/6/6/667ee31236f7ba5e9f61b04449c9bdc55c0e60cf.gif)

Julia has `@edit`, `@less`, etc. which are very handy for reading the implementation of functions. However, you need to specify a “good enough” set of (type) parameters for them to find the location of the code.

Instead, `InteractiveCodeSearch` provides a few macros to interactively choose the code you want to read. Features:

- Interactively choose a method signature before opening the code location in your editor.
- Various ways to search methods, such as: by function name `@search show`, function call expression `@search show(stdout, "hello")`, function call signature `@search show(::IO, ::String)`, module name `@search Base`, argument value `@searchmethods 1`, argument type `@searchmethods ::Int`, and return type `@searchreturn Int`.
- Interactively search history. It works in IJulia as well.

It’s already registered so you can install it by:

```julia
]add InteractiveCodeSearch # Julia ≥ 0.7
Pkg.add("InteractiveCodeSearch") # Julia 0.6

```

EDIT: I forgot to mention that the most of the cool things are happening in the interactive matching program. I use [`peco`](https://github.com/peco/peco) (written in Go) and `InteractiveCodeSearch` is useful (e.g., it can handle `@search Base`) because `peco` is highly efficient.

---

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [November 17, 2018, 8:08pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/2 "2018-11-17T20:08:33Z")

</div>

Wow, this works really well!

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [November 17, 2018, 8:35pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/3 "2018-11-17T20:35:20Z")

</div>

I’m glad that you find it useful!

---

<div class="post-metadata">

**Author:** ![simonschoelly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonschoelly/32/21606_2.png) [@simonschoelly](https://discourse.julialang.org/u/simonschoelly)\
**Post date:** [November 21, 2018, 1:22am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/4 "2018-11-21T01:22:27Z")

</div>

I wasted some time thinking I need `peco.jl` to get this working, but now it works.

You think it would be possible to have a special key in the REPL that would trigger `@search`? For example ‘)’ .

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [November 21, 2018, 1:57am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/5 "2018-11-21T01:57:49Z")

</div>

> [@simonschoelly](#):
>
> thinking I need `peco.jl` to get this working

Ah, I guess README is not very clear about installation steps.

> [@simonschoelly](#):
>
> a special key in the REPL

Yeah, that’s possible. I’ve done it in IPython.jl. Maybe it would be nice to have something context-aware like `alt-e` in Rebugger.jl.

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [November 21, 2018, 2:10am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/6 "2018-11-21T02:10:30Z")

</div>

Putting this in `~/.julia/config/startup.jl` seems to work:

```julia
using REPL
using REPL: LineEdit

@async begin
    # This is why we need https://github.com/JuliaLang/julia/pull/29896...
    for _ in 1:20
        try
            Base.active_repl.interface.modes[1].keymap_dict
            break
        catch
        end
        sleep(0.05)
    end

    repl = Base.active_repl
    repl isa REPL.LineEditREPL || return
    insert_search = function(s, _...)
        if isempty(s) || position(LineEdit.buffer(s)) == 0
            LineEdit.edit_insert(s, "@search ")
        else
            LineEdit.edit_insert(s, ')')
        end
    end
    new_keymap = Dict{Any,Any}(')' => insert_search)

    main_mode = repl.interface.modes[1]
    main_mode.keymap_dict = LineEdit.keymap_merge(main_mode.keymap_dict,
                                                  new_keymap)
end

```

---

<div class="post-metadata">

**Author:** ![scelles](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scelles/32/220408_2.png) [@scelles](https://discourse.julialang.org/u/scelles)\
**Post date:** [December 25, 2018, 5:43pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/7 "2018-12-25T17:43:56Z")

</div>

Hello,

Thanks for this great tool! It will be nice to have it integrated to REPL out of the box.

I’m using Visual Studio Code as my default editor but I get:

```julia
julia> @search show
[ Info: Opening options.jl:54
Unknown editor: no line number information passed.
The method is defined at line 54.

```

Is there a way to go directly to line number?

If Visual Studio Code can’t be supported for now maybe @davidanthoff can help or give some tips / advices to improve its support.

Maybe doc should provide information to set InteractiveCodeSearch.jl with an other editor (with go to line number supported).

Thanks again @tkf that’s a great contribution

Kind regards

---

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [December 25, 2018, 7:10pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/8 "2018-12-25T19:10:22Z")

</div>

You might need to set the `JULIA_EDITOR` environment variable (e.g. add `JULIA_EDITOR=code` to your `~/.bashrc` on Linux).

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [December 25, 2018, 9:15pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/9 "2018-12-25T21:15:07Z")

</div>

As @tkoolen mentioned, setting environment variable `JULIA_EDITOR`, `VISUAL` or `EDITOR` should work. This should also make stdlib `@edit` work.

Behind the scene, as briefly noted [in the README](https://github.com/tkf/InteractiveCodeSearch.jl#interactivecodesearchconfig), default configuration for opening an editor is `InteractiveCodeSearch.CONFIG.open = edit` where `edit` is from the standard library `InteractiveUtils` (see: [Interactive Utilities · The Julia Language](https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.edit-Tuple%7BAbstractString,Integer%7D)). If, for some reasons, you want to bypass stdlib `edit`, you can define your own function of the form `function(file, line::Integer)` and set it to `InteractiveCodeSearch.CONFIG.open`.

---

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [February 13, 2022, 6:12pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/10 "2022-02-13T18:12:43Z")

</div>

Great package. It works in the VSCode REPL but when executed in a standalone terminal REPL it errors (see below). Does peco need to be installed separately?

Version info:

```julia
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, tigerlake)
Environment:
  JULIA_EDITOR = code.cmd
  JULIA_NUM_THREADS = 8

```

Error message:

```julia
julia> @search +
┌ Warning: Matcher peco not installed.
│ See https://github.com/peco/peco for how to install peco.
│
└ @ InteractiveCodeSearch C:\Users\seatt\.julia\packages\InteractiveCodeSearch\irjIV\src\InteractiveCodeSearch.jl:514
ERROR: IOError: could not spawn `peco`: no such file or directory (ENOENT)
Stacktrace:
  [1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
    @ Base .\process.jl:100
  [2] #690
    @ .\process.jl:113 [inlined]
  [3] setup_stdios(f::Base.var"#690#691"{Cmd}, stdios::Vector{Any})
    @ Base .\process.jl:197
  [4] _spawn
    @ .\process.jl:112 [inlined]
  [5] open(cmds::Cmd, stdio::Base.DevNull; write::Bool, read::Bool)
    @ Base .\process.jl:366
  [6] open(cmds::Cmd, mode::String, stdio::Base.DevNull)
    @ Base .\process.jl:340
  [7] open
    @ .\process.jl:339 [inlined]
  [8] _readandwrite
    @ C:\Users\seatt\.julia\packages\InteractiveCodeSearch\irjIV\src\InteractiveCodeSearch.jl:51 [inlined]
  [9] read_stdout(input_provider::InteractiveCodeSearch.var"#5#6"{Base.MethodList}, cmd::Cmd)
    @ InteractiveCodeSearch C:\Users\seatt\.julia\packages\InteractiveCodeSearch\irjIV\src\InteractiveCodeSearch.jl:164
 [10] run_matcher(input::Function)
    @ InteractiveCodeSearch C:\Users\seatt\.julia\packages\InteractiveCodeSearch\irjIV\src\InteractiveCodeSearch.jl:186
 [11] _choose_method(#unused#::Base.HasShape{1}, methods::Base.MethodList)
    @ InteractiveCodeSearch C:\Users\seatt\.julia\packages\InteractiveCodeSearch\irjIV\src\InteractiveCodeSearch.jl:211
 [12] choose_method
    @ C:\Users\seatt\.julia\packages\InteractiveCodeSearch\irjIV\src\InteractiveCodeSearch.jl:189 [inlined]
 [13] search_methods(methods::Base.MethodList)
    @ InteractiveCodeSearch C:\Users\seatt\.julia\packages\InteractiveCodeSearch\irjIV\src\InteractiveCodeSearch.jl:231
 [14] code_search(#unused#::InteractiveCodeSearch.Shallow, f::Function)
    @ InteractiveCodeSearch C:\Users\seatt\.julia\packages\InteractiveCodeSearch\irjIV\src\InteractiveCodeSearch.jl:236
 [15] top-level scope
    @ REPL[5]:1

```

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [February 14, 2022, 11:41am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/11 "2022-02-14T11:41:56Z")

</div>

No, InteractiveCodeSearch.jl should automatically use `fzf` in Julia 1.7. It looks like a bug. What do you have in `InteractiveCodeSearch.CONFIG.interactive_matcher`? Also, what does `InteractiveCodeSearch.choose_interactive_matcher()` return?

---

<div class="post-metadata">

**Author:** ![JohnnyChen94](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnnychen94/32/29979_2.png) [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Post date:** [February 14, 2022, 2:39pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/12 "2022-02-14T14:39:00Z")

</div>

I also meet the peco not found error on macOS, which can be easily fixed via `brew install peco`.

```julia
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.5.0)
  CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

julia> InteractiveCodeSearch.CONFIG.interactive_matcher
`peco`

julia> InteractiveCodeSearch.choose_interactive_matcher()
`peco`

```

Interestingly, if I use a clean depot path

```julia
bash-3.2$ JULIA_DEPOT_PATH=tmp julia-1.7 --startup=no

julia> using InteractiveCodeSearch

julia> InteractiveCodeSearch.CONFIG.interactive_matcher

julia> InteractiveCodeSearch.choose_interactive_matcher()
setenv(`/Users/jc/tmp/artifacts/88aeed19eb8fec3156f542334a704599a37814b2/bin/fzf --layout=reverse --preview '/Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia -Cnative -J/Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/sys.dylib -g1 --startup-file=no --startup-file=no --color=yes --compile=min -O0 /Users/jc/tmp/packages/InteractiveCodeSearch/v88rH/src/preview.jl {}'`,["_CE_M=", "PATH=/Users/jc/tmp/artifacts/88aeed19eb8fec3156f542334a704599a37814b2/bin:/Users/jc/miniconda3/bin:/Users/jc/miniconda3/condabin:/Users/jc/.cargo/bin:/Users/jc/.local/bin:/usr/local/opt/fzf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Library/TeX/texbin", "STARSHIP_SESSION_KEY=3658466585996962", "ITERM_PROFILE=Default", "USER=jc", "JULIA_DEPOT_PATH=tmp", "CONDA_PROMPT_MODIFIER=(base) ", "SHELL=/usr/local/bin/fish", "LC_TERMINAL_VERSION=3.4.15", "COLORFGBG=7;0" … "SECURITYSESSIONID=186a6", "TERM_PROGRAM_VERSION=3.4.15", "JULIA_NUM_THREADS=8", "COMMAND_MODE=unix2003", "PWD=/Users/jc", "TERM_PROGRAM=iTerm.app", "OPENBLAS_NUM_THREADS=8", "CONDA_PREFIX=/Users/jc/miniconda3", "TERM_SESSION_ID=w0t0p0:5D297E9D-EC8D-4A6B-A76B-1F173B0BE8C1", "OPENBLAS_MAIN_FREE=1"])

```

This seems to be a compatibility issue on my local machine: somehow Pkg gives me an `InteractiveCodeSearch@0.3.2`:

```julia
(@v1.7) pkg> add InteractiveCodeSearch@0.4
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
   Installed StatsBase ───────────── v0.33.15
   Installed fzf_jll ─────────────── v0.24.4+0
   Installed Static ──────────────── v0.5.5
   Installed JSON ────────────────── v0.21.3
   Installed JLFzf ───────────────── v0.1.3
   Installed InteractiveCodeSearch ─ v0.4.0
   Installed CommonMark ──────────── v0.8.6
  Downloaded artifact: fzf
    Updating `~/.julia/environments/v1.7/Project.toml`
  [54eb57ff] ↑ InteractiveCodeSearch v0.3.2 ⇒ v0.4.0
    Updating `~/.julia/environments/v1.7/Manifest.toml`
  [159f3aea] - Cairo v1.0.5
  [35d6a980] ↑ ColorSchemes v3.17.0 ⇒ v3.17.1
  [a80b9123] ↑ CommonMark v0.8.5 ⇒ v0.8.6
  [54eb57ff] ↑ InteractiveCodeSearch v0.3.2 ⇒ v0.4.0
  [1019f520] ↓ JLFzf v0.1.4 ⇒ v0.1.3
  [682c06a0] ↑ JSON v0.21.2 ⇒ v0.21.3
  [e5e0dc1b] - Juno v0.8.4
  [ae8d54c2] - Luxor v3.0.0
  [e89f7d12] - Media v0.5.0
  [69de0a69] ↑ Parsers v2.2.1 ⇒ v2.2.2
  [c4c386cf] - Rsvg v1.0.0
  [aedffcd0] ↑ Static v0.5.3 ⇒ v0.5.5
  [2913bbd2] ↑ StatsBase v0.33.14 ⇒ v0.33.15
  [925c91fb] - Librsvg_jll v2.52.4+0
  [36c8627f] - Pango_jll v1.50.3+0
  [214eeab7] ↓ fzf_jll v0.27.2+0 ⇒ v0.24.4+0
  [da03df04] - gdk_pixbuf_jll v2.42.6+1

```

---

<div class="post-metadata">

**Author:** ![JohnnyChen94](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnnychen94/32/29979_2.png) [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Post date:** [February 14, 2022, 2:51pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/13 "2022-02-14T14:51:41Z")

</div>

PR submitted: [https://github.com/tkf/InteractiveCodeSearch.jl/pull/27](https://github.com/tkf/InteractiveCodeSearch.jl/pull/27)

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [February 14, 2022, 2:59pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/14 "2022-02-14T14:59:03Z")

</div>

Thanks a lot for looking into this!

Now waiting for registration: [https://github.com/JuliaRegistries/General/pull/54620](https://github.com/JuliaRegistries/General/pull/54620)

---

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [February 14, 2022, 10:23pm UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/15 "2022-02-14T22:23:08Z")

</div>

> [@tkf](#):
>
> InteractiveCodeSearch.choose\_interactive\_matcher()

Here are the two items you asked for. The information I posted before was for the VSCode REPL. However, this is what is returned at the REPL in a standalone terminal window:

```julia
julia> InteractiveCodeSearch.CONFIG.interactive_matcher
`peco`

```

```julia
julia> InteractiveCodeSearch.choose_interactive_matcher()
`peco`

```

This is what is returned in the VSCode REPL.

```julia
julia> InteractiveCodeSearch.CONFIG.interactive_matcher
setenv(`'C:\Users\seatt\.julia\artifacts\ea7f89af072e8ea021192eeea77f1cbe8a02e8d1\bin\fzf.exe' --layout=reverse --preview "'C:\Users\seatt\.julia\juliaup\julia-1.7.2+0~x64\bin\julia.exe' -Cnative '-JC:\Users\seatt\.julia\juliaup\julia-1.7.2+0~x64\lib\julia\sys.dll' -g1 --startup-file=no --color=yes --compile=min -O0 'C:\Users\seatt\.julia\packages\InteractiveCodeSearch\v88rH\src\preview.jl' {}"`,["PATH=C:\\Users\\seatt\\.julia\\juliaup\\julia-1.7.2+0~x64\\bin\\..\\lib\\julia;C:\\Users\\seatt\\.julia\\juliaup\\julia-1.7.2+0~x64\\bin\\..\\lib;C:\\Users\\seatt\\.julia\\juliaup\\julia-1.7.2+0~x64\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Go\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\PowerShell\\7\\;C:\\Users\\seatt\\.cargo\\bin;C:\\Users\\seatt\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\seatt\\AppData\\Local\\Programs\\Julia-1.7.0\\bin;C:\\Users\\seatt\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\ProgramData\\seatt\\GitHubDesktop\\bin;C:\\Users\\seatt\\AppData\\Local\\GitHubDesktop\\bin;C:\\texlive\\2021\\bin\\win32;C:\\Users\\seatt\\AppData\\Local\\Programs\\Julia-1.7.1\\bin;C:\\Users\\seatt\\go\\bin;C:\\Users\\seatt\\AppData\\Local\\Programs\\julia-1.7.2\\bin;C:\\Users\\seatt\\go\\bin", "USERDOMAIN_ROAMINGPROFILE=DESKTOP-GOP7DPH", "HOMEPATH=\\Users\\seatt", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\\Windows", "APPDATA=C:\\Users\\seatt\\AppData\\Roaming", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files", "PROGRAMDATA=C:\\ProgramData" … "OPENBLAS_NUM_THREADS=8", "PROGRAMFILES=C:\\Program Files", "CHROME_CRASHPAD_PIPE_NAME=\\\\.\\pipe\\crashpad_17776_THPFBGPEDMUXEPIE", "LOGONSERVER=\\\\DESKTOP-GOP7DPH", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "ORIGINAL_XDG_CURRENT_DESKTOP=undefined", "POWERSHELL_DISTRIBUTION_CHANNEL=MSI:Windows 10 Home", "SYSTEMDRIVE=C:", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"])

```

```julia
julia> InteractiveCodeSearch.choose_interactive_matcher()
setenv(`'C:\Users\seatt\.julia\artifacts\ea7f89af072e8ea021192eeea77f1cbe8a02e8d1\bin\fzf.exe' --layout=reverse --preview "'C:\Users\seatt\.julia\juliaup\julia-1.7.2+0~x64\bin\julia.exe' -Cnative '-JC:\Users\seatt\.julia\juliaup\julia-1.7.2+0~x64\lib\julia\sys.dll' -g1 --startup-file=no --color=yes --compile=min -O0 'C:\Users\seatt\.julia\packages\InteractiveCodeSearch\v88rH\src\preview.jl' {}"`,["PATH=C:\\Users\\seatt\\.julia\\juliaup\\julia-1.7.2+0~x64\\bin\\..\\lib\\julia;C:\\Users\\seatt\\.julia\\juliaup\\julia-1.7.2+0~x64\\bin\\..\\lib;C:\\Users\\seatt\\.julia\\juliaup\\julia-1.7.2+0~x64\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Go\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\PowerShell\\7\\;C:\\Users\\seatt\\.cargo\\bin;C:\\Users\\seatt\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\seatt\\AppData\\Local\\Programs\\Julia-1.7.0\\bin;C:\\Users\\seatt\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\ProgramData\\seatt\\GitHubDesktop\\bin;C:\\Users\\seatt\\AppData\\Local\\GitHubDesktop\\bin;C:\\texlive\\2021\\bin\\win32;C:\\Users\\seatt\\AppData\\Local\\Programs\\Julia-1.7.1\\bin;C:\\Users\\seatt\\go\\bin;C:\\Users\\seatt\\AppData\\Local\\Programs\\julia-1.7.2\\bin;C:\\Users\\seatt\\go\\bin", "USERDOMAIN_ROAMINGPROFILE=DESKTOP-GOP7DPH", "HOMEPATH=\\Users\\seatt", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\\Windows", "APPDATA=C:\\Users\\seatt\\AppData\\Roaming", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files", "PROGRAMDATA=C:\\ProgramData" … "OPENBLAS_NUM_THREADS=8", "PROGRAMFILES=C:\\Program Files", "CHROME_CRASHPAD_PIPE_NAME=\\\\.\\pipe\\crashpad_17776_THPFBGPEDMUXEPIE", "LOGONSERVER=\\\\DESKTOP-GOP7DPH", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "ORIGINAL_XDG_CURRENT_DESKTOP=undefined", "POWERSHELL_DISTRIBUTION_CHANNEL=MSI:Windows 10 Home", "SYSTEMDRIVE=C:", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"])

```

VSCode must be doing some setup differently than the standalone terminal.

---

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [February 15, 2022, 3:16am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/16 "2022-02-15T03:16:53Z")

</div>

I updated packages and got the new version of InteractiveCodeSearch but the problem is still there. Was the package update supposed to fix this or was that for a different problem?

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [February 15, 2022, 9:22am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/17 "2022-02-15T09:22:39Z")

</div>

If the original problem was due to a stale InteractiveCodeSearch version, the new release should help you avoid the problem. As a sanity check, you can evaluate `VERSION` and `]st InteractiveCodeSearch` in the terminal and VS Code to see if there are any differences. Also, you can create a fresh project with `]activate --temp` and install InteractiveCodeSearch in it, to help isolate the problem.

---

<div class="post-metadata">

**Author:** ![albheim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albheim/32/34660_2.png) [@albheim](https://discourse.julialang.org/u/albheim)\
**Post date:** [February 15, 2022, 10:53am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/18 "2022-02-15T10:53:15Z")

</div>

Looks really nice.

Added to my `startup.jl` and works fine in terminal but in VSCode I get

```julia
┌ Warning: Failed to wait for REPL
└ @ InteractiveCodeSearch ~/.julia/packages/InteractiveCodeSearch/ROKC9/src/keybinds.jl:30
julia> 

```

which I followed and found  
[https://github.com/tkf/InteractiveCodeSearch.jl/blob/c4a11b97eec2c6ba899e5d8c45787a3b74755de2/src/keybinds.jl#L20-L30](https://github.com/tkf/InteractiveCodeSearch.jl/blob/c4a11b97eec2c6ba899e5d8c45787a3b74755de2/src/keybinds.jl#L20-L30)  
which led me to  
[https://github.com/JuliaLang/julia/pull/29896](https://github.com/JuliaLang/julia/pull/29896)

I think the `afterreplinit` seems reasonable, any reasons it got stuck? And in the meantime, could we add any nice way of handling people who have too slow startups 😓

It does seem to work though, so I assume I’m just missing on some hotkeys for things? I don’t mind using `@search`, mostly just annoying to get the warning each time.

---

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [February 16, 2022, 1:09am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/19 "2022-02-16T01:09:17Z")

</div>

Thanks for that suggestion. I updated the version of interactive code search being used in the terminal REPL and it works like a charm now.

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [February 16, 2022, 2:56am UTC](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657/20 "2022-02-16T02:56:40Z")

</div>

> [@albheim](#):
>
> any reasons it got stuck?

No particular reasons. I just forgot pinging the reviewers.

> [@albheim](#):
>
> any nice way of handling people who have too slow startups

I guess we can just use longer poll time like `for _ in 1:200`. Can you check [Wait longer for REPL setup by tkf · Pull Request #28 · tkf/InteractiveCodeSearch.jl · GitHub](https://github.com/tkf/InteractiveCodeSearch.jl/pull/28) or something longer works? Or maybe we can add API like `InteractiveCodeSearch.cancel_setup_keybinds()` or something.

> [@albheim](#):
>
> I assume I’m just missing on some hotkeys for things?

Yes, that’s right.

[Next page](https://discourse.julialang.org/t/ann-interactivecodesearch-jl-interactively-search-julia-code/17657.md?page=2)
