Bring forth towards you all that you seek. Attract the items you desire. Select the code, functions, and more from all your sources. jq, for code.
Cat functions from files with autocomplete
Use with | less -R
to page output while preserving colors.
$ npm i -g sourcecrop@latest
It's perfect for:
- Quickly navigating through large projects.
- Isolating and selecting specific code blocks.
- Reviewing or refactoring targeted parts of your code with precision.
SC is designed to (eventually) let you traverse code the same way jq slices JSON, with similar flexibility and power. Right now it just supports autcomplete through functions of JavaScript files in latest ECMAScript ESM syntax.
Or target specific functions or blocks:
sc <file.js> [press tab for autocomplete of function names]
- Add support for languages other than the latest JavaScript ESM syntax.
- Correct -listCallers, -listCallees, calls- and by- implementations.
- Add some syntax (?) for other parts like: branches, definitions, but avoid stuff that could be done easily with grep.
Yes please!