nvim and tmux styling

This commit is contained in:
Robert Perce 2026-01-31 17:43:09 -06:00
parent 21127d307d
commit f5949b3d50
4 changed files with 41 additions and 3 deletions

View file

@ -17,10 +17,44 @@ vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
vim.opt.hlsearch = false
vim.opt.whichwrap:append("<,>,h,l")
vim.opt.listchars = 'tab:┆-,trail:~,extends:>,precedes:<,nbsp:•'
vim.opt.list = true
vim.opt.expandtab = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
vim.opt.splitbelow = true
vim.opt.splitright = true
function tblmerge(x, y) for k,v in pairs(y) do x[k] = v end return x end
local function map(mode, lhs, rhs, opts) vim.api.nvim_set_keymap(mode, lhs, rhs, tblmerge({ noremap = true, silent = true}, opts or {})) end
function nmap(l, r, opt) map('n', l, r, opt) end
function imap(l, r, opt) map('i', l, r, opt) end
function vmap(l, r, opt) map('v', l, r, opt) end
-- Treat long lines as broken lines so you can move in them
nmap('j', 'gj')
nmap('k', 'gk')
-- maintain visual selection when changing indentation
vmap('<', '<gv')
vmap('>', '>gv')
nmap("<Leader>w", ":w<CR>")
nmap("<Leader>tn", ":tabnew<CR>")
nmap('<Leader>te', ':tabedit <c-r>=expand("%:p:h")<cr>/<cr>')
-- Setup lazy.nvim
require("lazy").setup({
spec = {