home: vim: use 'which-key'

This commit is contained in:
Bruno BELANYI 2022-02-26 14:44:52 +01:00
parent 9e7f7ed736
commit 4fec4d499d
5 changed files with 54 additions and 21 deletions

View file

@ -1,5 +1,10 @@
" Run make silently, then skip the 'Press ENTER to continue'
noremap <Leader>m :silent! :make! \| :redraw!<CR>
lua << EOF
local wk = require("which-key")
" Remove search-highlighting
noremap <Leader><Leader> :nohls<CR>
local keys = {
m = { "<cmd>silent! :make! | :redraw!<CR>", "Run make" },
["<leader>"] = { "<cmd>nohls<CR>", "Clear search highlight" },
}
wk.register(keys, { prefix = "<leader>" })
EOF