#53 <BS> remap for rename

neovim_0_5
ray-x 3 years ago
parent 5b65d8f389
commit be888b94a1

@ -301,7 +301,7 @@ require'navigator'.setup({
| n | \<Leader\>gT | treesitter symbol for all open buffers |
| n | K | hover doc |
| n | \<Space\>ca | code action (when you see 💡 ) |
| n | \<Space\>la | code lens action (when you see codelens indicator) |
| n | \<Space\>la | code lens action (when you see a codelens indicator) |
| v | \<Space\>cA | range code action (when you see 💡 ) |
| n | \<Space\>rn | rename with floating window|
| n | \<Leader\>re | rename (lsp default)|

@ -21,10 +21,11 @@ M.rename = function()
border = "single"
})
vim.api.nvim_win_set_option(winnr, "winhl", "Normal:Floating")
vim.api.nvim_buf_set_option(bufnr, "filetype", "guihua")
util.map("n", "<ESC>", "<cmd>bd!<CR>", {silent = true, buffer = true})
util.map({"n", "i"}, "<CR>", "<cmd>lua require('navigator.rename').callback()<CR>",
{silent = true, buffer = true})
util.map("i", "<BS>", "<ESC>xi", {silent = true, buffer = true})
util.map({"n", "i"}, "<BS>", [[<ESC>"_cl]], {silent = true, buffer = true})
vim.cmd(string.format("normal i%s", current_name))
end

Loading…
Cancel
Save