All Projects β†’ tkf β†’ InteractiveCodeSearch.jl

tkf / InteractiveCodeSearch.jl

Licence: other
Interactively search Julia code from terminal

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to InteractiveCodeSearch.jl

Iruby
Official gem repository: Ruby kernel for Jupyter/IPython Notebook
Stars: ✭ 600 (+710.81%)
Mutual labels:  interactive, repl
Ugrep
πŸ”NEW ugrep v3.1: ultra fast grep with interactive query UI and fuzzy search: search file systems, source code, text, binary files, archives (cpio/tar/pax/zip), compressed files (gz/Z/bz2/lzma/xz/lz4), documents and more. A faster, user-friendly and compatible grep replacement.
Stars: ✭ 626 (+745.95%)
Mutual labels:  search, interactive
Readline Sync
Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).
Stars: ✭ 601 (+712.16%)
Mutual labels:  interactive, repl
gorilla-repl
A fork of Jony Epsilon's rich REPL for Clojure in the notebook style.
Stars: ✭ 22 (-70.27%)
Mutual labels:  interactive, repl
Lfortran
Official mirror of https://gitlab.com/lfortran/lfortran. Please submit pull requests (PR) there. Any PR sent here will be closed automatically.
Stars: ✭ 220 (+197.3%)
Mutual labels:  interactive, repl
klipse-repl
Beginners friendly Clojure REPL
Stars: ✭ 44 (-40.54%)
Mutual labels:  interactive, repl
facade
Facade Framework - autogenerated embedded live dashboards for Rust apps
Stars: ✭ 95 (+28.38%)
Mutual labels:  interactive
rethinkdb.nim
RethinkDB driver for Nim
Stars: ✭ 35 (-52.7%)
Mutual labels:  repl
dotfiles
My Linux settings and configs
Stars: ✭ 33 (-55.41%)
Mutual labels:  rofi
marcizhu
An interactive chess game in a README file!
Stars: ✭ 37 (-50%)
Mutual labels:  interactive
subst
Search and des... argh... replace in many files at once. Use regexp and power of Python to replace what you want.
Stars: ✭ 20 (-72.97%)
Mutual labels:  search
dotfiles
Dotfiles for my awesomewm/i3 Arch setup & neovim
Stars: ✭ 19 (-74.32%)
Mutual labels:  rofi
rgpipe
lesspipe for ripgrep for common new filetypes using few dependencies
Stars: ✭ 21 (-71.62%)
Mutual labels:  search
dotfiles-openbox
Here is my aether dotfiles openbox version
Stars: ✭ 147 (+98.65%)
Mutual labels:  rofi
ci4-album
πŸ”₯ CodeIgniter 4 example Album module uses Domain Driven Design Architecture with Tactical Pattern
Stars: ✭ 67 (-9.46%)
Mutual labels:  search
ts-comint
ts-comint will send the code from Emacs into a Typescript REPL.
Stars: ✭ 28 (-62.16%)
Mutual labels:  repl
v-oogle
Google.com, reVued. πŸ”Ž
Stars: ✭ 40 (-45.95%)
Mutual labels:  search
dotfiles
no passwords here ... I hope 🀞
Stars: ✭ 51 (-31.08%)
Mutual labels:  rofi
solid-playground
Quickly discover what the solid compiler will generate from your JSX template
Stars: ✭ 45 (-39.19%)
Mutual labels:  repl
rofi-mpd
shell script for mpd that uses rofi to add songs, albums, playlist, jump to a song in the current playlist etc.
Stars: ✭ 19 (-74.32%)
Mutual labels:  rofi

InteractiveCodeSearch.jl –- Interactively search Julia code

Build Status codecov.io

gif animation

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, and argument type @searchmethods ::Int.
  • Interactively search history. It works in IJulia as well.

Examples

using InteractiveCodeSearch
@search show             # search method definitions
@searchmethods 1         # search methods defined for integer
@searchhistory           # search history (Julia β‰₯ 0.7)

Requirements

  • Interactive matching command. For example:

Reference

@search

@search x [:shallow | :s | :recursive | :r]

List file locations at which x are defined in an interactive matcher and then open the chosen location in the editor.

When x is a module, only the top-level definitions are searched. To search all definitions in the submodule, pass :recursive or :r flag.

@search

If no expression is provided, search for the method returned by the previous execution; i.e., x defaults to ans.

Examples

@search show                      # all method definitions
@search @time                     # all macro definitions
@search Base.Enums                # methods and macros in a module
@search REPL :r                   # search the module recursively
@search *(::Integer, ::Integer)   # methods with specified types
@search dot(Ο€, β„―)                 # methods with inferred types

Note that @search evaluates complex expression with . and [] such as follows and search the returned value or the type of it:

@search Base.Multimedia.displays[2].repl

@searchmethods

@searchmethods x
@searchmethods ::X

Interactively search through methodswith(typeof(x)) or methodswith(X).

Examples

@searchmethods 1         # search methods defined for integer
@searchmethods ::Int     # search methods defined for a specified type

@searchhistory

@searchhistory

Search history interactively. Interactively narrows down the code you looking for from the REPL history.

Limitation/feature in IJulia: In IJulia, @searchhistory searches history of terminal REPL, not the history of the current IJulia session.

InteractiveCodeSearch.CONFIG

Configuration interface for InteractiveCodeSearch.

Examples

using InteractiveCodeSearch
InteractiveCodeSearch.CONFIG.interactive_matcher = `fzf ...`  # default in terminal
InteractiveCodeSearch.CONFIG.interactive_matcher = `peco`
InteractiveCodeSearch.CONFIG.interactive_matcher = `percol`
InteractiveCodeSearch.CONFIG.interactive_matcher =
    `rofi -dmenu -i -p "πŸ”Ž"`  # use GUI matcher (default in non-terminal
                              # environment like IJulia)
InteractiveCodeSearch.CONFIG.interactive_matcher =
    `rofi -dmenu -i -p "πŸ”Ž" -fullscreen`  # bigger screen
InteractiveCodeSearch.CONFIG.open = edit  # default
InteractiveCodeSearch.CONFIG.open = less  # use Base.less to read code
InteractiveCodeSearch.CONFIG.auto_open = true   # default
InteractiveCodeSearch.CONFIG.auto_open = false  # open matcher even when there
                                                # is only one candidate
InteractiveCodeSearch.CONFIG.trigger_key = ')'      # insert "@search" on ')' (default)
InteractiveCodeSearch.CONFIG.trigger_key = nothing  # disable shortcut

Using InteractiveCodeSearch.jl by default

Put the following code in your ~/.julia/config/startup.jl (β‰₯ Julia 0.7) or ~/.juliarc.jl (Julia 0.6):

using InteractiveCodeSearch
# InteractiveCodeSearch.CONFIG.interactive_matcher = ...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].