Neovim/lua/keymap.lua

147 lines
3.0 KiB
Lua
Raw Normal View History

2024-03-01 17:57:06 +00:00
return {
{
2024-05-16 22:30:15 +00:00
{ "i", "x", "n", "s" },
"<C-s>",
"<cmd>w<cr><esc>",
{ desc = "Save file" },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<C-t>",
"<cmd>enew<cr>",
{ desc = "New File" },
2024-03-01 17:57:06 +00:00
},
{
2024-05-16 22:30:15 +00:00
{ "n", "i" },
"<C-z>",
"<cmd>u<CR>",
{ desc = "Undo" },
2024-03-01 17:57:06 +00:00
},
{
2024-05-16 22:30:15 +00:00
{ "n", "i" },
"<C-y>",
"<cmd>redo<CR>",
{ desc = "Undo" },
2024-03-01 17:57:06 +00:00
},
{
2024-05-16 22:30:15 +00:00
{ "n", "i" },
"<S-tab>",
"<cmd><<CR>",
{ desc = "Remove Tab" },
2024-03-01 17:57:06 +00:00
},
{
2024-05-16 22:30:15 +00:00
{ "n", "i" },
"<C-g>",
"<cmd>Telescope<CR>",
{ desc = "Open Telescope" },
2024-03-01 17:57:06 +00:00
},
{
2024-05-16 22:30:15 +00:00
{ "n", "i" },
"<S-ScrollWheelUp>",
"<ScrollWheelLeft>",
{ desc = "Scroll sideways" },
2024-03-01 17:57:06 +00:00
},
{
2024-05-16 22:30:15 +00:00
{ "n", "i" },
"<S-ScrollWheelDown>",
"<ScrollWheelRight>",
{ desc = "Scroll sideways" },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<S-Tab>",
"<cmd>BufferPrevious<CR>",
{ desc = "Next Tab", silent = false },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<Tab>",
"<cmd>BufferNext<CR>",
{ desc = "Previous Tab", silent = false },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<C-w>",
"",
{ desc = "Disable STRG+w" },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<C-w>v",
"<cmd>vsplit<CR>",
{ desc = "Split Vertical", noremap = true },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<C-w>h",
"<cmd>split<CR>",
{ desc = "Split Horizontal", noremap = true },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
2024-04-16 12:13:38 +00:00
"q",
"<cmd>BufferClose<CR>",
2024-04-16 12:13:38 +00:00
{ desc = "Quit Buffer" },
},
{
{ "n" },
"<C-w>q",
"<cmd>quit<CR>",
{ desc = "Quit Window" },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<C-w><Left>",
"<cmd>wincmd h<CR>",
{ desc = "Window Left" },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<C-w><Down>",
"<cmd>wincmd j<CR>",
{ desc = "Window Down" },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<C-w><Up>",
"<cmd>wincmd k<CR>",
{ desc = "Window Up" },
2024-03-01 17:57:06 +00:00
},
{
{ "n" },
"<C-w><Right>",
"<cmd>wincmd l<CR>",
{ desc = "Window Right" },
2024-03-15 17:29:30 +00:00
},
{
2024-05-16 22:30:15 +00:00
{ "n", "i" },
"<C-b>",
"<cmd>NvimTreeToggle<CR>",
{ desc = "Toggle Neotree" },
2024-03-26 10:23:47 +00:00
},
{
{ "n" },
":",
"<cmd>Telescope cmdline<CR>",
{ noremap = true, desc = "Open Cmdline" },
2024-03-26 10:23:47 +00:00
},
{
{ "n" },
"<leader><leader>",
"<cmd>Telescope cmdline<CR>",
{ noremap = true, desc = "Open Cmdline" },
},
2024-04-13 11:12:50 +00:00
{
{ "v" },
"i",
"<esc>i",
{ noremap = true, desc = "Switch from Visual to Insert mode" },
},
{
{ "n" },
"<C-f>",
"<cmd>Telescope current_buffer_fuzzy_find<CR>",
{ noremap = true, desc = "Find" },
2024-05-16 22:30:15 +00:00
}
2024-03-01 17:57:06 +00:00
}