diff --git a/home/features/neovim/config/lua/my/abbreviations/math.lua b/home/features/neovim/config/lua/my/abbreviations/math.lua index aafc924..e51f0cd 100644 --- a/home/features/neovim/config/lua/my/abbreviations/math.lua +++ b/home/features/neovim/config/lua/my/abbreviations/math.lua @@ -2,17 +2,22 @@ local A = require("my.abbreviations") local scrap = require("scrap") local M = {} +local function nocap(d) + d.options = A.no_capitalization + return d +end + M.words = { -- {{{ General phrases - { "thrf", "therefore" }, - { "bcla", "by contradiction let's assume" }, - { "wlg", "without loss of generality" }, - { "tits", "that is to say," }, - { "wpbd", "we will prove the statement in both directions." }, - { "stam{,s}", "statement{}" }, + { "thrf", "therefore" }, + { "bcla", "by contradiction let's assume" }, + { "wlg", "without loss of generality" }, + { "tits", "that is to say," }, + { "wpbd", "we will prove the statement in both directions." }, + { "stam{,s}", "statement{}" }, { "{ww,tt}{m,i}", "{which,this} {means,implies}" }, - { "cex{,s}", "counterexample{}" }, - { "er{t,s,r}", "{transitivity,symmetry,reflexivity}" }, + { "cex{,s}", "counterexample{}" }, + { "er{t,s,r}", "{transitivity,symmetry,reflexivity}" }, -- }}} -- {{{ Special chars -- System for writing special characters which need to also be easly @@ -44,23 +49,24 @@ M.words = { }, -- }}} -- {{{ Calculus & analysis - { "ib{p,s}", "integration by {parts,substitution}" }, - { "nb{,h}{,s}", "neighbour{,hood}{}" }, + { "ib{p,s}", "integration by {parts,substitution}" }, + { "{o,c,}nb{,h}{,s}", "{open,closed,} neighbour{,hood}{}" }, + { + "{n,}{{c,}d,iv,it}ble", + "{non-,}{{continuously,} differentia,inverti,integra}ble", + }, + nocap({ "lshiz{c,}", "Lipschitz{ condition,}" }), -- }}} -- {{{ Linear algebra - { "rref", "reduced row echalon form" }, + { "rref", "reduced row echalon form" }, { "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" }, - { "mx{,s}", "matri{x,ces}" }, - { "dete{,s}", "determinant{}" }, - { "ort{n,g}", "orto{normal,gonal}" }, - { "l{in,de}", "linearly {independent,dependent}" }, - { "lcon{,s}", "linear combination{}" }, - { "vst{,s}", "vector space{}" }, -- text vector space - { - "rizz", -- ok please ignore this one 💀 - "Riesz vector", - options = A.no_capitalization, - }, + { "mx{,s}", "matri{x,ces}" }, + { "dete{,s}", "determinant{}" }, + { "ort{n,g}", "orto{normal,gonal}" }, + { "l{in,de}", "linearly {independent,dependent}" }, + { "lcon{,s}", "linear combination{}" }, + { "vst{,s}", "vector space{}" }, -- text vector space + nocap({ "rizz", "Riesz vector" }), -- 💀 -- }}} -- {{{ Differential equations -- Note: we must add the space inside the {} in order for capitalization to work! @@ -70,7 +76,7 @@ M.words = { }, -- }}} -- {{{ Graph theory - { "vx{,s}", "vert{ex,ices}" }, + { "vx{,s}", "vert{ex,ices}" }, { "edg{,s}", "edge{}" }, -- }}} } @@ -86,7 +92,7 @@ M.notation = { -- - "m" => - -- - "i" => -1 { - "{e,s}{{0,1,2,3,4,5,6,7,8,9,n,i,t,k},t{i,m,p}}", + "{e,s}{{0,1,2,3,4,5,6,7,8,9,n,i,t,k,m},t{i,m,p}}", "{^,_}{{},{\\{-1\\},-,+}}", }, -- }}} diff --git a/home/features/neovim/config/lua/my/abbreviations/unicode.lua b/home/features/neovim/config/lua/my/abbreviations/unicode.lua index 91c4486..f0db9f7 100644 --- a/home/features/neovim/config/lua/my/abbreviations/unicode.lua +++ b/home/features/neovim/config/lua/my/abbreviations/unicode.lua @@ -111,19 +111,20 @@ M.unicode = { { "Theta", "Θ" }, { "iota", "ι" }, { "kappa", "κ" }, - { "lambda", "λ" }, - { "Lambda", "Λ" }, + { "lam", "λ" }, + { "Lam", "Λ" }, { "mu", "μ" }, { "nu", "ν" }, { "xi", "ξ" }, { "pi", "π" }, { "Pi", "∏" }, { "rho", "ρ" }, - { "sigma", "ς" }, + { "sigma", "σ" }, { "Sigma", "Σ" }, { "tau", "τ" }, { "upsilon", "υ" }, { "phi", "ϕ" }, + { "ophi", "φ" }, -- open phi? { "Phi", "Φ" }, { "chi", "χ" }, { "psi", "ψ" }, @@ -133,10 +134,13 @@ M.unicode = { -- }}} -- {{{ Common symbols { "iinf", "∞" }, + { "niinf", "-∞" }, { "star", "⋆" }, + { "nabla", "∇" }, { "diamond", "⋄" }, { "tto", "→" }, { "ttoo", "⟶" }, + { "mapto", "↦" }, -- }}} -- {{{ Brackets { "langle", "⟨" }, diff --git a/home/features/neovim/default.nix b/home/features/neovim/default.nix index 54e0e4d..201856f 100644 --- a/home/features/neovim/default.nix +++ b/home/features/neovim/default.nix @@ -29,6 +29,7 @@ let joinspaces = false; # No double spaces with join (mapped to qj in my config) list = true; # Show some invisible characters cmdheight = 0; # Hide command line when it's not getting used + spell = true; # Spell checker # tcqj are there by default, and "r" automatically continues comments on enter formatoptions = "tcqjr"; @@ -134,10 +135,15 @@ let (nmap "a" "" "[A]lternate file") (unmap "") (nmap "Q" ":wqa" "Save all files and [q]uit") - (nmap "rw" ":%s//" "[R]eplace [w]ord in file") + (nmap "rw" + ":%s//" + "[R]eplace [w]ord in file") (nmap "sw" (lua ''require("my.helpers.wrap").toggle'') "toggle word [w]rap") + (nmap "ss" + (thunk /* lua */ "vim.opt.spell = not vim.o.spell") + "toggle [s]pell checker") # }}} ]; # }}} diff --git a/home/tethys.nix b/home/tethys.nix index 7e4a9ed..8fd1fbf 100644 --- a/home/tethys.nix +++ b/home/tethys.nix @@ -34,6 +34,7 @@ # }}} # {{{ Clis # sherlock # Search for usernames across different websites + catgirl # irc client # }}} # {{{ Misc obsidian # Notes