Snippets
How to create your own snippets
In VS Code, you can create your own language-specific snippets by following this demo on the official docs!
Here are some of my own snippets for LaTeX and Python.
LaTeX
-
-
My
latex.json
file:{ // ! <-------------------- Start OF SNIPPETS -------------------- // Place your snippets for latex here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. // Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. // Placeholders with the same ids are connected. // Example: // "Print to console": { // "prefix": "log", // "body": [ // "console.log('$1');", // "$2" // ], // "description": "Log output to console" // } // ---------------------------- Beamer Specific ---------------------------- // frame "Begin frame":{ "prefix":"bfr", "body":["\\begin{frame}\\frametitle{$1}\n\t$0\n\\end{frame}"] }, // block "Block":{ "prefix":"bbl", "body":["\\begin{block}{$1}\n\t$0\n\\end{block}"] }, // exclude page from count "Exclude page from count":{ "prefix":"excl", "body":["\\excludefromcount"] }, // ---------------------------- Beging{} Snippets ---------------------------- // Begin "Begin":{ "prefix":"beg", "body":["\\begin{$1}\n\t$0\n\\end{$1}"] }, // Example "Begin Example":{ "prefix":"bex", "body":["\\begin{example}\n\t$0\n\\end{example}"] }, // Theorem "Begin Theorem":{ "prefix":"bthm", "body":["\\begin{theorem}\n\t$0\n\\end{theorem}"] }, // Lemma "Begin Lemma":{ "prefix":"blem", "body":["\\begin{lemma}\n\t$0\n\\end{lemma}"] }, // Proof "Begin Proof":{ "prefix":"bproof", "body":["\\begin{proof}\n\t$0\n\\end{proof}"] }, // Equations "Begin Equation":{ "prefix":"eq", "body":["\\begin{equation}\n\t$0\n\\end{equation}"] }, // Align "Begin Align":{ "prefix":"balign", "body":["\\begin{align}\n\t$0\n\\end{align}"] }, // Split "Begin Split":{ "prefix":"bsplit", "body":["\\begin{split}\n\t$0\n\\end{split}"] }, // Equations No number "Begin Equation no numbering":{ "prefix":"beq*", "body":["\\begin{equation*}\n\t$0\n\\end{equation*}"] }, // Align No number "Begin Align no numbering":{ "prefix":"balign*", "body":["\\begin{align*}\n\t$0\n\\end{align*}"] }, // Split No number "Begin Split no numbering":{ "prefix":"bsplit*", "body":["\\begin{split*}\n\t$0\n\\end{split*}"] }, // Itemize "Begin Itemize":{ "prefix":"bitem", "body":["\\begin{itemize}\n\t\\item{%\n\t\t$0\n\t}%\n\\end{itemize}"] }, // Enumerate "Begin enumerate with 1, 2, 3, ...":{ "prefix":"benum", "body":["\\begin{enumerate}\n\t\\item{%\n\t\t$0\n\t}%\n\\end{enumerate}"] }, // Enumerate with alphabet "Begin enumerate with a, b, c, ...":{ "prefix":"bparts", "body":["\\begin{enumerate}[label=(\\alph*)]\n\t\\item {\n\t\t$0\n\t}\n\\end{enumerate}"] }, // bmatrix "Begin bmatrix":{ "prefix":"bmat", "body":["\\begin{bmatrix}\n\t$0\n\\end{bmatrix}"] }, // Columns "Begin Columns":{ "prefix":"bcs", "body":["\\begin{columns}\n\t$0\n\\end{columns}"] }, // Column "Begin Column":{ "prefix":"bc", "body":["\\begin{column}{0.5\\textwidth}\n\t$0\n\\end{column}"] }, // Figure "Begin Figure":{ "prefix":"bf", "body":[ "\\begin{figure}", "\t\\centering", "\t\\includegraphics{Figures/$1}", "\t\\vspace{-10pt}", "\t\\caption{$2}", "\t\\label{fig:$3}", "\t\\vspace{-10pt}", "\\end{figure}" ] }, // Rebuttal Comment and Response (REQUIRES Rebuttal Package) "Begin Rebuttal":{ "prefix":"brb", "body":[ "\\begin{rebuttal}", "\t% Comment", "\t{%", "\t}%", "\t% Response", "\t{%", "\t}%", "\\end{rebuttal}", "% -------------------------------------------------------------------------------------------- %" ] }, // ---------------------------- \Left \Right Snippets ---------------------------- // Norms \left| \right| (REQUIRES mleftright package) "Norm":{ "prefix":"norm", "body":["\\mleft\\| $0 \\mright\\| "] }, // Absolute value \left| \right| "Absolute value":{ "prefix":"abs", "body":["\\lvert $0 \\rvert "] }, // Brackets, parentheses, and sets \left( \right), \left[ \right], and \left\{ \right]\} // (REQUIRES mleftright package) "()":{ "prefix":"pren", "body":["\\mleft( $0 \\mright) "] }, "[]":{ "prefix":"brac", "body":["\\mleft[ $0 \\mright] "] }, "{}":{ "prefix":"cbrac", "body":["\\mleft\\{ $0 \\mright\\\\} "] }, // Inner produt \left< \right> "<>":{ "prefix":"inp", "body":["\\left\\langle $0 \\right\\rangle "] }, // Inline Math mode USING \( \) "Inline mathmode":{ "prefix":"\\(", "body":["\\($0\\) "] }, // ---------------------------- {}{} Snippets ---------------------------- // Fraction \frac{}{} "fraction":{ "prefix":"frac", "body":["\\frac{$1}{$2} $0"] }, // Sub/Super scripts "sub/super Scripts":{ "prefix":"__", "body":["$1_{$2}^{$3} $0"] }, // Summation \sum_{min}^{max} "summation":{ "prefix":"sum", "body":["\\sum_{${1:i}=${2:0}}^{${3:n}} $0"] }, // Integration \int{min}^{max} "integration":{ "prefix":"int", "body":["\\int_{${1:0}}^{${2:n}} $0 \\, \\d${3:t}"] }, // ---------------------------- Text Snippets ---------------------------- // Bolding Text \textbf{} "textbf":{ "prefix":"tbf", "body":["\\textbf{$1}$0"] }, // Bolding Math (DECAR Specfic \mbf) "mbf":{ "prefix":"mbf", "body":["\\mbf{${1:0}} $0"] }, // Shortcut for "positive definite" "positive definite":{ "prefix":"pd", "body":["positive definite "] }, // Shortcut for text roman "text roman":{ "prefix":"trm", "body":["\\textrm{$1} $0"] }, // ---------------------------- References and Lables ---------------------------- // Referencing (REQUIRES cleveref package) "cref":{ "prefix":"ref", "body":["\\cref{$0} "] }, // Referencing Figures/Theorems/... (REQUIRES cleveref package) "Cref":{ "prefix":"fref", "body":["\\Cref{$0} "] }, // Cite "cite":{ "prefix":"cite", "body":["\\cite{$0} "] }, // Cite small and red for beamer "cite beamer style":{ "prefix":"scite", "body":["{\\small\\textcolor{decar_red_bright}{[$1, $2]}}$0"] }, // Cite with name "cite with name":{ "prefix":"fcite", "body":["\\cite[$1]{$0} "] }, // Label "label":{ "prefix":"lbl", "body":["\\label{${1|eqn:,sec:,fig:,subsec:|}$0}"] }, // ---------------------------- Sections ---------------------------- // Section "section":{ "prefix":"sec", "body":["\\section{$1}\n$0"] }, // Subsection "subsection":{ "prefix":"sub", "body":["\\subsection{$1}\n$0"] }, // Subsubsection "subsubsection":{ "prefix":"subsub", "body":["\\subsubsection{$1}\n$0"] }, // ---------------------------- Math Sets ---------------------------- // l_{2e} "set of l_2e":{ "prefix":"ll2e", "body":["\\ell_{2e}"] }, // L_{2e} "set of L_2e":{ "prefix":"l2e", "body":["\\mathcal{L}_{2e}"] }, // Real "set of real numbers":{ "prefix":"sr", "body":["\\mathbb{R}^{$1}$0"] }, // Real <= "set of real numbers <= 0":{ "prefix":"srne", "body":["\\mathbb{R}_{\\leq0}$0"] }, // Real < 0 "set of real numbers < 0":{ "prefix":"srne", "body":["\\mathbb{R}_{<0}$0"] }, // Real >= 0 "set of real numbers >= 0":{ "prefix":"srpe", "body":["\\mathbb{R}_{\\geq0}$0"] }, // Real > 0 "set of real numbers > 0":{ "prefix":"srp", "body":["\\mathbb{R}_{>0}$0"] }, // Integer >= 0 "set of nonnegative integers >= 0":{ "prefix":"sip", "body":["\\mathbb{Z}_{\\geq0}$0"] }, // Symmetric Real matrix "set of symmetric Real":{ "prefix":"sm", "body":["\\mathbb{S}^{$1}$0"] }, // Symmetric Real Negative semidefinite "set of symmetric real matrices <= 0":{ "prefix":"snsd", "body":["\\mathbb{S}_{-}^{$1}$0"] }, // Symmetric Real Negative definite "set of symmetric real matricess < 0":{ "prefix":"snd", "body":["\\mathbb{S}_{--}^{$1}$0"] }, // Symmetric Real Positive semidefinite "set of symmetric real matrices >= 0":{ "prefix":"spsd", "body":["\\mathbb{S}_{+}^{$1}$0"] }, // Symmetric Real Positive definite "set of symmetric real matrices > 0":{ "prefix":"spd", "body":["\\mathbb{S}_{++}^{$1}$0"] }, // Mathcal "Matchcal{}":{ "prefix":"mc", "body":["\\mathcal{$1} $0"] }, // ---------------------------- Math Symbols ---------------------------- // Transpose using \ensuremath{\mathsf{T}} "transpose":{ "prefix":"trans", "body":["^{\\trans} "] }, // Gradient using \nabla "gradient":{ "prefix":"nabla", "body":["\\nabla "] }, // Less than equal \leq "leq":{ "prefix":"leq", "body":["\\leq "] }, // Greater than equal \geq "geq":{ "prefix":"geq", "body":["\\geq "] }, // Less than equal MATRIX wise \preceq "preceq":{ "prefix":"eprec", "body":["\\preceq "] }, // Greater than equal MATRIX wise \succeq "succeq":{ "prefix":"esucc", "body":["\\succeq "] }, // Less MATRIX wise \preceq "prec":{ "prefix":"prec", "body":["\\prec "] }, // Greater MATRIX wise \succeq "succ":{ "prefix":"succ", "body":["\\succ "] }, // ---------------------------- Math Equations ---------------------------- "A^T P A":{ "prefix":"A'PA", "body":["${1:\\mbf{A\\}}^{\\trans} ${2:\\mbf{P\\}} ${1:\\mbf{A\\}} $0"] }, "f(x_k)":{ "prefix":"fx", "body":["f(${1:\\mbf{x\\}}${2:_{${3:k}\\}}) $0"] }, "gradient of f(x_k)":{ "prefix":"gfx", "body":["\\nabla f(${1:\\mbf{x\\}}${2:_{${3:k}\\}}) $0"] }, // ---------------------------- MYSC ---------------------------- // Text color blue "Text color blue":{ "prefix":"tcb", "body":["\\textcolor{blue}{"] }, // Text color magenta "Text color magenta":{ "prefix":"tcm", "body":["\\textcolor{magenta}{"] }, // No numbering "no numbering":{ "prefix":"nonum", "body":["\\nonumber\n\\\\\\%\n"] }, // item "item":{ "prefix":"item", "body":["\\item{%\n\t$0\n}%\n"] }, // Section Section Divider "Section Divider":{ "prefix":"secdiv", "body":["% ****************************************************************************************************************** %", "% ************************************************ $0 ******************************************************** %", "% ****************************************************************************************************************** %"] }, // Sub Section Section Divider "Sub Section Divider":{ "prefix":"subdiv", "body":["% ************************************************ $0 ******************************************************** %",] }, // QED "QED":{ "prefix":"qed", "body":["\\hspace*{\\fill}~\\QED\\par\\endtrivlist\\unskip"] }, //quad "quad":{ "prefix":"qd", "body":["\\quad "] }, // vspace "vspace":{ "prefix":"vs", "body":["\\vspace{$1pt}$0"] }, // hspace "hspace":{ "prefix":"hs", "body":["\\hspace{$1pt}$0"] }, // ---------------------------- Greek Letters ---------------------------- // Greek Letters // \alpha, \beta, \delta, \gamma, \lambda, \xi, \rho, \epsilon "alpha":{ "prefix":"alpha", "body":["\\alpha "] }, "beta":{ "prefix":"beta", "body":["\\beta "] }, "delta":{ "prefix":"delta", "body":["\\delta "] }, "gamma":{ "prefix":"gamma", "body":["\\gamma "] }, "lambda":{ "prefix":"lambda", "body":["\\lambda "] }, "xi":{ "prefix":"xi", "body":["\\xi "] }, "rho":{ "prefix":"rho", "body":["\\rho "] }, "epsilon": { "prefix": "eps", "body": ["\\varepsilon "], }, // ---------------------------- Matrix and Vector Notation ---------------------------- // \mbf{} snippets for Alphabet (DECAR Specific) "Math Bold A":{"prefix":"A","body":["\\mbf{A}"]}, "Math Bold a":{"prefix":"aa","body":["\\mbf{a}"]}, "Math Bold B":{"prefix":"B","body":["\\mbf{B}"]}, "Math Bold b":{"prefix":"bb","body":["\\mbf{b}"]}, "Math Bold C":{"prefix":"C","body":["\\mbf{C}"]}, "Math Bold c":{"prefix":"cc","body":["\\mbf{c}"]}, "Math Bold D":{"prefix":"D","body":["\\mbf{D}"]}, "Math Bold d":{"prefix":"dd","body":["\\mbf{d}"]}, "Math Bold E":{"prefix":"E","body":["\\mbf{E}"]}, "Math Bold e":{"prefix":"ee","body":["\\mbf{e}"]}, "Math Bold F":{"prefix":"F","body":["\\mbf{F}"]}, "Math Bold f":{"prefix":"ff","body":["\\mbf{f}"]}, "Math Bold G":{"prefix":"G","body":["\\mbf{G}"]}, "Math Bold g":{"prefix":"gg","body":["\\mbf{g}"]}, "Math Bold H":{"prefix":"H","body":["\\mbf{H}"]}, "Math Bold h":{"prefix":"hh","body":["\\mbf{h}"]}, "Math Bold I":{"prefix":"I","body":["\\mbf{I}"]}, "Math Bold i":{"prefix":"ii","body":["\\mbf{i}"]}, "Math Bold J":{"prefix":"J","body":["\\mbf{J}"]}, "Math Bold j":{"prefix":"jj","body":["\\mbf{j}"]}, "Math Bold K":{"prefix":"K","body":["\\mbf{K}"]}, "Math Bold k":{"prefix":"kk","body":["\\mbf{k}"]}, "Math Bold L":{"prefix":"L","body":["\\mbf{L}"]}, "Math Bold l":{"prefix":"ll","body":["\\mbf{l}"]}, "Math Bold M":{"prefix":"M","body":["\\mbf{M}"]}, "Math Bold m":{"prefix":"mm","body":["\\mbf{m}"]}, "Math Bold N":{"prefix":"N","body":["\\mbf{N}"]}, "Math Bold n":{"prefix":"nn","body":["\\mbf{n}"]}, "Math Bold O":{"prefix":"O","body":["\\mbf{O}"]}, "Math Bold o":{"prefix":"oo","body":["\\mbf{o}"]}, "Math Bold P":{"prefix":"P","body":["\\mbf{P}"]}, "Math Bold p":{"prefix":"pp","body":["\\mbf{p}"]}, "Math Bold Q":{"prefix":"Q","body":["\\mbf{Q}"]}, "Math Bold q":{"prefix":"qq","body":["\\mbf{q}"]}, "Math Bold R":{"prefix":"R","body":["\\mbf{R}"]}, "Math Bold r":{"prefix":"rr","body":["\\mbf{r}"]}, "Math Bold S":{"prefix":"S","body":["\\mbf{S}"]}, "Math Bold s":{"prefix":"ss","body":["\\mbf{s}"]}, "Math Bold T":{"prefix":"T","body":["\\mbf{T}"]}, "Math Bold t":{"prefix":"tt","body":["\\mbf{t}"]}, "Math Bold U":{"prefix":"U","body":["\\mbf{U}"]}, "Math Bold u":{"prefix":"uu","body":["\\mbf{u}"]}, "Math Bold V":{"prefix":"V","body":["\\mbf{V}"]}, "Math Bold v":{"prefix":"vv","body":["\\mbf{v}"]}, "Math Bold W":{"prefix":"W","body":["\\mbf{W}"]}, "Math Bold w":{"prefix":"ww","body":["\\mbf{w}"]}, "Math Bold X":{"prefix":"X","body":["\\mbf{X}"]}, "Math Bold x":{"prefix":"xx","body":["\\mbf{x}"]}, "Math Bold Y":{"prefix":"Y","body":["\\mbf{Y}"]}, "Math Bold y":{"prefix":"yy","body":["\\mbf{y}"]}, "Math Bold Z":{"prefix":"Z","body":["\\mbf{Z}"]}, "Math Bold z":{"prefix":"zz","body":["\\mbf{z}"]}, // \mbs{} snippets for Greek Alphabet "Math Bold Phi ":{"prefix":"Phi","body":["\\mbs{\\Phi}"]}, // \mbf{} snippets for Alphabet + sub + super scripts "Math Bold A with sub/sup":{"prefix":"A_","body":["\\mbf{A}_{$1}^{$2} "]}, "Math Bold a with sub/sup":{"prefix":"aa_","body":["\\mbf{a}_{$1}^{$2} "]}, "Math Bold B with sub/sup":{"prefix":"B_","body":["\\mbf{B}_{$1}^{$2} "]}, "Math Bold b with sub/sup":{"prefix":"bb_","body":["\\mbf{b}_{$1}^{$2} "]}, "Math Bold C with sub/sup":{"prefix":"C_","body":["\\mbf{C}_{$1}^{$2} "]}, "Math Bold c with sub/sup":{"prefix":"cc_","body":["\\mbf{c}_{$1}^{$2} "]}, "Math Bold D with sub/sup":{"prefix":"D_","body":["\\mbf{D}_{$1}^{$2} "]}, "Math Bold d with sub/sup":{"prefix":"dd_","body":["\\mbf{d}_{$1}^{$2} "]}, "Math Bold E with sub/sup":{"prefix":"E_","body":["\\mbf{E}_{$1}^{$2} "]}, "Math Bold e with sub/sup":{"prefix":"ee_","body":["\\mbf{e}_{$1}^{$2} "]}, "Math Bold F with sub/sup":{"prefix":"F_","body":["\\mbf{F}_{$1}^{$2} "]}, "Math Bold f with sub/sup":{"prefix":"ff_","body":["\\mbf{f}_{$1}^{$2} "]}, "Math Bold G with sub/sup":{"prefix":"G_","body":["\\mbf{G}_{$1}^{$2} "]}, "Math Bold g with sub/sup":{"prefix":"gg_","body":["\\mbf{g}_{$1}^{$2} "]}, "Math Bold H with sub/sup":{"prefix":"H_","body":["\\mbf{H}_{$1}^{$2} "]}, "Math Bold h with sub/sup":{"prefix":"hh_","body":["\\mbf{h}_{$1}^{$2} "]}, "Math Bold I with sub/sup":{"prefix":"I_","body":["\\mbf{I}_{$1}^{$2} "]}, "Math Bold i with sub/sup":{"prefix":"ii_","body":["\\mbf{i}_{$1}^{$2} "]}, "Math Bold J with sub/sup":{"prefix":"J_","body":["\\mbf{J}_{$1}^{$2} "]}, "Math Bold j with sub/sup":{"prefix":"jj_","body":["\\mbf{j}_{$1}^{$2} "]}, "Math Bold K with sub/sup":{"prefix":"K_","body":["\\mbf{K}_{$1}^{$2} "]}, "Math Bold k with sub/sup":{"prefix":"kk_","body":["\\mbf{k}_{$1}^{$2} "]}, "Math Bold L with sub/sup":{"prefix":"L_","body":["\\mbf{L}_{$1}^{$2} "]}, "Math Bold l with sub/sup":{"prefix":"ll_","body":["\\mbf{l}_{$1}^{$2} "]}, "Math Bold M with sub/sup":{"prefix":"M_","body":["\\mbf{M}_{$1}^{$2} "]}, "Math Bold m with sub/sup":{"prefix":"mm_","body":["\\mbf{m}_{$1}^{$2} "]}, "Math Bold N with sub/sup":{"prefix":"N_","body":["\\mbf{N}_{$1}^{$2} "]}, "Math Bold n with sub/sup":{"prefix":"nn_","body":["\\mbf{n}_{$1}^{$2} "]}, "Math Bold O with sub/sup":{"prefix":"O_","body":["\\mbf{O}_{$1}^{$2} "]}, "Math Bold o with sub/sup":{"prefix":"oo_","body":["\\mbf{o}_{$1}^{$2} "]}, "Math Bold P with sub/sup":{"prefix":"P_","body":["\\mbf{P}_{$1}^{$2} "]}, "Math Bold p with sub/sup":{"prefix":"pp_","body":["\\mbf{p}_{$1}^{$2} "]}, "Math Bold Q with sub/sup":{"prefix":"Q_","body":["\\mbf{Q}_{$1}^{$2} "]}, "Math Bold q with sub/sup":{"prefix":"qq_","body":["\\mbf{q}_{$1}^{$2} "]}, "Math Bold R with sub/sup":{"prefix":"R_","body":["\\mbf{R}_{$1}^{$2} "]}, "Math Bold r with sub/sup":{"prefix":"rr_","body":["\\mbf{r}_{$1}^{$2} "]}, "Math Bold S with sub/sup":{"prefix":"S_","body":["\\mbf{S}_{$1}^{$2} "]}, "Math Bold s with sub/sup":{"prefix":"ss_","body":["\\mbf{s}_{$1}^{$2} "]}, "Math Bold T with sub/sup":{"prefix":"T_","body":["\\mbf{T}_{$1}^{$2} "]}, "Math Bold t with sub/sup":{"prefix":"tt_","body":["\\mbf{t}_{$1}^{$2} "]}, "Math Bold U with sub/sup":{"prefix":"U_","body":["\\mbf{U}_{$1}^{$2} "]}, "Math Bold u with sub/sup":{"prefix":"uu_","body":["\\mbf{u}_{$1}^{$2} "]}, "Math Bold V with sub/sup":{"prefix":"V_","body":["\\mbf{V}_{$1}^{$2} "]}, "Math Bold v with sub/sup":{"prefix":"vv_","body":["\\mbf{v}_{$1}^{$2} "]}, "Math Bold W with sub/sup":{"prefix":"W_","body":["\\mbf{W}_{$1}^{$2} "]}, "Math Bold w with sub/sup":{"prefix":"ww_","body":["\\mbf{w}_{$1}^{$2} "]}, "Math Bold X with sub/sup":{"prefix":"X_","body":["\\mbf{X}_{$1}^{$2} "]}, "Math Bold x with sub/sup":{"prefix":"xx_","body":["\\mbf{x}_{$1}^{$2} "]}, "Math Bold Y with sub/sup":{"prefix":"Y_","body":["\\mbf{Y}_{$1}^{$2} "]}, "Math Bold y with sub/sup":{"prefix":"yy_","body":["\\mbf{y}_{$1}^{$2} "]}, "Math Bold Z with sub/sup":{"prefix":"Z_","body":["\\mbf{Z}_{$1}^{$2} "]}, "Math Bold z with sub/sup":{"prefix":"zz_","body":["\\mbf{z}_{$1}^{$2} "]}, // \mbs{} snippets for Greek Alphabet "Math Bold Phi with sub/sup":{"prefix":"Phi_","body":["\\mbs{\\Phi}_{$1}^{$2} "]}, } // ! <-------------------- END OF SNIPPETS --------------------
Python
-
-
My
python.json
file:{ "python DEBUG msg": { "prefix": "debug", "body": [ "#! <--------------------- DEBUG: $0", ], "description": "python Main" }, // Plot "python plot": { "prefix": "myplt", "body": [ "plt.figure(figsize=(15,8))", "plt.plot($1, $2, c='r', ls='-', label=r'$3')", "plt.xlabel(r'$4'); plt.ylabel(r'$5')", "plt.title(r'$6')", "plt.legend(bbox_to_anchor=(1, 1))", "$0", ], "description": "python Main" }, // Subplot "python subplot": { "prefix": "mysubplt", "body": [ "fig, axs = plt.subplots(2, sharex=True, figsize=(15,8))", "axs[0].plot($1, $2, c='r', ls='-', label=r'$3')", "axs[1].plot($4, $5, c='r', ls='-', label=r'$6)", "fig.suptitle(r'$7')", "axs[0].set_xscale('log')", "plt.legend(bbox_to_anchor=(1, 1))", ], "description": "python Main" }, // Function "python function": { "prefix": "myfun", "body": [ "# Purpose: $1", "def $2(${3:self}, $4)${5: -> None}:", " $0", ], "description": "python function template" }, // Class "python class": { "prefix": "myclass", "body": [ "class $1():", " def __init__(self, $2) -> None:", " $0", ], "description": "python class template" }, // Numpy array "python np.array": { "prefix": "arr", "body": [ "np.array([$0])" ], "description": "python np.array" }, // printf "python printf": { "prefix": "pf", "body": [ "print(f'$0')" ], "description": "python print formatted" }, // Numpy array 2 by 2 "python np.array2 by 2": { "prefix": "arr2", "body": [ "np.array([[$1, $2],", " [$3, $4]])$0" ], "description": "python np.array 2by2" }, // Numpy array 3 by 3 "python np.array3 by 3": { "prefix": "arr3", "body": [ "np.array([[$1, $2, $3],", " [$4, $5, $6],", " [$7, $8, $9]])$0" ], "description": "python np.array 3by3" }, // Test function "python test function": { "prefix": "test", "body": [ "def testing():", "\tprint(f'{\"Begin Testing\":=^{50}}')", "\t$0", "\tprint(f'{\"End Testing\":=^{50}}')", "\tpass", ], "description": "python test function" } }