Skip to content

Cannot Use <C-w> in Renamer #554

@xyzpw

Description

@xyzpw

While in renamer, pressing <C-w> to delete the word will enter normal mode, it treats it like you are trying to enter a different window.
The renamer will be stuck on screen.

Steps to reproduce:

  • open renamer
  • press ctrl+w to try to delete the word
  • press 'j' or 'k'
video.mp4

A "fix" I have is to close the window once it loses focus:

-- after https://github.com/NvChad/ui/blob/3e67e9d5325fd47fdbc90ca00a147db2f3525754/lua/nvchad/lsp/renamer.lua#L74
vim.api.nvim_create_autocmd("WinLeave", {
    once = true,
    callback = function()
        if api.nvim_buf_is_valid(buf) then
            pcall(api.nvim_buf_delete, buf, { force = true })
        end
    end
})

But this doesn't solve the issue that I can't delete the whole word.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions