22 lines
805 B
Lua
22 lines
805 B
Lua
local map = vim.keymap.set
|
|
|
|
map({ 'n', 'i' }, '<C-g>', '<cmd>Telescope<CR>', { noremap = true })
|
|
|
|
-- save file on <STRG + S>
|
|
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
|
|
|
-- Resize window using <ctrl> arrow keys
|
|
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
|
|
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
|
|
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
|
|
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
|
|
|
|
-- new file
|
|
map("n", "<C-t>", "<cmd>enew<cr>", { desc = "New File" })
|
|
|
|
map({ 'n', 'i' }, '<C-z>', '<cmd>u<CR>')
|
|
map({ 'n', 'i' }, '<C-y>', '<cmd>redo<CR>')
|
|
|
|
-- shift back command
|
|
map({ 'n', 'i' }, '<S-tab>', '<cmd><<CR>')
|