Neovim/lua/keymaps.lua

18 lines
504 B
Lua
Raw Normal View History

2024-02-23 18:23:02 +00:00
-- Custom keymaps
2023-11-17 11:24:21 +00:00
2024-02-23 18:23:02 +00:00
local map = vim.keymap.set
2023-11-17 11:24:21 +00:00
-- save file on <STRG + S>
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
-- new file
map("n", "<C-t>", "<cmd>enew<cr>", { desc = "New File" })
2024-02-23 18:23:02 +00:00
map({ 'n', 'i' }, '<C-z>', '<cmd>u<CR>') -- undo with STRG + z
map({ 'n', 'i' }, '<C-y>', '<cmd>redo<CR>') -- redo with STRG + y
2023-11-17 11:24:21 +00:00
2024-02-23 18:23:02 +00:00
-- Shift + Tab remove one tab
2023-11-17 11:24:21 +00:00
map({ 'n', 'i' }, '<S-tab>', '<cmd><<CR>')
2024-02-23 18:23:02 +00:00
map({ 'n', 'i' }, '<C-g>', '<cmd>Telescope<CR>', { noremap = true })