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
Add extras for filetype workflow #53
base: master
Are you sure you want to change the base?
Conversation
leiserfg
commented
Jan 15, 2023
- Automate tests
- Add extras for filetype workflow
This PR includes the other one in order to add the tests. vim.keymap.set("n", "<C-A>", dm.inc_normal(group_from_ft), { noremap = true }) It's a bit hacky but does not require internal changes, actually, it's the same I'm already doing locally. |
I had to remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check one thing. Is the dot repeat functionality preserved?
In my environment, dot repeat does not seem to work.
Note that removing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Dot repeating feature is still not working.
For example, suppose you have a buffer consisting of two lines and you want to increment two numbers in each line:ten: 10 one hundred: 100
When you increment
10
at line 1 by<C-a>
and then increment100
at line 2 by dot repeat, you should get an error.
This is because the text object for operator is not being handled properly and the range is not being updated.For detailed behavior, please read
:h dial-dot-repeating
and follow it. -
Please clarify why the code around
lua/dial/map.lua
needs to be modified.
In particular, does it worthwhile to usenvim_feedkeys
function?
Thenvim_feedkeys
function is difficult to predict the behavior, making debugging and maintenance hard.
If you are more familiar with the function-based I/F than key-map-string-based I/F, you can use thenormal
command, like:vim.keymap.set("n", "<C-a>", function() local cmd = vim.api.nvim_replace_termcodes(require("dial.map").inc_normal(), true, true, true) vim.cmd.normal { cmd } end, { noremap = true })
I will prefer not to have to change the map function, but the issue is that there you are composing a string to be used in the mapping but within a string you can't encode a lua closure. So I'm trying to replicate the behavior in pure lua.
Yes, but the |
The issue is not the motion, but anyway should not the |
Now that I understand a little more what you want to achieve, I have created another PR, #56. |