优化快捷键
This commit is contained in:
parent
2c922d98ea
commit
4132ab5379
@ -1,17 +0,0 @@
|
|||||||
vim.g.mapleader = " "
|
|
||||||
|
|
||||||
# markdown
|
|
||||||
vim.keymap.set("n", "<leader>mks", "<cmd>MarkdownPreview<cr>", { silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>mkc", "<cmd>MarkdownPreviewStop<cr>", { silent = true })
|
|
||||||
|
|
||||||
# tree
|
|
||||||
vim.keymap.set("n", "<leader>ds", "<cmd>NvimTreeToggle<cr>", { silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>dc", "<cmd>NvimTreeClose<cr>", { silent = true })
|
|
||||||
|
|
||||||
# buffer
|
|
||||||
vim.keymap.set("n", "<leader>bp", "<cmd>BufferLineCyclePrev<cr>", { silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>bn", "<cmd>BufferLineCycleNext<cr>", { silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>bd", "<cmd>bd<cr>", { silent = true })
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7,7 +7,30 @@ return {
|
|||||||
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
-- 快捷键在这里定义
|
-- 快捷键在这里定义
|
||||||
wk.setup()
|
wk.register({
|
||||||
|
["<leader>"] = {
|
||||||
|
b = {
|
||||||
|
name="Buffer",
|
||||||
|
p={"<cmd>BufferLineCyclePrev<cr>", "Go to pre buffer"},
|
||||||
|
n={"<cmd>BufferLineCycleNext<cr>", "Go to next buffer"},
|
||||||
|
d={"<cmd>bd<cr>", "delete current buffer"}
|
||||||
|
},
|
||||||
|
m = {
|
||||||
|
name="Markdown",
|
||||||
|
k={
|
||||||
|
name="Markdown",
|
||||||
|
s={"<cmd>MarkdownPreview<cr>", "MarkdownPreview"},
|
||||||
|
c={"<cmd>MarkdownPreviewStop<cr>", "MarkdownPreviewStop"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
d = {
|
||||||
|
name="dirTree",
|
||||||
|
s={"<cmd>NvimTreeToggle<cr>", "show dir tree on left"},
|
||||||
|
c={"<cmd>NvimTreeClose<cr>", "hidden dir tree on left"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {silent = true, noremap = true})
|
||||||
|
wk.setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user