Skip to content
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

Rewrite #61

Open
max397574 opened this issue Jun 9, 2024 · 0 comments
Open

Rewrite #61

max397574 opened this issue Jun 9, 2024 · 0 comments

Comments

@max397574
Copy link
Owner

If you don't want the rewrite pin the v1.0.0 tag or the commit 7e86edafb8c7e73699e0320f225464a298b96d12.
There was a big rewrite which allows much more flexibility now.
You can now define mappings in most modes and also use functions.

The biggest change was that the mapping config option was removed.
Check the default configuration below to see the new structure.

This also deprecated the clear_empty_lines setting.
You can replicate this behavior with a function like this:

k = function()
    vim.api.nvim_input("<esc>")
    local current_line = vim.api.nvim_get_current_line()
    if current_line:match("^%s+j$") then
        vim.schedule(function()
            vim.api.nvim_set_current_line("")
        end
    end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant