Added foldnav and modified keybinds
This commit is contained in:
1 parent
a928d12c0d
commit
59b58486cd
5 files changed
+57
-18
No files matched your search
+10
-10
@@ -16,18 +16,18 @@ keymap("", "<leader>cb", ":CMakeBuild<cr>", {})
|
||||
keymap("", "<leader>cq", ":CMakeClose<cr>", {})
|
||||
keymap("", "<leader>cc", ":CMakeClean<cr>", {})
|
||||
|
||||
keymap("", "<leader>nt", ":ToggleTerm<cr>", {})
|
||||
keymap("", "<leader>nt", ":ToggleTerm direction=tab<cr>", {})
|
||||
|
||||
function _G.set_terminal_keymaps()
|
||||
local opts = {buffer = 0}
|
||||
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
|
||||
vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
|
||||
vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
|
||||
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
|
||||
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
|
||||
vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
|
||||
vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
|
||||
local opts = { buffer = 0 }
|
||||
vim.keymap.set("t", "<esc>", [[<C-\><C-n>]], opts)
|
||||
vim.keymap.set("t", "jk", [[<C-\><C-n>]], opts)
|
||||
vim.keymap.set("t", "<C-h>", [[<Cmd>wincmd h<CR>]], opts)
|
||||
vim.keymap.set("t", "<C-j>", [[<Cmd>wincmd j<CR>]], opts)
|
||||
vim.keymap.set("t", "<C-k>", [[<Cmd>wincmd k<CR>]], opts)
|
||||
vim.keymap.set("t", "<C-l>", [[<Cmd>wincmd l<CR>]], opts)
|
||||
vim.keymap.set("t", "<C-w>", [[<C-\><C-n><C-w>]], opts)
|
||||
end
|
||||
|
||||
-- if you only want these mappings for toggle term use term://*toggleterm#* instead
|
||||
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
|
||||
vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()")
|
||||
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
"domharries/foldnav.nvim",
|
||||
version = "*",
|
||||
config = function()
|
||||
vim.g.foldnav = {
|
||||
flash = {
|
||||
enabled = true,
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<C-h>",
|
||||
function()
|
||||
require("foldnav").goto_start()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"<C-j>",
|
||||
function()
|
||||
require("foldnav").goto_next()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"<C-k>",
|
||||
function()
|
||||
require("foldnav").goto_prev_start()
|
||||
end,
|
||||
},
|
||||
-- { "<C-k>", function() require("foldnav").goto_prev_end() end },
|
||||
{
|
||||
"<C-l>",
|
||||
function()
|
||||
require("foldnav").goto_end()
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user