Comments (6)
Yup you are right, i'm expecting the other one for normal mode to work normally where it can delete a blank line.
still tho the workaround is fine for me you can close this one! Thanks @m4xshen !
from hardtime.nvim.
Please make sure you update it to the lateset version and remove the event = "VeryLazy"
, which is not needed anymore.
See the updated README.
from hardtime.nvim.
Please make sure you update it to the lateset version and remove the
event = "VeryLazy"
, which is not needed anymore. See the updated README.
I noticed that now! Thank you so much for the awaited fix now only the rebind isn't working ^_^ i just updated few minutes ago.
from hardtime.nvim.
Could you please clarify again what the current issue after updating?
from hardtime.nvim.
Well its was the same as before on lazyvim i belive the keymap.lua is set afterwards all the plugins have loaded so maybe its conflicting with the reset keys used by hardtime on the resetting keys i removed the x here to reproduce,
if x is removed from resetting keys the remap of x works.
{
"m4xshen/hardtime.nvim", --hardtime practice
dependencies = "neovim/nvim-lspconfig",
opts = {
},
},
},
local map = require("config.util").map
map("v", "x", "_x", { noremap = true, silent = true, desc = "Delete character without yanking" })
map(
"n",
"x", -- Also let's allow 'x' key to delete blank lines in normal mode.
function()
if vim.fn.col(".") == 1 then
local line = vim.fn.getline(".")
if line:match("^%s*$") then
vim.api.nvim_feedkeys("dd", "n", false)
vim.api.nvim_feedkeys("$", "n", false)
else
vim.api.nvim_feedkeys('"_x', "n", false)
end
else
vim.api.nvim_feedkeys('"_x', "n", false)
end
end,
{ noremap = true, silent = true, desc = "Delete character without yanking" }
)
This is my current workaround
{
"m4xshen/hardtime.nvim", --hardtime practice
dependencies = "neovim/nvim-lspconfig",
opts = {
max_time = 2000,
max_count = 3,
resetting_keys = {
["1"] = { "n", "v" },
["2"] = { "n", "v" },
["3"] = { "n", "v" },
["4"] = { "n", "v" },
["5"] = { "n", "v" },
["6"] = { "n", "v" },
["7"] = { "n", "v" },
["8"] = { "n", "v" },
["9"] = { "n", "v" },
["c"] = { "n" },
["C"] = { "n" },
["d"] = { "n" },
-- ["x"] = { "n" },
["X"] = { "n" },
["y"] = { "n" },
["Y"] = { "n" },
["p"] = { "n" },
["P"] = { "n" },
},
},
},
from hardtime.nvim.
map("v", "x", "_x", { noremap = true, silent = true, desc = "Delete character without yanking" })
I think the right hand side of the map should be "_x
. You missed a "
.
from hardtime.nvim.
Related Issues (20)
- Question: disabling notifications in terminal HOT 1
- can't use C-A C-X to increment/decrement
- feat: daily / weekly / monthly hardtime report
- docs: add vim help file HOT 1
- refactor: plugin state variables
- Key bindings with Space as <leader> stop working HOT 3
- Provide lualine configuration example HOT 3
- Question: Location of `hardtime.nvim.log`
- Mouse is not re-enabled when entering buffer with buftype terminal
- Not picking up j/k repeating when using LazyVim distro HOT 4
- Suggest alternative when blocking repeated keys HOT 1
- Wrong hint message for `xi` HOT 6
- hardtime ignores keys mapped to hjkl HOT 2
- Hint timeout HOT 4
- When Installed, I get errors when using telescope HOT 5
- `xi` detected as `li` HOT 1
- Neoscroll compatability HOT 4
- Use D instead of d$ and Y instead of y$ HOT 2
- Feat: Customize popup window HOT 5
- filetype matching doesn't work for types with "-" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hardtime.nvim.