Conversation
|
It's a draft because I am not sure if there are any bugs. It seems to work fine though. Also because the commits are a mess. |
8b671db to
27cdac1
Compare
|
@max397574 What the point of Never mind it clears the mappings when |
27cdac1 to
65ff324
Compare
|
👀 busy this weekend, will look into it next week |
|
I should probably add some readme examples for this. I was waiting for #112 to be merged. |
4e1815c to
536211c
Compare
536211c to
9e077fd
Compare
|
turned out I was busy for more than one week 😅 Code looks good to me |
No, I actually haven't been coding that much for the last few weeks because of school, but I did test the code a bit. |
|
When I use not 100% sure yet what in the code causes this regression |
|
Uh, It also deletes the previous character on non empty lines. Found a fix though. |
|
Nvm the fix breaks if a key has multiple parents. |
|
somehow this also broke with this pr i = {
[" "] = {
["<TAB>"] = function()
vim.defer_fn(function()
vim.o.ul = vim.o.ul
require("luasnip").expand()
end, 1)
end,
},
},
}, |
|
How did it break ? What happens ? |
|
Oh the plugin maps " <Tab" as parents for the sequence " <Tab>". |
|
We could fix it by simply removing the multiple keys layout(13306ef) or dirty fix it by translating the key to escape codes then checking if the string changes. |
jj = false, -- disables both of these:
j = {
j = "<Esc>",
},
jj = "<Esc>"
|
Both issues should be fixed now. But there's still a bug where the plugin overdeletes if you map multiple special characters: i = {
["<Tab>"] = {
["<Tab>"] = "<Esc>",
},
},I don't think it's relevant enough to fix. |
|
perhaps we should just mention this somewhere in the readme |
I was gonna do that. I wanted to discuss it first in case you had a solution or if there was a use case for special characters that we could hardcode. Also I misunderstood the issue: the bug only happens if the special key is not the final key in a mapping, heres a better example: i = {
["<Tab>"] = {
j = "<Esc>",
},
}, |
fixes #106
Because you can make the preceded characters and set them to "" to disable the plugin:
This example fixes #106 (comment)