The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

contextFind

CRAN_Status_Badge R CMD Check

The goal of contextFind is to help developers find relevant parts of their code, especially helpful when code expands beyond a single file, such as with Shiny applications.

The package includes an addin to bind contextFind() to a hotkey (e.g., Ctrl+Shift+F). This opens a mini shiny application with inputs for the search string, the directory, whether to search subdiretories, and how many lines of context to print before and after the found search string:

Clicking the contextFind button prints the results to the console. For each result (match), contextFind() provides a clickable labelled link indicating the file and line number of the result, followed by contextLines=2 lines before and after the occurrence, with the found string highlighted in yellow. The results are ordered with most recently modified files at the bottom of the list for ease of reading in the console.

Installation

You can install the latest version of contextFind from GitHub with:

devtools::install_github("s87jackson/contextFind")

or the CRAN stable release with:

install.packages("contextFind")

Use

After installing contextFind, restart RStudio, then set contextFind to a hotkey by selecting Tools >> Modify Keyboard Shortcuts:

Now typing Ctrl+Shift+F opens the gadget to perform the search. If text is higlighted when you type the hotkey, it will be passed to the gadget automatically. In the example below, we search for the string ‘selected’ and see the results:

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.