Skip to content

iamb: Mapping Modes #179

Description

@fuguesoft

Duplicate of ulyssa/iamb #411

This request is a bit complicated to explain. Essentially I would like to be able to specify which commands go to which types of buffers/windows.

For example, from anywhere in normal mode, I could <S-j> to move the cursor down in the last active Rooms window. Conversely, <S-k> would move the cursor up. I could of course specify the bindings in my config:

[global_macros.normal]
channel_cursor = {
    target = "window_class.rooms"
    binding = {
        <S-j> = "cursor down"
        <S-k> = "cursor up"
    }
}

Another example would be being able to configure commands specifically for scrollback:

[global_macros.normal]
scrollback_cursor = {
    target = "window_class.scrollback"
    binding = {
        "a" = ":react" # React to a message
        "d" = ":redact<CR>" # Redact a message
        "e" = ":edit<CR>" # Edit a message
        "o" = ":open<CR>" # Open a link
        "r" = ":reply<CR>" # Reply to a message
    }
}

I don't know how the modes/windows/buffers are all configured now but it might be too extreme a rewrite to do something like this

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions