├── .gitignore ├── emacs-lisp-mode ├── get-buffer ├── get-buffer-create ├── message ├── paren-insert ├── point-max └── pp ├── eshell-mode └── for ├── inferior-emacs-lisp-mode └── .yas-parents ├── latex-mode ├── .yas-ignore-filenames-as-triggers ├── .yas-make-groups ├── .yas-parents ├── 2-vector ├── Basic template ├── Diagonal bmatrix ├── Display Math ├── Exists ├── Fraction auto ├── Fraction slash ├── Inline Math ├── Tikz Plot ├── To the power ├── ^2 ├── ^3 ├── abstract.yasnippet ├── adjoint ├── align.yasnippet ├── alignstar.yasnippet ├── arccos ├── arccot ├── arccsc ├── arcsec ├── arcsin ├── arctan ├── array.yasnippet ├── article.yasnippet ├── bar ├── basict ├── bbm1 ├── beamer.yasnippet ├── begin.yasnippet ├── bib.yasnippet ├── big.yasnippet ├── bigop.yasnippet ├── binom.yasnippet ├── block.yasnippet ├── bmatrix (2 x 2) ├── bmatrix (3 x 3) ├── bold.yasnippet ├── case.yasnippet ├── cases ├── ceiling function ├── cha.yasnippet ├── chastar.yasnippet ├── cite.yasnippet ├── code ├── column vector ├── column-separator ├── columns ├── complex conjugate ├── coprod.yasnippet ├── cos ├── cot ├── csc ├── d-by-dt ├── ddots ├── definite integral ├── desc.yasnippet ├── doc.yasnippet ├── dots ├── em.yasnippet ├── enum.yasnippet ├── eq.yasnippet ├── eqs.yasnippet ├── equiv ├── exp ├── fig.yasnippet ├── floor function ├── forall ├── frac.yasnippet ├── frame.yasnippet ├── gls.yasnippet ├── graphics.yasnippet ├── greater greater ├── greater or equal ├── hat ├── href.yasnippet ├── if and only if ├── implied by ├── implies ├── in ├── includegraphics ├── infimum ├── int.yasnippet ├── inverse ├── it.yasnippet ├── itd.yasnippet ├── item.yasnippet ├── label.yasnippet ├── leftrightarrow ├── less or equal ├── lesser lesser ├── letter.yasnippet ├── lim.yasnippet ├── limit ├── limsup ├── listing ├── ln ├── log ├── math.yasnippet ├── matrix.yasnippet ├── minipage.yasnippet ├── newline ├── norm ├── not equal ├── not in ├── notexists ├── oplus ├── otimes ├── par.yasnippet ├── partial derivative ├── perp ├── prod.yasnippet ├── quad ├── ref.yasnippet ├── row vector ├── sc.yasnippet ├── sec ├── sec.yasnippet ├── secstar.yasnippet ├── set ├── similar ├── sin ├── ssub.yasnippet ├── ssubstar.yasnippet ├── stackrel ├── star ├── sub.yasnippet ├── subfig.yasnippet ├── subfloat ├── subset ├── substar.yasnippet ├── sum.yasnippet ├── supremum ├── table.yasnippet ├── tan ├── text-minus ├── therefore ├── times ├── to ├── tt.yasnippet ├── url.yasnippet ├── use.yasnippet ├── vdots └── verb.yasnippet ├── lisp-interaction-mode └── .yas-parents ├── matlab-mode └── switch ├── minibuffer-mode └── .yas-parents └── org-mode ├── .yas-parents ├── basic org header ├── hash-plus ├── latex_header_extra ├── reveal-html-columns ├── reveal-html-div ├── reveal-html-span ├── source block ├── src-jupyter-python └── video template /.gitignore: -------------------------------------------------------------------------------- 1 | *.el 2 | -------------------------------------------------------------------------------- /emacs-lisp-mode/get-buffer: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: get-buffer 3 | # key: gb 4 | # -- 5 | (get-buffer "${1:`(read-buffer "Buffer:")`}")$0 -------------------------------------------------------------------------------- /emacs-lisp-mode/get-buffer-create: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: get-buffer-create 3 | # key: gbc 4 | # -- 5 | (get-buffer-create $0) -------------------------------------------------------------------------------- /emacs-lisp-mode/message: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: message 3 | # key: msg 4 | # -- 5 | (message ${1:(format "$2")})$0 -------------------------------------------------------------------------------- /emacs-lisp-mode/paren-insert: -------------------------------------------------------------------------------- 1 | # key: mk 2 | # name: paren-insert 3 | # condition: 'auto 4 | # -- 5 | ($0) -------------------------------------------------------------------------------- /emacs-lisp-mode/point-max: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: point-max 3 | # key: pM 4 | # -- 5 | (point-max) -------------------------------------------------------------------------------- /emacs-lisp-mode/pp: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: pp 3 | # key: pp 4 | # -- 5 | (pp $3 $1)$0 -------------------------------------------------------------------------------- /eshell-mode/for: -------------------------------------------------------------------------------- 1 | #name : Eshell for loop 2 | #key : for 3 | # -- 4 | for f in ${1:*} { ${2:echo} "$f"; $3} $0 -------------------------------------------------------------------------------- /inferior-emacs-lisp-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | emacs-lisp-mode -------------------------------------------------------------------------------- /latex-mode/.yas-ignore-filenames-as-triggers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karthink/yasnippets/1a843ecf276aa45e1903c6333579b49507993c6b/latex-mode/.yas-ignore-filenames-as-triggers -------------------------------------------------------------------------------- /latex-mode/.yas-make-groups: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karthink/yasnippets/1a843ecf276aa45e1903c6333579b49507993c6b/latex-mode/.yas-make-groups -------------------------------------------------------------------------------- /latex-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /latex-mode/2-vector: -------------------------------------------------------------------------------- 1 | # key: vec2 2 | # name: 2-vector 3 | # -- 4 | \\begin{bmatrix} ${1:x}_{${2:1}} \\\\ ${3:$1}_{${4:2}} \\end{bmatrix} -------------------------------------------------------------------------------- /latex-mode/Basic template: -------------------------------------------------------------------------------- 1 | # key: template 2 | # name: Basic template 3 | # group: skeleton 4 | # -- 5 | \input{`my-preamble-file`} 6 | % \usepackage{hyperref} 7 | % \hypersetup{ 8 | % colorlinks, 9 | % citecolor=cyan, 10 | % filecolor=black, 11 | % linkcolor=blue, 12 | % urlcolor=black} 13 | 14 | \author{`user-full-name`\vspace{-2ex}} 15 | \title{\vspace{-3.0cm}${1:Title$(capitalize yas-text)}\vspace{-2ex}} 16 | ${2:\date{${3:\today}}} 17 | 18 | \begin{document} 19 | 20 | \begingroup 21 | \let\center\flushleft 22 | \let\endcenter\endflushleft 23 | \maketitle 24 | \endgroup 25 | 26 | % \tableofcontents 27 | 28 | $0 29 | \end{document} -------------------------------------------------------------------------------- /latex-mode/Diagonal bmatrix: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Diagonal bmatrix 3 | # key: diag3 4 | # group: math 5 | # -- 6 | \\begin{bmatrix} 7 | ${1:\\ddots} & & \\\\ 8 | & ${2:\\ddots} & \\\\ 9 | & & ${3:\\ddots} 10 | \\end{bmatrix} -------------------------------------------------------------------------------- /latex-mode/Display Math: -------------------------------------------------------------------------------- 1 | # key: dm 2 | # name: Display Math 3 | # condition: (and (not (texmathp)) (quote auto)) 4 | # group: math 5 | # -- 6 | \[ `(save-excursion (previous-line)(make-string (current-indentation) ?\s))`$0 \] 7 | -------------------------------------------------------------------------------- /latex-mode/Exists: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Exists 3 | # key: EE 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\exists -------------------------------------------------------------------------------- /latex-mode/Fraction auto: -------------------------------------------------------------------------------- 1 | # key: // 2 | # name: Fraction auto 3 | # type: command 4 | # condition: (and (texmathp) (quote auto)) 5 | # group: math 6 | # -- 7 | (let ((numerator t)) 8 | (condition-case nil 9 | (save-excursion 10 | (backward-sexp) 11 | (kill-sexp) 12 | (delete-char 1)) 13 | (error (setq numerator 'nil))) 14 | (insert "\\frac{" (if numerator (current-kill 0) "") 15 | "}{}") 16 | (backward-char (if numerator 1 3))) -------------------------------------------------------------------------------- /latex-mode/Fraction slash: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Fraction slash 3 | # key: / 4 | # type: command 5 | # condition: (texmathp) 6 | # group: math 7 | # -- 8 | (let ((numerator t)) 9 | (condition-case nil 10 | (save-excursion 11 | (backward-sexp) 12 | (kill-sexp) 13 | (delete-char 1)) 14 | (error (setq numerator 'nil))) 15 | (insert "\\frac{" (if numerator (current-kill 0) "") 16 | "}{}") 17 | (backward-char (if numerator 1 3))) -------------------------------------------------------------------------------- /latex-mode/Inline Math: -------------------------------------------------------------------------------- 1 | # key: mk 2 | # name: Inline Math 3 | # condition: (and (not (texmathp)) (quote auto)) 4 | # group: math 5 | # -- 6 | \\( $0 \\) -------------------------------------------------------------------------------- /latex-mode/Tikz Plot: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Tikz Plot 3 | # key: tikzplot 4 | # group: environments 5 | # -- 6 | \begin{figure}[$1] 7 | \centering 8 | \begin{tikzpicture} 9 | \begin{axis}[ 10 | xmin= ${2:-10}, xmax= ${3:10}, 11 | ymin= ${4:-10}, ymax = ${5:10}, 12 | axis lines = middle, 13 | ] 14 | \addplot[domain=$2:$3, samples=${6:100}]{$7}; 15 | \end{axis} 16 | \end{tikzpicture} 17 | \caption{$8} 18 | \label{${9:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 19 | \end{figure} 20 | -------------------------------------------------------------------------------- /latex-mode/To the power: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: To the power 3 | # key: pw 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | ^{$0} -------------------------------------------------------------------------------- /latex-mode/^2: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: ^2 3 | # key: sr 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | ^2$0 -------------------------------------------------------------------------------- /latex-mode/^3: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: ^3 3 | # key: cb 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | ^3$0 -------------------------------------------------------------------------------- /latex-mode/abstract.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : abstract 4 | # group: sections 5 | # name : \abstract 6 | # -- 7 | \begin{abstract} 8 | $0 9 | \end{abstract} -------------------------------------------------------------------------------- /latex-mode/adjoint: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: adjoint 3 | # key: adj 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | `(delete-backward-char 1)`^{\\dagger}$0 -------------------------------------------------------------------------------- /latex-mode/align.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Rasmus Borgsmidt 3 | # key : align 4 | # group: environments 5 | # name : \begin{align} ... \end{align} 6 | # -- 7 | \begin{align} 8 | $0 9 | \end{align} -------------------------------------------------------------------------------- /latex-mode/alignstar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Rasmus Borgsmidt 3 | # key : align* 4 | # group: environments 5 | # name : \begin{align*} ... \end{align*} 6 | # -- 7 | \begin{align*} 8 | $0 9 | \end{align*} -------------------------------------------------------------------------------- /latex-mode/arccos: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: arccos 3 | # key: arccos 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\arccos -------------------------------------------------------------------------------- /latex-mode/arccot: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: arccot 3 | # key: arccot 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\arccot -------------------------------------------------------------------------------- /latex-mode/arccsc: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: arccsc 3 | # key: arccsc 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\arccsc -------------------------------------------------------------------------------- /latex-mode/arcsec: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: arcsec 3 | # key: arcsec 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\arcsec -------------------------------------------------------------------------------- /latex-mode/arcsin: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: arcsin 3 | # key: arcsin 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\arcsin -------------------------------------------------------------------------------- /latex-mode/arctan: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: arctan 3 | # key: arctan 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\arctan -------------------------------------------------------------------------------- /latex-mode/array.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Peter Urbak 3 | # key : arr 4 | # group: environments 5 | # name : \begin{array} ... \end{array} 6 | # -- 7 | \begin{array}{$1} 8 | $0 9 | \end{array} 10 | -------------------------------------------------------------------------------- /latex-mode/article.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # contributor : Song Qiang 4 | # key: article 5 | # group: skeleton 6 | # name: \documentclass{article} ... 7 | # -- 8 | \documentclass[11pt]{article} 9 | 10 | \usepackage{graphicx,amsmath,amssymb,subfigure,url,xspace} 11 | \newcommand{\eg}{e.g.,\xspace} 12 | \newcommand{\bigeg}{E.g.,\xspace} 13 | \newcommand{\etal}{\textit{et~al.\xspace}} 14 | \newcommand{\etc}{etc.\@\xspace} 15 | \newcommand{\ie}{i.e.,\xspace} 16 | \newcommand{\bigie}{I.e.,\xspace} 17 | 18 | \title{${1:title}} 19 | \author{${2:Author Name}} 20 | 21 | \begin{document} 22 | \maketitle 23 | 24 | 25 | \bibliographystyle{${3:plain}} 26 | \bibliography{${4:literature.bib}} 27 | 28 | \end{document} 29 | -------------------------------------------------------------------------------- /latex-mode/bar: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bar 3 | # key: bar 4 | # type: command 5 | # condition: (and (texmathp) 'auto) 6 | # group: math 7 | # -- 8 | (let ((argument t)) 9 | (condition-case nil 10 | (progn 11 | (backward-sexp) 12 | (kill-sexp) 13 | (delete-char 1)) 14 | (error (setq argument 'nil))) 15 | (insert "\\bar{" (if argument (current-kill 0) "") "}")) -------------------------------------------------------------------------------- /latex-mode/basict: -------------------------------------------------------------------------------- 1 | # key: basict 2 | # group: skeleton 3 | # name: \documentclass{article} ... 4 | # -- 5 | \documentclass[11pt]{article} 6 | 7 | \usepackage{graphicx,amsmath,amssymb,subfigure,url,xspace} 8 | 9 | \title{${1:title}} 10 | \author{${2:Author Name}} 11 | 12 | \begin{document} 13 | \maketitle 14 | 15 | $0 16 | 17 | \end{document} 18 | -------------------------------------------------------------------------------- /latex-mode/bbm1: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bbm1 3 | # key: 11 4 | # -- 5 | \mathbbm{1} -------------------------------------------------------------------------------- /latex-mode/beamer.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Claudio Marforio 3 | # key: beamer 4 | # group: skeleton 5 | # name: \documentclass{beamer} ... 6 | # -- 7 | \documentclass[xcolor=dvipsnames]{beamer} 8 | 9 | \usepackage{graphicx,subfigure,url} 10 | 11 | % example themes 12 | \usetheme{Frankfurt} 13 | \usecolortheme{seahorse} 14 | \usecolortheme{rose} 15 | 16 | % put page numbers 17 | % \setbeamertemplate{footline}[frame number]{} 18 | % remove navigation symbols 19 | % \setbeamertemplate{navigation symbols}{} 20 | 21 | \title{${1:Presentation Title}} 22 | \author{${2:Author Name}} 23 | 24 | \begin{document} 25 | 26 | \frame[plain]{\titlepage} 27 | 28 | \begin{frame}[plain]{Outline} 29 | \tableofcontents 30 | \end{frame} 31 | 32 | \section{${3:Example Section}} 33 | \begin{frame}{${4:Frame Title}} 34 | 35 | \end{frame} 36 | 37 | \end{document} 38 | -------------------------------------------------------------------------------- /latex-mode/begin.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # contributor : Bjorn Reese 4 | # key: begin 5 | # group: environments 6 | # name: \begin{environment} ... \end{environment} 7 | # -- 8 | \begin{${1:$$(yas/choose-value (mapcar 'car (LaTeX-environment-list)))}} 9 | $0 10 | \end{$1} -------------------------------------------------------------------------------- /latex-mode/bib.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: bib 4 | # group: misc 5 | # name: \bibliography 6 | # -- 7 | \bibliographystyle{plain} 8 | \bibliography{$1}$0 -------------------------------------------------------------------------------- /latex-mode/big.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Song Qiang 3 | # key: big 4 | # group: math 5 | # name: \bigl( ... \bigr) 6 | # -- 7 | \\${1:$$(yas/choose-value '("big" "Big" "bigg" "Bigg"))}l( $0 \\$1r) -------------------------------------------------------------------------------- /latex-mode/bigop.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: François Garillot 3 | # key: bigop 4 | # group: math 5 | # name: \bigop_{n}^{} 6 | # -- 7 | \\big${1:$$(yas/choose-value '("oplus" "otimes" "odot" "cup" "cap" "uplus" "sqcup" "vee" "wedge"))}_{$2}^{$3}$0 8 | -------------------------------------------------------------------------------- /latex-mode/binom.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Song Qiang 3 | # key: binom 4 | # group: math 5 | # name: \binom{n}{k} 6 | # -- 7 | \binom{${1:n}}{${2:k}} -------------------------------------------------------------------------------- /latex-mode/block.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Claudio Marforio 3 | # key: block 4 | # group: environments 5 | # name : \begin{*block} ... \end{*block} 6 | # -- 7 | \begin{${1:$$(yas/choose-value '("block" "exampleblock" "alertblock"))}}{${2:Block Title}} 8 | 9 | \end{$1} 10 | -------------------------------------------------------------------------------- /latex-mode/bmatrix (2 x 2): -------------------------------------------------------------------------------- 1 | # key: mat2 2 | # name: bmatrix (2 x 2) 3 | # group: math 4 | # -- 5 | \\begin{bmatrix} 6 | ${1:A} & ${2:$1} \\\\ 7 | ${3:$1} & ${4:$1} 8 | \\end{bmatrix} -------------------------------------------------------------------------------- /latex-mode/bmatrix (3 x 3): -------------------------------------------------------------------------------- 1 | # key: mat3 2 | # name: bmatrix (3 x 3) 3 | # -- 4 | \\begin{bmatrix} 5 | ${1:A} & ${2:$1} & ${3:$1} \\\\ 6 | ${4:$1} & ${5:$1} & ${6:$1} \\\\ 7 | ${7:$1} & ${8:$1} & ${9:$1} 8 | \\end{bmatrix} -------------------------------------------------------------------------------- /latex-mode/bold.yasnippet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karthink/yasnippets/1a843ecf276aa45e1903c6333579b49507993c6b/latex-mode/bold.yasnippet -------------------------------------------------------------------------------- /latex-mode/case.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: case 4 | # group: math 5 | # name: \begin{cases} ... \end{cases} 6 | # -- 7 | \begin{cases} 8 | $0 \\\\ 9 | \end{cases} 10 | -------------------------------------------------------------------------------- /latex-mode/cases: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cases 3 | # key: case 4 | # condition: (texmathp) 5 | # group: math 6 | # -- 7 | \\begin{cases} 8 | $1 9 | \\end{cases}$0 -------------------------------------------------------------------------------- /latex-mode/ceiling function: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: ceiling function 3 | # key: ceil 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\left\\lceil $1 \\right\\rceil $0 -------------------------------------------------------------------------------- /latex-mode/cha.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : cha 4 | # group: sections 5 | # name : \chapter 6 | # -- 7 | \chapter{${1:name}} 8 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 9 | $0 -------------------------------------------------------------------------------- /latex-mode/chastar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : cha* 4 | # group: sections 5 | # name : \chapter* 6 | # -- 7 | \chapter*{${1:name}} 8 | $0 -------------------------------------------------------------------------------- /latex-mode/cite.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Marcio M. Ribeiro 3 | # key: cite 4 | # group: references 5 | # name : \cite 6 | # -- 7 | `(unless yas-modified-p (setq this-command 'citar-insert-citation) (call-interactively 'citar-insert-citation))` -------------------------------------------------------------------------------- /latex-mode/code: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: code 3 | # key: code 4 | # -- 5 | \begin{lstlisting}${1:[language=${2:Matlab}]} 6 | $0 7 | \end{lstlisting} -------------------------------------------------------------------------------- /latex-mode/column vector: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: column vector 3 | # key: cvec 4 | # condition: 'auto 5 | # group: math 6 | # -- 7 | \\begin{pmatrix} ${1:x}_{${2:1}}\\\\ ${3:\\vdots}\\\\ $1_{${4:n}} \\end{pmatrix} -------------------------------------------------------------------------------- /latex-mode/column-separator: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: column-separator 3 | # key: ,, 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | & $0 -------------------------------------------------------------------------------- /latex-mode/columns: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: columns 3 | # key: cols 4 | # -- 5 | \begin{columns} 6 | \begin{column}{.${1:5}\textwidth} 7 | $0 8 | \end{column} 9 | 10 | \begin{column}{.${2:5}\textwidth} 11 | 12 | \end{column} 13 | \end{columns} -------------------------------------------------------------------------------- /latex-mode/complex conjugate: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: complex conjugate 3 | # key: cj 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | ^{\\star}$0 -------------------------------------------------------------------------------- /latex-mode/coprod.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: François Garillot 3 | # key: coprod 4 | # group: math 5 | # name: \coprod_{n}^{} 6 | # -- 7 | \coprod_{$1}^{$2}$0 8 | -------------------------------------------------------------------------------- /latex-mode/cos: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cos 3 | # key: cos 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\cos -------------------------------------------------------------------------------- /latex-mode/cot: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cot 3 | # key: cot 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\cot -------------------------------------------------------------------------------- /latex-mode/csc: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: csc 3 | # key: csc 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\csc -------------------------------------------------------------------------------- /latex-mode/d-by-dt: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: d-by-dt 3 | # key: ddt 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\frac{\\mathrm{d} $1}{\\mathrm{d} ${2:t}}$0 -------------------------------------------------------------------------------- /latex-mode/ddots: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: ddots 3 | # key: /, 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\ddots -------------------------------------------------------------------------------- /latex-mode/definite integral: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: definite integral 3 | # key: dint 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\int_{${1:-\\infty}}^{${2:\\infty}}$0 -------------------------------------------------------------------------------- /latex-mode/desc.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : desc 4 | # group: environments 5 | # name : \begin{description} ... \end{description} 6 | # -- 7 | \begin{description} 8 | \item[${1:label}] $0 9 | \end{description} 10 | -------------------------------------------------------------------------------- /latex-mode/doc.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: doc 4 | # name: \documentclass 5 | # -- 6 | \documentclass[$2]{${1:$$(yas/choose-value '("article" "report" "book" "letter"))}} 7 | 8 | \begin{document} 9 | $0 10 | \end{document} 11 | -------------------------------------------------------------------------------- /latex-mode/dots: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: dots 3 | # key: ... 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\dots$0 -------------------------------------------------------------------------------- /latex-mode/em.yasnippet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karthink/yasnippets/1a843ecf276aa45e1903c6333579b49507993c6b/latex-mode/em.yasnippet -------------------------------------------------------------------------------- /latex-mode/enum.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: enum 4 | # group: environments 5 | # name : \begin{enumerate} ... \end{enumerate} 6 | # -- 7 | \begin{enumerate} 8 | \item $0 9 | \end{enumerate} 10 | -------------------------------------------------------------------------------- /latex-mode/eq.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: eq 4 | # group: math 5 | # name: \begin{equation} ... \end{equation} 6 | # -- 7 | \begin{equation} 8 | \label{${1:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 9 | $0 10 | \end{equation} 11 | -------------------------------------------------------------------------------- /latex-mode/eqs.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: eqs 4 | # group: math 5 | # name: \begin{align} ... \end{align} 6 | # -- 7 | \begin{${1:$$(yas/choose-value '("align" "align*" "multline" "gather" "subequations"))}} 8 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 9 | $0 10 | \end{$1} 11 | -------------------------------------------------------------------------------- /latex-mode/equiv: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: equiv 3 | # key: eqv 4 | # condition: (and (texmathp) 'auto) 5 | # -- 6 | \\equiv$0 -------------------------------------------------------------------------------- /latex-mode/exp: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: exp 3 | # key: exp 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\exp -------------------------------------------------------------------------------- /latex-mode/fig.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : fig 4 | # group: environments 5 | # name : \begin{figure} ... \end{figure} 6 | # -- 7 | \begin{figure}[htbp] 8 | \centering 9 | $0 10 | \caption{${1:caption}} 11 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 12 | \end{figure} 13 | -------------------------------------------------------------------------------- /latex-mode/floor function: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: floor function 3 | # key: floor 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\left\\lfloor $1 \\right\\rfloor $0 -------------------------------------------------------------------------------- /latex-mode/forall: -------------------------------------------------------------------------------- 1 | # key: VV 2 | # name: forall 3 | # condition: (and (texmathp) (quote auto)) 4 | # group: math 5 | # -- 6 | \\forall$0 -------------------------------------------------------------------------------- /latex-mode/frac.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Song Qiang 3 | # key: frac 4 | # group: math 5 | # name: \frac{numerator}{denominator} 6 | # -- 7 | \frac{${1:numerator}}{${2:denominator}}$0 -------------------------------------------------------------------------------- /latex-mode/frame.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Claudio Marforio 3 | # key: frame 4 | # group: environments 5 | # name : \begin{frame} ... \end{frame} 6 | # -- 7 | \begin{frame}{${1:Frame Title$(capitalize yas-text)}} 8 | $0 9 | \end{frame} 10 | -------------------------------------------------------------------------------- /latex-mode/gls.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Peter Urbak 3 | # key : newgls 4 | # group: misc 5 | # name : \newglossaryentry{...}{...} 6 | # -- 7 | \newglossaryentry{$1}{name={$1}, 8 | description={$2.}} 9 | -------------------------------------------------------------------------------- /latex-mode/graphics.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : graphics 4 | # name : \includegraphics 5 | # -- 6 | \includegraphics[width=${1:\linewidth}]{${2:file}} -------------------------------------------------------------------------------- /latex-mode/greater greater: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: greater greater 3 | # key: >> 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\gg -------------------------------------------------------------------------------- /latex-mode/greater or equal: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: greater or equal 3 | # key: geq 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\ge -------------------------------------------------------------------------------- /latex-mode/hat: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hat 3 | # key: hat 4 | # type: command 5 | # condition: (and (texmathp) 'auto) 6 | # group: math 7 | # -- 8 | (let ((argument t)) 9 | (condition-case nil 10 | (progn 11 | (backward-sexp) 12 | (kill-sexp) 13 | (delete-char 1)) 14 | (error (setq argument 'nil))) 15 | (insert "\\hat{" (if argument (current-kill 0) "") "}")) -------------------------------------------------------------------------------- /latex-mode/href.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # key: href 3 | # group: environments 4 | # name: \href{url}{text} 5 | # -- 6 | \href{${1:url}}{${2:text}}$0 -------------------------------------------------------------------------------- /latex-mode/if and only if: -------------------------------------------------------------------------------- 1 | # key: iff 2 | # name: if and only if 3 | # condition: (and (texmathp) (quote auto)) 4 | # group: math 5 | # -- 6 | \iff -------------------------------------------------------------------------------- /latex-mode/implied by: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: implied by 3 | # key: <= 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\impliedby $0 -------------------------------------------------------------------------------- /latex-mode/implies: -------------------------------------------------------------------------------- 1 | # key: => 2 | # name: implies 3 | # condition: (and (texmathp) (quote auto)) 4 | # group: math 5 | # -- 6 | \implies$0 -------------------------------------------------------------------------------- /latex-mode/in: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: in 3 | # key: inn 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\in -------------------------------------------------------------------------------- /latex-mode/includegraphics: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: includegraphics 3 | # key: ig 4 | # -- 5 | \includegraphics${1:[$2]}{$0} -------------------------------------------------------------------------------- /latex-mode/infimum: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: infimum 3 | # key: inf 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\inf_{$1 \\in $2} $0 -------------------------------------------------------------------------------- /latex-mode/int.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Song Qiang 3 | # key: integ 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # name: Indefinite integral (all) 7 | # -- 8 | \\${1:$$(yas/choose-value '("int" "oint" "iint" "iiint" "iiiint" "idotsint"))}$0 -------------------------------------------------------------------------------- /latex-mode/inverse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: inverse 3 | # key: inv 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | ^{\text{-}1} -------------------------------------------------------------------------------- /latex-mode/it.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: it 4 | # group: environments 5 | # name: \item 6 | # -- 7 | \item $0 -------------------------------------------------------------------------------- /latex-mode/itd.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Rasmus Borgsmidt 3 | # key: itd 4 | # group: environments 5 | # name: \item[] (description) 6 | # -- 7 | \item[${1:label}] $0 -------------------------------------------------------------------------------- /latex-mode/item.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : item 4 | # group: environments 5 | # name : \begin{itemize} ... \end{itemize} 6 | # -- 7 | \begin{itemize} 8 | \item $0 9 | \end{itemize} 10 | -------------------------------------------------------------------------------- /latex-mode/label.yasnippet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karthink/yasnippets/1a843ecf276aa45e1903c6333579b49507993c6b/latex-mode/label.yasnippet -------------------------------------------------------------------------------- /latex-mode/leftrightarrow: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: leftrightarrow 3 | # key: <-> 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\leftrightarrow 8 | -------------------------------------------------------------------------------- /latex-mode/less or equal: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: less or equal 3 | # key: leq 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\le$0 -------------------------------------------------------------------------------- /latex-mode/lesser lesser: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: lesser lesser 3 | # key: << 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\ll -------------------------------------------------------------------------------- /latex-mode/letter.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # contributor : Song Qiang 4 | # key: letter 5 | # group: skeleton 6 | # name: \documentclass{letter} ... 7 | # -- 8 | \documentclass{letter} 9 | \signature{${1:Foo Bar}} 10 | \address{${2:Address line 1 \\\\ 11 | Address line 2 \\\\ 12 | Address line 3}} 13 | \begin{document} 14 | 15 | \begin{letter} 16 | {${3:Recipient's address}} 17 | 18 | \opening{Dear ${4:Sir}:} 19 | 20 | $0 21 | 22 | \closing{Yours Sincerely,} 23 | 24 | \end{letter} 25 | 26 | \end{document} 27 | 28 | -------------------------------------------------------------------------------- /latex-mode/lim.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: François Garillot 3 | # key: limit 4 | # group: math 5 | # name: \lim_{n} 6 | # -- 7 | \lim_{$1}$0 8 | -------------------------------------------------------------------------------- /latex-mode/limit: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: limit 3 | # key: lim 4 | # conditon: (texmathp) 5 | # group: math 6 | # -- 7 | \\lim_{${1:n} \\to ${2:\\infty}} $0 -------------------------------------------------------------------------------- /latex-mode/limsup: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: limsup 3 | # key: limsup 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\limsup_{${1:n} \\to ${2:\\infty}} $0 -------------------------------------------------------------------------------- /latex-mode/listing: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: listing 3 | # key: lst 4 | # -- 5 | \begin{lstlisting}[float,label=lst:${1:label},caption=nextHopInfo: ${2:caption}] 6 | $0 7 | \end{lstlisting} -------------------------------------------------------------------------------- /latex-mode/ln: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: ln 3 | # key: ln 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\ln -------------------------------------------------------------------------------- /latex-mode/log: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: log 3 | # key: log 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\log -------------------------------------------------------------------------------- /latex-mode/math.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Song Qiang 3 | # key: math 4 | # group: math 5 | # name: displaymath \[ ... \] 6 | # -- 7 | \[ 8 | $1 9 | \] 10 | -------------------------------------------------------------------------------- /latex-mode/matrix.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Song Qiang 3 | # key: matrix 4 | # group: math 5 | # name: \begin{matrix} ... \end{} 6 | # -- 7 | \begin{${1:$$(yas/choose-value '("pmatrix" "bmatrix" "Bmatrix" "vmatrix" "Vmatrix" "smallmatrix"))}} $0 \end{$1} -------------------------------------------------------------------------------- /latex-mode/minipage.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: minipage 4 | # group: environments 5 | # name: \begin{minipage}[position][width] ... \end{minipage} 6 | # -- 7 | \begin{minipage}[${1:htbp}]{${2:1.0}${3:\linewidth}} 8 | $0 9 | \end{minipage} -------------------------------------------------------------------------------- /latex-mode/newline: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: newline 3 | # key: \\ 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\\\ 8 | `(save-excursion (previous-line)(make-string (current-indentation) ?\s))`$0 -------------------------------------------------------------------------------- /latex-mode/norm: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: norm 3 | # key: norm 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \left\|$1\right\|$0 -------------------------------------------------------------------------------- /latex-mode/not equal: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: not equal 3 | # key: neq 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\ne -------------------------------------------------------------------------------- /latex-mode/not in: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: not in 3 | # key: notin 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\not\\in -------------------------------------------------------------------------------- /latex-mode/notexists: -------------------------------------------------------------------------------- 1 | # key: nEE 2 | # name: notexists 3 | # condition: (and (texmathp) 'auto) 4 | # group: math 5 | # -- 6 | \\nexists -------------------------------------------------------------------------------- /latex-mode/oplus: -------------------------------------------------------------------------------- 1 | # key: o+ 2 | # name: oplus 3 | # condition: (and (texmathp) 'auto) 4 | # group: math 5 | # -- 6 | \oplus -------------------------------------------------------------------------------- /latex-mode/otimes: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: otimes 3 | # key: ox 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \otimes -------------------------------------------------------------------------------- /latex-mode/par.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: par 4 | # group: sections 5 | # name : \paragraph 6 | # -- 7 | \paragraph{${1:name}} 8 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 9 | $0 -------------------------------------------------------------------------------- /latex-mode/partial derivative: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: partial derivative 3 | # key: part 4 | # condition: (texmathp) 5 | # group: math 6 | # -- 7 | \\frac{\\partial $1}{\\partial ${2:x}} $0 -------------------------------------------------------------------------------- /latex-mode/perp: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: perp 3 | # key: perp 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\perp -------------------------------------------------------------------------------- /latex-mode/prod.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: François Garillot 3 | # key: prod 4 | # group: math 5 | # name: \prod_{n}^{} 6 | # -- 7 | \prod_{$1}^{$2}$0 8 | -------------------------------------------------------------------------------- /latex-mode/quad: -------------------------------------------------------------------------------- 1 | # key: qq 2 | # name: quad 3 | # condition: (and (texmathp) 'auto) 4 | # -- 5 | \\quad -------------------------------------------------------------------------------- /latex-mode/ref.yasnippet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karthink/yasnippets/1a843ecf276aa45e1903c6333579b49507993c6b/latex-mode/ref.yasnippet -------------------------------------------------------------------------------- /latex-mode/row vector: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: row vector 3 | # key: rvec 4 | # condition: 'auto 5 | # group: math 6 | # -- 7 | \\begin{pmatrix} ${1:x}_{${2:1}} & ${3:\\dots} & $1_{${4:n}} \\end{pmatrix} -------------------------------------------------------------------------------- /latex-mode/sc.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Rasmus Borgsmidt 3 | # key: sc 4 | # group: font 5 | # name: {\sc ...} 6 | # -- 7 | {\scshape $1}$0 -------------------------------------------------------------------------------- /latex-mode/sec: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sec 3 | # key: sec 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\sec -------------------------------------------------------------------------------- /latex-mode/sec.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : sec 4 | # group: sections 5 | # name : \section 6 | # -- 7 | \section{${1:name}} 8 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 9 | $0 -------------------------------------------------------------------------------- /latex-mode/secstar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : sec* 4 | # group: sections 5 | # name : \section* 6 | # -- 7 | \section*{${1:name}} 8 | $0 -------------------------------------------------------------------------------- /latex-mode/set: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: set 3 | # key: set 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\left\\{ $1 \\right\\}$0 -------------------------------------------------------------------------------- /latex-mode/similar: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: similar 3 | # key: ~~ 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\sim -------------------------------------------------------------------------------- /latex-mode/sin: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sin 3 | # key: sin 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\sin -------------------------------------------------------------------------------- /latex-mode/ssub.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: ssub 4 | # group: sections 5 | # name : \subsubsection 6 | # -- 7 | \subsubsection{${1:name}} 8 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 9 | $0 -------------------------------------------------------------------------------- /latex-mode/ssubstar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: ssub* 4 | # group: sections 5 | # name : \subsubsection* 6 | # -- 7 | \subsubsection*{${1:name}} 8 | $0 -------------------------------------------------------------------------------- /latex-mode/stackrel: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: stackrel 3 | # key: stackrel 4 | # condition: (and (texmathp) 'auto) 5 | # -- 6 | \\stackrel{$1}{$0} -------------------------------------------------------------------------------- /latex-mode/star: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: star 3 | # key: star 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\star -------------------------------------------------------------------------------- /latex-mode/sub.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: sub 4 | # group: sections 5 | # name : \subsection 6 | # -- 7 | \subsection{${1:name}} 8 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 9 | $0 -------------------------------------------------------------------------------- /latex-mode/subfig.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: subfig 4 | # group: environments 5 | # name : \subfigure 6 | # -- 7 | \subfigure[${1:caption}]{ 8 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 9 | $0 10 | } 11 | -------------------------------------------------------------------------------- /latex-mode/subfloat: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: subfloat 3 | # key: subfloat 4 | # -- 5 | \begin{figure}[ht] 6 | \centering 7 | \subfloat[${6:caption}]{\includegraphics[$3]{figures/${1:path.png}}}${5:~} 8 | \subfloat[${7:caption}]{\includegraphics[$4]{figures/${2:path.png}}} 9 | \caption{\label{fig:${8:label}} $0} 10 | \end{figure} 11 | -------------------------------------------------------------------------------- /latex-mode/subset: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: subset 3 | # key: cc 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \subset -------------------------------------------------------------------------------- /latex-mode/substar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: sub* 4 | # group: sections 5 | # name : \subsection* 6 | # -- 7 | \subsection*{${1:name}} 8 | $0 -------------------------------------------------------------------------------- /latex-mode/sum.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Song Qiang 3 | # key: sum 4 | # group: math 5 | # name: \sum_{n}^{} 6 | # -- 7 | \sum_{$1}^{$2}$0 -------------------------------------------------------------------------------- /latex-mode/supremum: -------------------------------------------------------------------------------- 1 | # name: supremum 2 | # key: sup 3 | # condition: (and (texmathp) 'auto) 4 | # group: math 5 | # -- 6 | \\sup_{$1 \\in $2} $0 -------------------------------------------------------------------------------- /latex-mode/table.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: table 4 | # group: environments 5 | # name : \begin{table} ... \end{table} 6 | # -- 7 | \begin{table}[htbp] 8 | \centering 9 | \begin{tabular}{${3:format}} 10 | $0 11 | \end{tabular} 12 | \caption{${1:caption}} 13 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 14 | \end{table} 15 | -------------------------------------------------------------------------------- /latex-mode/tan: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tan 3 | # key: tan 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\tan -------------------------------------------------------------------------------- /latex-mode/text-minus: -------------------------------------------------------------------------------- 1 | # key: tm 2 | # name: text-minus 3 | # condition: (and (texmathp) 'auto) 4 | # -- 5 | \text{-}$0 -------------------------------------------------------------------------------- /latex-mode/therefore: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: therefore 3 | # key: thus 4 | # group: math 5 | # condition: (and (texmathp) 'auto) 6 | # -- 7 | \\therefore -------------------------------------------------------------------------------- /latex-mode/times: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: times 3 | # key: xx 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \\times -------------------------------------------------------------------------------- /latex-mode/to: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: to 3 | # key: -> 4 | # condition: (and (texmathp) 'auto) 5 | # group: math 6 | # -- 7 | \to -------------------------------------------------------------------------------- /latex-mode/tt.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Rasmus Borgsmidt 3 | # key: tt 4 | # group: font 5 | # name: {\tt ...} 6 | # -- 7 | {\tt $1}$0 -------------------------------------------------------------------------------- /latex-mode/url.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: url 4 | # group: environments 5 | # name: \url 6 | # -- 7 | \url{${1:$$(yas/choose-value '("http" "ftp"))}://${2:address}}$0 -------------------------------------------------------------------------------- /latex-mode/use.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: use 4 | # group: misc 5 | # name: \usepackage 6 | # -- 7 | \usepackage[$2]{$1}$0 -------------------------------------------------------------------------------- /latex-mode/vdots: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: vdots 3 | # key: /. 4 | # group: math 5 | # condition: 'auto 6 | # -- 7 | \\vdots -------------------------------------------------------------------------------- /latex-mode/verb.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # contributor : Bjorn Reese 4 | # contributor : Song Qiang 5 | # key: verb 6 | # group: environments 7 | # name: \begin{verbatim} ... \end{verbatim} 8 | # -- 9 | \begin{verbatim} 10 | $0 11 | \end{verbatim} 12 | -------------------------------------------------------------------------------- /lisp-interaction-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | emacs-lisp-mode -------------------------------------------------------------------------------- /matlab-mode/switch: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Karthik Chikmagalur 3 | # name: switch 4 | # key: switch 5 | # -- 6 | switch ${1:variable} 7 | case ${2:value} 8 | $3 9 | otherwise 10 | end 11 | -------------------------------------------------------------------------------- /minibuffer-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | emacs-lisp-mode -------------------------------------------------------------------------------- /org-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | latex-mode -------------------------------------------------------------------------------- /org-mode/basic org header: -------------------------------------------------------------------------------- 1 | # key:
12 | #+latex_CLASS: ${9:article} 13 | #+latex_CLASS_OPTIONS: ${10:[10pt]} 14 | #+latex_HEADER: ${11:\input{${12:`(if (boundp 'my-preamble-file) my-preamble-file "")`}}} 15 | ${13:#+bibliography: ${14:`(car reftex-default-bibliography)`}} 16 | #+exclude_TAGS: noexport ignore 17 | #+startup: ${15:latexpreview} ${16:hideblocks} 18 | 19 | $0 20 | -------------------------------------------------------------------------------- /org-mode/hash-plus: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hash-plus 3 | # key: 3= 4 | # condition: (and (= (- (point) (line-beginning-position)) 2) 'auto) 5 | # -- 6 | #+$0 -------------------------------------------------------------------------------- /org-mode/latex_header_extra: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: latex_header_extra 3 | # key: lhe 4 | # condition: (save-excursion (backward-word) (bolp)) 5 | # -- 6 | #+latex_header_extra: $0 -------------------------------------------------------------------------------- /org-mode/reveal-html-columns: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal-html-columns 3 | # key: 6 | $0 7 | #+REVEAL_HTML: 8 | #+REVEAL_HTML:
9 | 10 | #+REVEAL_HTML:
-------------------------------------------------------------------------------- /org-mode/reveal-html-div: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal-html-div 3 | # key:
6 | $0 7 | #+REVEAL_HTML:
-------------------------------------------------------------------------------- /org-mode/reveal-html-span: -------------------------------------------------------------------------------- 1 | # key: 5 | $0 6 | #+REVEAL_HTML: -------------------------------------------------------------------------------- /org-mode/source block: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: source block 3 | # key: 6 | /dev/null " 13 | (shell-quote-argument s))) 0 -1) 14 | "\">\n" 17 | ))`${6:[VIDEO]} 18 | #+end_export 19 | $0 --------------------------------------------------------------------------------