Neovim/lua/keymap.lua

58 lines
1.6 KiB
Lua
Raw Normal View History

2024-03-01 17:57:06 +00:00
return {
{
{ 'i', 'x', 'n', 's' }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" }
},
{
{ 'n' }, "<C-t>", "<cmd>enew<cr>", { desc = "New File" }
},
{
{ 'n', 'i' }, '<C-z>', '<cmd>u<CR>', { desc = "Undo" }
},
{
{ 'n', 'i' }, '<C-y>', '<cmd>redo<CR>', { desc = "Undo" }
},
{
{ 'n', 'i' }, '<S-tab>', '<cmd><<CR>', { desc = "Remove Tab" }
},
{
{ 'n', 'i' }, '<C-g>', '<cmd>Telescope<CR>', { desc = "Open Telescope" }
},
{
{ 'n', 'i' }, '<S-ScrollWheelUp>', '<ScrollWheelLeft>', { desc = "Scroll sideways" }
},
{
{ 'n', 'i' }, '<S-ScrollWheelDown>', '<ScrollWheelRight>', { desc = "Scroll sideways" }
},
{
{ 'n' }, "<S-Tab>", "<Plug>(cokeline-focus-prev)", { desc = "Next Tab", silent = false }
},
{
{ 'n' }, "<Tab>", "<Plug>(cokeline-focus-next)", { desc = "Previous Tab", silent = false }
},
{
{ 'n' }, '<C-w>', '', { desc = "Disable STRG+w" }
},
{
{ 'n' }, '<C-w>v', '<cmd>vsplit<CR>', { desc = "Split Vertical", noremap = true }
},
{
{ 'n' }, '<C-w>h', '<cmd>split<CR>', { desc = "Split Horizontal", noremap = true }
},
{
{ 'n' }, '<C-w>q', '<cmd>q<CR>', { desc = "Quit Window" }
},
{
{ 'n' }, '<C-w><Left>', '<cmd>wincmd h<CR>', { desc = "Window Left" }
},
{
{ 'n' }, '<C-w><Down>', '<cmd>wincmd j<CR>', { desc = "Window Down" }
},
{
{ 'n' }, '<C-w><Up>', '<cmd>wincmd k<CR>', { desc = "Window Up" }
},
{
{ 'n' }, '<C-w><Right>', '<cmd>wincmd l<CR>', { desc = "Window Right" }
}
}