-- this file contains general remappings for this nvim configuration local opt = { noremap = true, silent = true } local map = vim.api.nvim_set_keymap map("", "\\", "", opt) vim.g.mapleader = "\\" -- some minor commands map("c", "w!!", "w !sudo tee % > /dev/null", opt) -- remap j and k -- i refuse to elaborate map("n", "j", "", opt) map("n", "k", "", opt) -- window navigation map("n", "", "l", opt) map("n", "", "k", opt) -- SWITCHED K AND J map("n", "", "j", opt) -- SWITCHED K AND J map("n", "", "h", opt) -- Insert mode navigation map("i", "", "", opt) map("i", "", "", opt) -- SWITCHED K AND J map("i", "", "", opt) -- SWITCHED K AND J map("i", "", "", opt) -- lexer options..? map("n", "e", ":Lex 49", opt) -- resizing options map("n", "", ":vertical resize -5", opt) map("n", "", ":resize +5", opt) map("n", "", ":vertical resize +5", opt) map("n", "", ":resize -5", opt) -- better indentation map("v", "<", "", ">gv", opt) -- moving lines map("n", "", ":m .-2==", opt) -- SWITCHED K AND J map("n", "", ":m .+1==", opt) -- SWITCHED K AND J -- duplicating lines map("n", "", ":.,.t.-1==", opt) map("n", "", ":.,.t.==", opt) -- leader remaps map("n", "/", ":nohlsearch", opt) -- discard search highlighting map("n", "T", ":term", opt) -- open terminal fullscreen with \T map("n", "t", ":vsplit term ", opt) -- split to terminal with \t map("n", "pl", ":Lazy", opt) -- open plugin manager -- miscellaneous map("n", "relaod", ":luafile ~/.config/nvim/lua/init.lua", {noremap = false})