-- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here -- Shorten function name function map(mode, lhs, rhs, opts) local options = vim.tbl_extend('force', { noremap = true, silent = true }, opts or {}) vim.api.nvim_set_keymap(mode, lhs, rhs, options) end -- Modes -- normal_mode = "n", -- insert_mode = "i", -- visual_mode = "v", -- visual_block_mode = "x", -- ten -- duplicate line down map('i', '', ':normal! yypi') map('n', '', 'yyp') -- Tab indent map('n', '', '>>') map('n', '', '<<') -- select map('n', '', 'v') -- undo last map('n', '', ':undo') map('i', '', ':undoa') -- Terminal open and close -> broken map('n', '', ':terminal') map('i', '', ':terminal') map('t', '', ':q') -- Toggle comments with Ctrl + ' -> broken map('n', "", ':normal gcc') --map('n', "", ':Telescope find_files') map('i', "", ':normal gcci') -- Open telescope map('i', '', ':Telescope find_files') --- Move line up and down map("n", "", ":m .+1==") -- move line down(n) map("n", "", ":m .-2==") -- move line up(n) map("v", "", ":m '>+1gv=gv") -- move line down(v) map("v", "", ":m '<-2gv=gv") -- move line up(v)