From b7672414dd5867a0c00e67edb2ff6099760a280d Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Mon, 26 Sep 2022 02:17:39 +0200 Subject: [PATCH] More latex stuff --- dotfiles/neovim/ftplugin/purescript.lua | 2 +- dotfiles/neovim/ftplugin/tex.lua | 2 ++ .../vscode-snippets/snippets/latex/core.json | 21 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dotfiles/neovim/ftplugin/purescript.lua b/dotfiles/neovim/ftplugin/purescript.lua index 67eb114..5ab7641 100644 --- a/dotfiles/neovim/ftplugin/purescript.lua +++ b/dotfiles/neovim/ftplugin/purescript.lua @@ -1,7 +1,7 @@ local arpeggio = require("my.plugins.arpeggio") local A = require("my.abbreviations") -print("Initializing nix keybinds...") +print("Initializing purescript keybinds...") -- Use vt to test arpeggio.chordSilent("n", "vt", ":VimuxRunCommand \"clear && spago test\"", diff --git a/dotfiles/neovim/ftplugin/tex.lua b/dotfiles/neovim/ftplugin/tex.lua index e54374c..025177d 100644 --- a/dotfiles/neovim/ftplugin/tex.lua +++ b/dotfiles/neovim/ftplugin/tex.lua @@ -53,6 +53,8 @@ local abbreviations = { { "dhx", "h'(x)" }, -- Basic commands + { "creq", "\\\\&=" }, + { "aeq", "&=" }, { "leq", "\\leq" }, { "geq", "\\geq" }, { "sdiff", "\\setminus" }, diff --git a/dotfiles/vscode-snippets/snippets/latex/core.json b/dotfiles/vscode-snippets/snippets/latex/core.json index e8d5330..5845280 100644 --- a/dotfiles/vscode-snippets/snippets/latex/core.json +++ b/dotfiles/vscode-snippets/snippets/latex/core.json @@ -153,6 +153,11 @@ "description": "Create a limit as a variable goes to negative infinity", "body": "\\lim _{$1 \\to -\\infty}$0" }, + "Limit to zero": { + "prefix": "zlim", + "description": "Create a limit as a variable goes to 0", + "body": "\\lim _{$1 \\to 0}$0" + }, "Sqrt": { "prefix": "sqrt", "description": "Create a sqrt", @@ -227,5 +232,21 @@ "prefix": "maligned", "description": "Create an aligned display math environment", "body": ["\\[", "\t\\begin{aligned}", "\t\t$0", "\t\\end{aligned}", "\\]"] + }, + "System of equations": { + "prefix": "eqsystem", + "description": "Create a system of equations", + "body": [ + "\\left\\{", + "\t\\begin{array}{rl}", + "\t\t$0", + "\t\\end{array}", + "\\right\\\\\\}" + ] + }, + "Aligned equation": { + "prefix": "aleq", + "description": "Aligned equation", + "body": ["\\\\\\ $1 &= $2", "$0"] } }