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

@ -1,4 +1,5 @@
alias a="tmux new-session -A -s main"
alias cz="chezmoi"
alias gs="git status"
alias pkgedit="nvim ~/.config/mgmt/packages"
alias v="nvim"

View file

@ -10,9 +10,9 @@ missing=()
check_apply() {
while IFS= read -r package; do
cmd=$(echo "$package" | cut -d\; -f1)
pkg=$(echo "$package" | grep -Eo "$(_os):[^ ]+" || echo ":$cmd")
pkg=$(echo "$package" | grep -Eo "$(_os):[^ ]*" || echo ":$cmd")
pkg=$(echo "$pkg" | cut -d: -f2)
[ -n "$pkg" ] || next
[ -n "$pkg" ] || continue
command -v "$cmd" >/dev/null || missing+=( "$pkg" )
done < ~/.config/mgmt/packages

View file

@ -1,3 +1,6 @@
entr
git
make
nvim; termux:neovim arch:neovim ubuntu:
tailscale; termux:
tmux

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 = {