Skip to content

Helix plugin to bookmark files and quickly switch between them

License

Notifications You must be signed in to change notification settings

gllms/streal.hx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

streal.hx

A Helix plugin to bookmark files and quickly switch between them using numbers. Every working directory (and optionally every Git branch) has its own distinct list. Heavily inspired by otavioschwanck/arrow.nvim.

Feedback and ideas are very much welcome, feel free to create a new issue and share your thoughts.

Warning

Critical bugs and breaking changes may occur at any time, especially while this plugin is pre 1.0. Use at your own risk.

Screenshot

Usage

First, open the streal popup by using the :streal-open typable command or a hotkey you bound to it (see Installation), for example \. This will show the list of files for the current working directory. Now you can use any of the following hotkeys to interact with it:

Key Description
s Add / remove current file
1..9 Open file
Esc, q Close popup
C Clear list
h Open in horizontal split
v Open in vertical split
d Delete mode
e Edit current Streal file
? Show keymap

In delete mode, activated by pressing d, any number you press will remove that file from the list. The popup will stay open, so you can easily remove multiple files this way.

You can quickly edit the list by pressing e. This will open the Streal file in a buffer so you can add, remove and reorder paths at your will.

Installation

  1. Make sure your Helix version is compiled with the Steel plugin system, see here for instructions.

  2. You can then install this plugin using the Forge package manager:

    forge pkg install --git https://github.com/gllms/streal.hx.git
  3. Add the following line to your init.scm:

    (require "streal/streal.scm")
  4. Now the :streal-open typable command will be available. You can bind this to a key in your config.toml. For example, to bind it to \:

    [keys.normal]
    "\\" = ":streal-open"
    
    [keys.select]
    "\\" = ":streal-open"

Configuration

To configure the plugin you can append the following command flags to the :streal-open command:

Command flag Description
--per-branch Keep a separate Streal file per Git branch. If no branch can be found, Streal will silently fall back to the default behaviour of using one file per working directory.

For example:

[keys.normal]
"\\" = ":streal-open --per-branch"

About

Helix plugin to bookmark files and quickly switch between them

Topics

Resources

License

Stars

Watchers

Forks