-
Notifications
You must be signed in to change notification settings - Fork 29
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
Not picking up j/k repeating when using LazyVim distro #74
Comments
I was able to resolve by doing the following in my hardtime.lua plugin (per issue with another distro):
Are there any other change to LazyVim I need to make to ensure no conflicts with this issue and potentially any others? |
This kind of mapping only work for Vim-style mapping when using Example: vim.keymap.set({ "n", "x" }, "j", function()
return vim.v.count > 0 and "j" or "gj"
end, { noremap = true, expr = true })
vim.keymap.set({ "n", "x" }, "k", function()
return vim.v.count > 0 and "k" or "gk"
end, { noremap = true, expr = true }) |
For someone coming to this later on, this works without problem - {
'm4xshen/hardtime.nvim',
dependencies = { 'MunifTanjim/nui.nvim', 'nvim-lua/plenary.nvim' },
opts = {},
command = 'Hardtime',
event = 'BufEnter',
keys = {
{ 'n', 'j', '<cmd>Hardtime<CR>', desc = "Hardtime" },
{ 'n', 'k', '<cmd>Hardtime<CR>', desc = "Hardtime" },
{ 'n', 'gj', '<cmd>Hardtime<CR>', desc = "Hardtime" },
{ 'n', 'gk', '<cmd>Hardtime<CR>', desc = "Hardtime" },
},
}, |
@spa5k I this actually maps the "n" key to gk. You're fix worked for me until I searched for something and pressed n to cycle through the occurrences, but instead my cursor was just moving up the screen. It did fix j and k not working though, but I don't think it fixed it for the reason we thought it would and since n is now broken I don't think its an ideal fix. |
I've got this in my config:
However this only seems to work after I open a second file. Upon running |
This is my fix:
The first press of j or k doesn't do anything, after that they work as normal until blocked by hardtime. I feel like there should be a simpler fix though. Unfortunately I'm not super familiar with exactly how to setup plugins the lazy.nvim way and since this works I'm just gonna stick with it for now. |
This solution works. It's pretty much the same solution originally provided by @JamesMowery however it may be because this solution has |
Repeated h/j key presses are not being picked up when using LazyVim. Any advice on how to resolve?
The text was updated successfully, but these errors were encountered: