Skip to content

Commit

Permalink
map ctrl+c to esc fix #209
Browse files Browse the repository at this point in the history
  • Loading branch information
zztrieuzz committed Mar 19, 2024
1 parent d1db6c1 commit 1d23be1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/spectre/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ function M.mapping_buffer(bufnr)
api.nvim_buf_set_keymap(bufnr, 'v', 'p', "p<cmd>lua require('spectre').on_search_change()<cr>", map_opt)
api.nvim_buf_set_keymap(bufnr, 'v', 'P', "P<cmd>lua require('spectre').on_search_change()<cr>", map_opt)
api.nvim_buf_set_keymap(bufnr, 'n', 'd', '<nop>', map_opt)
api.nvim_buf_set_keymap(bufnr, 'i', '<c-c>', '<esc>', map_opt)
api.nvim_buf_set_keymap(bufnr, 'v', 'd', '<esc><cmd>lua require("spectre").toggle_checked()<cr>', map_opt)
api.nvim_buf_set_keymap(bufnr, 'n', 'o', 'ji', map_opt) -- don't append line on can make the UI wrong
api.nvim_buf_set_keymap(bufnr, 'n', 'O', 'ki', map_opt)
Expand Down

0 comments on commit 1d23be1

Please sign in to comment.