local opts = { noremap = true, silent = true } vim.g.mapleader = " " vim.g.maplocalleader = " " vim.opt.backspace = "2" vim.opt.showcmd = true vim.opt.laststatus = 2 vim.opt.autowrite = true vim.opt.cursorline = true vim.opt.autoread = true -- spaces for tabs vim.opt.tabstop = 2 vim.opt.shiftwidth = 2 vim.opt.shiftround = true vim.opt.expandtab = true -- split position vim.opt.splitbelow = true vim.opt.splitright = true -- :terminal shell if (vim.loop.os_uname().sysname == "Linux") then vim.opt.shell = "zsh" else vim.opt.shell = "pwsh" end -- nvimtree vim.keymap.set("n", "e", ":NvimTreeFindFileToggle", opts) -- splits vim.keymap.set("n", "", ":wincmd k", opts) vim.keymap.set("n", "", ":wincmd j", opts) vim.keymap.set("n", "", ":wincmd h", opts) vim.keymap.set("n", "", ":wincmd l", opts) -- resize split vim.keymap.set("n", "", ":vertical resize +1", opts) vim.keymap.set("n", "", ":vertical resize -1", opts) vim.keymap.set("n", "", ":resize -1", opts) vim.keymap.set("n", "", ":resize +1", opts) -- make split vim.keymap.set("n", "nsv", ":vsplit", opts) vim.keymap.set("n", "nsh", ":split", opts) -- terminal --vim.keymap.set("n", "t", ":split :terminal") vim.keymap.set("n", "t", ":FloatermToggle") vim.keymap.set("n", "g", ":FloatermNew --height=29 --width=120 lazygit") -- exit terminal with esc vim.keymap.set("t", "", "", opts) -- color picker vim.keymap.set("n", "", "PickColor", opts) vim.keymap.set("i", "", "PickColorInsert", opts)