mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(terminal): term toggle key <c-/> now only work for terminals opened by itself
And `gco`/`gcO` keymaps now use blackhole register to avoid overwriting default register.
This commit is contained in:
parent
c64a61734f
commit
784649d4dd
1 changed files with 14 additions and 4 deletions
|
|
@ -85,8 +85,8 @@ map("x", "<", "<gv")
|
|||
map("x", ">", ">gv")
|
||||
|
||||
-- commenting
|
||||
map("n", "gco", "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Below" })
|
||||
map("n", "gcO", "O<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Above" })
|
||||
map("n", "gco", 'o<esc>V"_cx<esc><cmd>normal gcc<cr>fxa<bs>', { desc = "Add Comment Below" })
|
||||
map("n", "gcO", 'O<esc>V"_cx<esc><cmd>normal gcc<cr>fxa<bs>', { desc = "Add Comment Above" })
|
||||
|
||||
-- lazy
|
||||
map("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Lazy" })
|
||||
|
|
@ -189,8 +189,18 @@ map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim
|
|||
-- floating terminal
|
||||
map("n", "<leader>fT", function() Snacks.terminal() end, { desc = "Terminal (cwd)" })
|
||||
map("n", "<leader>ft", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" })
|
||||
map({"n","t"}, "<c-/>",function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" })
|
||||
map({"n","t"}, "<c-_>",function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "which_key_ignore" })
|
||||
map({ "n", "t" }, "<c-/>", function()
|
||||
Snacks.terminal(nil, {
|
||||
cwd = LazyVim.root(),
|
||||
win = { keys = { hide_slash = { "<c-/>", "hide", desc = "Hide Terminal", mode = "t" } } },
|
||||
})
|
||||
end, { desc = "Terminal (Root Dir)" })
|
||||
map({ "n", "t" }, "<c-_>", function()
|
||||
Snacks.terminal(nil, {
|
||||
cwd = LazyVim.root(),
|
||||
win = { keys = { hide_underscore = { "<c-_>", "hide", desc = "which_key_ignore", mode = "t" } } },
|
||||
})
|
||||
end, { desc = "which_key_ignore" })
|
||||
|
||||
-- windows
|
||||
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue