Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to quickly switch both panels in 'compare' mode #32

Open
vlmarek opened this issue May 23, 2017 · 1 comment
Open

Ability to quickly switch both panels in 'compare' mode #32

vlmarek opened this issue May 23, 2017 · 1 comment

Comments

@vlmarek
Copy link

vlmarek commented May 23, 2017

More often I find myself switching between "one <-> result" and and "original <-> two". I am copying the changes from "Original <-> two" into "one <-> result". The diff between "original <-> result" is not very helpful as it shows too many differences. I thought it would be nice to have simple way of switching the two views.

At the moment I am using these two command lines to achieve that:

:exe 2 . "wincmd w" | call splice#SpliceOriginal() | :exe 3 . "wincmd w" | call splice#SpliceTwo()

and

:exe 2 . "wincmd w" | call splice#SpliceOne() | :exe 3 . "wincmd w" | call splice#SpliceResult()
@errael
Copy link

errael commented Jul 17, 2024

Hi @vlmarek

I've just released Splice9; it's pure vim9script, no python; it's compatible with the original Splice with additional features, particularly UI. I've addressed some issues against the original Splice (see below) and I'm wondering about this issue.

Did you put the workarounds you have into mappings? Wouldn't this be equivalent to having a builtin way to "quickly switch"?

Splice9 has a bind_extra configurable. Considering this issue, I'm wondering having user defined mappings, maybe a bind_user configurable list similar to bind_extra. So you could add something like the following.

    bind_user = [
        '<F1>', ':exe 2 .. "wincmd w" | call splice#SpliceOriginal() | :exe 3 . "wincmd w" | call splice#SpliceTwo()',
        '<F2>', ':exe 2 .. "wincmd w" | call splice#SpliceOne() | :exe 3 . "wincmd w" | call splice#SpliceResult()'
    ]

Feature: #30, #15, errael/splice9#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants