1
Fork 0

Change a few abbreviations

This commit is contained in:
Matei Adriel 2024-01-28 16:00:03 +01:00
parent 5074472017
commit bf1cea1f44
No known key found for this signature in database
4 changed files with 45 additions and 28 deletions

View file

@ -2,17 +2,22 @@ local A = require("my.abbreviations")
local scrap = require("scrap") local scrap = require("scrap")
local M = {} local M = {}
local function nocap(d)
d.options = A.no_capitalization
return d
end
M.words = { M.words = {
-- {{{ General phrases -- {{{ General phrases
{ "thrf", "therefore" }, { "thrf", "therefore" },
{ "bcla", "by contradiction let's assume" }, { "bcla", "by contradiction let's assume" },
{ "wlg", "without loss of generality" }, { "wlg", "without loss of generality" },
{ "tits", "that is to say," }, { "tits", "that is to say," },
{ "wpbd", "we will prove the statement in both directions." }, { "wpbd", "we will prove the statement in both directions." },
{ "stam{,s}", "statement{}" }, { "stam{,s}", "statement{}" },
{ "{ww,tt}{m,i}", "{which,this} {means,implies}" }, { "{ww,tt}{m,i}", "{which,this} {means,implies}" },
{ "cex{,s}", "counterexample{}" }, { "cex{,s}", "counterexample{}" },
{ "er{t,s,r}", "{transitivity,symmetry,reflexivity}" }, { "er{t,s,r}", "{transitivity,symmetry,reflexivity}" },
-- }}} -- }}}
-- {{{ Special chars -- {{{ Special chars
-- System for writing special characters which need to also be easly -- System for writing special characters which need to also be easly
@ -44,23 +49,24 @@ M.words = {
}, },
-- }}} -- }}}
-- {{{ Calculus & analysis -- {{{ Calculus & analysis
{ "ib{p,s}", "integration by {parts,substitution}" }, { "ib{p,s}", "integration by {parts,substitution}" },
{ "nb{,h}{,s}", "neighbour{,hood}{}" }, { "{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 -- {{{ Linear algebra
{ "rref", "reduced row echalon form" }, { "rref", "reduced row echalon form" },
{ "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" }, { "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" },
{ "mx{,s}", "matri{x,ces}" }, { "mx{,s}", "matri{x,ces}" },
{ "dete{,s}", "determinant{}" }, { "dete{,s}", "determinant{}" },
{ "ort{n,g}", "orto{normal,gonal}" }, { "ort{n,g}", "orto{normal,gonal}" },
{ "l{in,de}", "linearly {independent,dependent}" }, { "l{in,de}", "linearly {independent,dependent}" },
{ "lcon{,s}", "linear combination{}" }, { "lcon{,s}", "linear combination{}" },
{ "vst{,s}", "vector space{}" }, -- text vector space { "vst{,s}", "vector space{}" }, -- text vector space
{ nocap({ "rizz", "Riesz vector" }), -- 💀
"rizz", -- ok please ignore this one 💀
"Riesz vector",
options = A.no_capitalization,
},
-- }}} -- }}}
-- {{{ Differential equations -- {{{ Differential equations
-- Note: we must add the space inside the {} in order for capitalization to work! -- Note: we must add the space inside the {} in order for capitalization to work!
@ -70,7 +76,7 @@ M.words = {
}, },
-- }}} -- }}}
-- {{{ Graph theory -- {{{ Graph theory
{ "vx{,s}", "vert{ex,ices}" }, { "vx{,s}", "vert{ex,ices}" },
{ "edg{,s}", "edge{}" }, { "edg{,s}", "edge{}" },
-- }}} -- }}}
} }
@ -86,7 +92,7 @@ M.notation = {
-- - "m" => - -- - "m" => -
-- - "i" => -1 -- - "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\\},-,+}}", "{^,_}{{},{\\{-1\\},-,+}}",
}, },
-- }}} -- }}}

View file

@ -111,19 +111,20 @@ M.unicode = {
{ "Theta", "Θ" }, { "Theta", "Θ" },
{ "iota", "ι" }, { "iota", "ι" },
{ "kappa", "κ" }, { "kappa", "κ" },
{ "lambda", "λ" }, { "lam", "λ" },
{ "Lambda", "Λ" }, { "Lam", "Λ" },
{ "mu", "μ" }, { "mu", "μ" },
{ "nu", "ν" }, { "nu", "ν" },
{ "xi", "ξ" }, { "xi", "ξ" },
{ "pi", "π" }, { "pi", "π" },
{ "Pi", "" }, { "Pi", "" },
{ "rho", "ρ" }, { "rho", "ρ" },
{ "sigma", "ς" }, { "sigma", "σ" },
{ "Sigma", "Σ" }, { "Sigma", "Σ" },
{ "tau", "τ" }, { "tau", "τ" },
{ "upsilon", "υ" }, { "upsilon", "υ" },
{ "phi", "ϕ" }, { "phi", "ϕ" },
{ "ophi", "φ" }, -- open phi?
{ "Phi", "Φ" }, { "Phi", "Φ" },
{ "chi", "χ" }, { "chi", "χ" },
{ "psi", "ψ" }, { "psi", "ψ" },
@ -133,10 +134,13 @@ M.unicode = {
-- }}} -- }}}
-- {{{ Common symbols -- {{{ Common symbols
{ "iinf", "" }, { "iinf", "" },
{ "niinf", "-∞" },
{ "star", "" }, { "star", "" },
{ "nabla", "" },
{ "diamond", "" }, { "diamond", "" },
{ "tto", "" }, { "tto", "" },
{ "ttoo", "" }, { "ttoo", "" },
{ "mapto", "" },
-- }}} -- }}}
-- {{{ Brackets -- {{{ Brackets
{ "langle", "" }, { "langle", "" },

View file

@ -29,6 +29,7 @@ let
joinspaces = false; # No double spaces with join (mapped to qj in my config) joinspaces = false; # No double spaces with join (mapped to qj in my config)
list = true; # Show some invisible characters list = true; # Show some invisible characters
cmdheight = 0; # Hide command line when it's not getting used 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 # tcqj are there by default, and "r" automatically continues comments on enter
formatoptions = "tcqjr"; formatoptions = "tcqjr";
@ -134,10 +135,15 @@ let
(nmap "<Leader>a" "<C-^>" "[A]lternate file") (nmap "<Leader>a" "<C-^>" "[A]lternate file")
(unmap "<C-^>") (unmap "<C-^>")
(nmap "Q" ":wqa<cr>" "Save all files and [q]uit") (nmap "Q" ":wqa<cr>" "Save all files and [q]uit")
(nmap "<leader>rw" ":%s/<C-r><C-w>/" "[R]eplace [w]ord in file") (nmap "<leader>rw"
":%s/<C-r><C-w>/"
"[R]eplace [w]ord in file")
(nmap "<leader>sw" (nmap "<leader>sw"
(lua ''require("my.helpers.wrap").toggle'') (lua ''require("my.helpers.wrap").toggle'')
"toggle word [w]rap") "toggle word [w]rap")
(nmap "<leader>ss"
(thunk /* lua */ "vim.opt.spell = not vim.o.spell")
"toggle [s]pell checker")
# }}} # }}}
]; ];
# }}} # }}}

View file

@ -34,6 +34,7 @@
# }}} # }}}
# {{{ Clis # {{{ Clis
# sherlock # Search for usernames across different websites # sherlock # Search for usernames across different websites
catgirl # irc client
# }}} # }}}
# {{{ Misc # {{{ Misc
obsidian # Notes obsidian # Notes