gbprod / cutlass.nvim

Plugin that adds a 'cut' operation separate from 'delete'
Do What The F*ck You Want To Public License
196 stars 5 forks source link

Delete does not fill clipboard but change does #24

Closed JesperLundberg closed 3 weeks ago

JesperLundberg commented 1 month ago

This plugin does what it says it should do but only almost.

For delete and del-key (x in my case) it does not change the yank registry - as it should.

But for change it does.

My setup looks like this:

    {
        -- Delete, change etc does not overwrite clipboard content
        "gbprod/cutlass.nvim",
        opts = {
            -- x (or delete) will NOT cut to the clipboard
            override_del = true,
            -- do not use s S mappings (to not override leap.nvim)
            exclude = { "ns", "nS" },
        },
        event = "VeryLazy",
    },

I am running NVIM v0.10.1 Build type: Release LuaJIT 2.1.1725453128

On an M1 mac with MacOs Sonoma 14.6.1.

How do I get change (c) to not overwrite the clipboard?

gbprod commented 1 month ago

Hi !

I think you misunderstand the override_del option, it will only override the <Del> key, not the x key. But anyway, this plugin also override the x key by default.

I suspect here that you should not use event = "VeryLazy" option, can you try without ?

JesperLundberg commented 1 month ago

Oh, so I don't need override_del then. That's good. :)

I already have and then the plugin is not loaded at all.

I also just tried lazy = false (which means that the plugin is loaded as soon as possible (i.e. no lazy loading).

The odd thing is that for delete it works as it should but for change it does not send the changed to the black hole registry, it sets it to the paste registry (the registry that is pasted from, yank registry I guess it is).

So, the plugin works... but not fully. Super odd.

JesperLundberg commented 3 weeks ago

I found out the issue I had which was wholly unrelated to this plugin.

Closing the issue.