-
Notifications
You must be signed in to change notification settings - Fork 5
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
Pressing cut
key quickly after visual selection doesn't place in register
#26
Comments
Hey! Can you share you're config ? Can you also share the result of Also, fyi, if you want to quickly cut a line, you can just use |
Hopefully it's not too much trouble. It certainly doesn't seem like this particular plugin's issue, so please don't sink too much time into it! For sure about But thank you so much! Here's the pared down config I was using for testing. It's just the -- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
{
"gbprod/cutlass.nvim",
opts = {
cut_key = "x",
override_del = true,
exclude = { "ns", "nS" },
},
},
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "tokyonight" } },
-- automatically check for plugin updates
checker = { enabled = true },
}) |
Also sorry, totally spaced on answering your other questions!
|
Hello!
I posted on the
vim
StackExchange and unfortunately didn't really get much help beyond "make an issue in the plugin repo," so apologies if this ends up not being an issue with this plugin specifically. I was unable to get any more info about a potential underlying issue/limitation with the approach this and similar vim plugins take.A common thing I run into is that I want to
cut
a line and want to hold it in a register while I move around and delete other things. What I usually do isV
and thenx
(assigned as thecut
key in my config). I then do whatever other deleting withd
and then eventually go top
the content I cut. Depending on how quickly I pressx
afterV
, it may not actually overwrite what was previously in the register.Screen.Recording.2025-01-29.at.11.32.53.AM.mov
In this example, I'm first yanking the plugin name. I paste it just to show it's in the register. Then I cut a few other lines quickly and paste. You can see that it uses the initial line that I yanked. The last part is me pausing after the visual selecting and then cutting. That does properly update the register.
I tried this with https://github.com/svermeulen/vim-cutlass and did see the same behavior. Hence my asking in the StackExchange, thinking it might be some "issue" or bug with vim itself with how these remappings are done. But I was told to come here, so hopefully that's not too annoying.
Any insight would be greatly appreciated. Thank you 😄
The text was updated successfully, but these errors were encountered: