Thanks to visit codestin.com
Credit goes to github.com

Skip to content

thomasschafer/scooter.hx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scooter.hx

scooter.hx is a find-and-replace plugin for Helix.

Search with either a fixed string or a regular expression, enter a replacement, and interactively toggle which instances you want to replace.

If the instance you're attempting to replace has changed since the search was performed, e.g. if you've switched branches and that line no longer exists, that particular replacement won't occur: you'll see all such cases at the end.

scooter.hx preview

Usage

This plugin provides the following commands (which you can bind a keymap to in the usual way):

  • :scooter - resume an existing session if one exists, or otherwise start a new session
  • :scooter-new - start a new session, cancelling any in-progress operations

Once open, you can hit escape to hide the window (and open it again with :scooter), or ctrl-c to quit and cancel any in-progress searches/replacements.

When viewing the search results, you can hit e to open up one of the results (keeping the existing session running). You can also use <alt>-e to open a search result in the background, without hiding the window.

Installation

Follow the instructions here to install Helix on the plugin branch.

Then, install the plugin with one of the installation methods below.

Once installed, you can add the following to init.scm in your Helix config directory:

(require "scooter/scooter.scm")

Using Forge

Forge is the Steel package manager, and will have been installed in the previous step. Run the following:

forge pkg install --git https://github.com/thomasschafer/scooter.hx.git

Building from source

  1. Clone and cd into this repo and run cargo steel-lib
  2. Add (require "<path>/scooter.hx/scooter.scm") to init.scm in your Helix config (where <path> is the absolute path of the folder containing the scooter.hx repo)

About

Interactive find-and-replace Helix plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •