local wk = require("which-key") wk.register({ b = { ':Buffers', 'buffers', noremap = true, silent = true }, c = { name = '+nerd-commenter' }, d = { ':bd', 'close buffer', noremap = true, silent = false }, e = { ':Files', 'files', noremap = true, silent = true }, G = { ':FloatermNew lazygit', 'lazygit', noremap = true, silent = true }, h = { ':Startify', 'startify', noremap = true, silent = true }, k = { ':w:bp:bd #', 'write and close buffer', noremap = true, silent = false }, p = { ':CocList -A --normal yank', 'CoC paste', noremap = true, silent = true }, v = { ':FloatermNew vifm', 'vifm', noremap = true, silent = true }, w = { ':w', 'write buffer', noremap = true, silent = false }, x = { ':w:bp:bd #', 'write and close buffer', noremap = true, silent = false }, q = { name = '+coc-fix-current' }, r = { name = '+coc-rename' }, g = { name = 'grep', a = { ':Ag', 'the_silver_searcher', noremap = true, silent = true }, g = { ':Grep', 'grep', noremap = true, silent = true }, r = { ':Rg', 'ripgrep', noremap = true, silent = true }, }, }, { prefix = '' }) vim.keymap.set('n', 'M-;', ':call nerdcommenter#Comment(0,"toggle")', { noremap = true, silent = false }) vim.keymap.set('n', 'M-x', ':', { noremap = true, silent = false }) vim.keymap.set('n', '', ':bprevious', { noremap = true, silent = true }) vim.keymap.set('n', '', ':bnext', { noremap = true, silent = true }) vim.keymap.set('n', '', 'h', { noremap = true, silent = false }) vim.keymap.set('n', '', 'j', { noremap = true, silent = false }) vim.keymap.set('n', '', 'k', { noremap = true, silent = false }) vim.keymap.set('n', '', 'l', { noremap = true, silent = false }) vim.keymap.set('n', '', 'o', { noremap = true, silent = false }) vim.keymap.set('n', '', 'q', { noremap = true, silent = false }) vim.keymap.set('n', '*', '*zz', { noremap = true, silent = false }) vim.keymap.set('n', '', 'zz', { noremap = true, silent = false }) vim.keymap.set('n', '', 'zz', { noremap = true, silent = false }) vim.keymap.set('n', '', 'AirlineSelectTab1') vim.keymap.set('n', '', 'AirlineSelectTab2') vim.keymap.set('n', '', 'AirlineSelectTab3') vim.keymap.set('n', '', 'AirlineSelectTab4') vim.keymap.set('n', '', 'AirlineSelectTab5') vim.keymap.set('n', '', 'AirlineSelectTab6') vim.keymap.set('n', '', 'AirlineSelectTab7') vim.keymap.set('n', '', 'AirlineSelectTab8') vim.keymap.set('n', '', 'AirlineSelectTab9') vim.keymap.set('n', '', 'AirlineSelectTab10') vim.keymap.set('i', '', 'pumvisible() ? "" : ""', { expr = true }) vim.keymap.set('i', '', 'pumvisible() ? "" : ""', { expr = true }) vim.keymap.set('i', '', 'pumvisible() ? asyncomplete#close_popup() : "\\"', { expr = true }) vim.g.floaterm_keymap_toggle = '' vim.g.floaterm_keymap_prev = '' vim.g.floaterm_keymap_next = ''