mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-15 01:44:19 +00:00
Last commit before tagging and releasing
This commit is contained in:
0
extras/imported/LaTeX-mode/.yas-make-groups
Normal file
0
extras/imported/LaTeX-mode/.yas-make-groups
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Command — \command{…}
|
||||
# binding: "^E"
|
||||
# --
|
||||
\\${1:text${2:bf}}{`yas/selected-text`}
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: figure
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Figure
|
||||
# --
|
||||
${1:Figure}~\ref{${2:fig:}}$0
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: listing
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Listing
|
||||
# --
|
||||
${1:Listing}~\ref{${2:lst:}}$0
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: page
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Page
|
||||
# --
|
||||
${1:page}~\pageref{$2}$0
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: section
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Section
|
||||
# --
|
||||
${1:Section}~\ref{${2:sec:}}$0
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: table
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Table
|
||||
# --
|
||||
${1:Table}~\ref{${2:tab:}}$0
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Beamer Overlay Specification
|
||||
# binding: "^<"
|
||||
# --
|
||||
<${1:+-}>
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: begin
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: \begin{}…\end{}
|
||||
# --
|
||||
\\begin{${1:env}}
|
||||
${1/(enumerate|itemize|list)|(description)|.*/(?1:\item )(?2:\item)/}$0
|
||||
\\end{${1:env}}
|
||||
8
extras/imported/LaTeX-mode/Lists/Description.yasnippet
Normal file
8
extras/imported/LaTeX-mode/Lists/Description.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: desc
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Description
|
||||
# --
|
||||
\\begin{description}
|
||||
\item[$1] $0
|
||||
\\end{description}
|
||||
8
extras/imported/LaTeX-mode/Lists/Enumerate.yasnippet
Normal file
8
extras/imported/LaTeX-mode/Lists/Enumerate.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: enum
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Enumerate
|
||||
# --
|
||||
\\begin{enumerate}
|
||||
\item $0
|
||||
\\end{enumerate}
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: itd
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: \item[description]
|
||||
# --
|
||||
\\item[${1:description}] ${0:item}
|
||||
8
extras/imported/LaTeX-mode/Lists/Itemize.yasnippet
Normal file
8
extras/imported/LaTeX-mode/Lists/Itemize.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: item
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Itemize
|
||||
# --
|
||||
\\begin{itemize}
|
||||
\item $0
|
||||
\\end{itemize}
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Itemize Lines in Selection
|
||||
# binding: "^L"
|
||||
# --
|
||||
\begin{${1:itemize}}
|
||||
${TM_SELECTED_TEXT/^(([^\\]*):\s*)?(.+)$/\n\t\item(?1: [ $2 ]) $3/g}
|
||||
\end{${1:itemize}}
|
||||
10
extras/imported/LaTeX-mode/Math/Align.yasnippet
Normal file
10
extras/imported/LaTeX-mode/Math/Align.yasnippet
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: ali
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Align(ed)
|
||||
# --
|
||||
\begin{align`echo $TM_SCOPE|grep math|
|
||||
sed -e 's/.*math.*/ed/'`}
|
||||
$0
|
||||
\end{align`echo $TM_SCOPE|grep math|
|
||||
sed -e 's/.*math.*/ed/'`}
|
||||
9
extras/imported/LaTeX-mode/Math/Cases.yasnippet
Normal file
9
extras/imported/LaTeX-mode/Math/Cases.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: cas
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Cases
|
||||
# --
|
||||
\begin{cases}
|
||||
${1:equation}, &\text{ if }${2:case}\\\\
|
||||
$0
|
||||
\end{cases}
|
||||
8
extras/imported/LaTeX-mode/Math/Equation.yasnippet
Normal file
8
extras/imported/LaTeX-mode/Math/Equation.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: eq
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Equation
|
||||
# --
|
||||
\begin{equation}
|
||||
$0
|
||||
\end{equation}
|
||||
10
extras/imported/LaTeX-mode/Math/Gather(ed).yasnippet
Normal file
10
extras/imported/LaTeX-mode/Math/Gather(ed).yasnippet
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: gat
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Gather(ed)
|
||||
# --
|
||||
\begin{gather`echo $TM_SCOPE|grep math|
|
||||
sed -e 's/.*math.*/ed/'`}
|
||||
$0
|
||||
\end{gather`echo $TM_SCOPE|grep math|
|
||||
sed -e 's/.*math.*/ed/'`}
|
||||
8
extras/imported/LaTeX-mode/Math/Matrix.yasnippet
Normal file
8
extras/imported/LaTeX-mode/Math/Matrix.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: mat
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Matrix
|
||||
# --
|
||||
\begin{${1:p/b/v/V/B/small}matrix}
|
||||
$0
|
||||
\end{${1:p/b/v/V/B/small}matrix}
|
||||
8
extras/imported/LaTeX-mode/Math/Split.yasnippet
Normal file
8
extras/imported/LaTeX-mode/Math/Split.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: spl
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Split
|
||||
# --
|
||||
\begin{split}
|
||||
$0
|
||||
\end{split}
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Unnumbered Equation
|
||||
# binding: "^["
|
||||
# --
|
||||
\\[
|
||||
$0
|
||||
\\]
|
||||
9
extras/imported/LaTeX-mode/Sectioning/Chapter.yasnippet
Normal file
9
extras/imported/LaTeX-mode/Sectioning/Chapter.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: cha
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Chapter
|
||||
# --
|
||||
\chapter{${1:chapter name}} % (fold)
|
||||
\label{cha:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3)/g}}}
|
||||
`yas/selected-text`$0
|
||||
% chapter $2 (end)
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: par
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Paragraph
|
||||
# --
|
||||
\paragraph{${1:paragraph name}} % (fold)
|
||||
\label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3)/g}}}
|
||||
`yas/selected-text`$0
|
||||
% paragraph $2 (end)
|
||||
9
extras/imported/LaTeX-mode/Sectioning/Part.yasnippet
Normal file
9
extras/imported/LaTeX-mode/Sectioning/Part.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: part
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Part
|
||||
# --
|
||||
\part{${1:part name}} % (fold)
|
||||
\label{prt:${2:${1/(\w+)|\W+/(?1:\L$0:_)/g}}}
|
||||
`yas/selected-text`$0
|
||||
% part $2 (end)
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: subp
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Sub Paragraph
|
||||
# --
|
||||
\subparagraph{${1:subparagraph name}} % (fold)
|
||||
\label{subp:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3)/g}}}
|
||||
`yas/selected-text`$0
|
||||
% subparagraph $2 (end)
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: sec
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Section
|
||||
# --
|
||||
\section{${1:section name}} % (fold)
|
||||
\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3)/g}}}
|
||||
`yas/selected-text`$0
|
||||
% section $2 (end)
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: sub
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Sub Section
|
||||
# --
|
||||
\subsection{${1:subsection name}} % (fold)
|
||||
\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3)/g}}}
|
||||
`yas/selected-text`$0
|
||||
% subsection $2 (end)
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: subs
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Sub Sub Section
|
||||
# --
|
||||
\subsubsection{${1:subsubsection name}} % (fold)
|
||||
\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3)/g}}}
|
||||
`yas/selected-text`$0
|
||||
% subsubsection $2 (end)
|
||||
7
extras/imported/LaTeX-mode/Tables/New Line.yasnippet
Normal file
7
extras/imported/LaTeX-mode/Tables/New Line.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Add Row
|
||||
# binding: ""
|
||||
# --
|
||||
\\\\
|
||||
$0${TM_CURRENT_LINE/^[^&]+|[^&]+$|([^&]+)/ (?1: )/g}
|
||||
8
extras/imported/LaTeX-mode/Tables/Tabular.yasnippet
Normal file
8
extras/imported/LaTeX-mode/Tables/Tabular.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: tab
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Tabular
|
||||
# --
|
||||
\\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}}
|
||||
$0${2/((?<=.)c|l|r)|./(?1: & )/g}
|
||||
\\end{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: $$
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Display Math — \[ … \]
|
||||
# binding: "^M"
|
||||
# --
|
||||
\[
|
||||
`yas/selected-text`$1
|
||||
\]
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Math Mode — \( … \)
|
||||
# binding: "^M"
|
||||
# --
|
||||
\( `yas/selected-text`$1 \)
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Environment — \begin{}…\end{}
|
||||
# binding: "^@W"
|
||||
# --
|
||||
${TM_SELECTED_TEXT/(\s*).*/$1/m}\begin{${1:environment}}
|
||||
${TM_SELECTED_TEXT/(.+)|\n\z/(?1:\t$0)/g}
|
||||
${TM_SELECTED_TEXT/(\s*).*/$1/m}\end{${1:environment}}
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: left…right — \left…\right
|
||||
# binding: "^L"
|
||||
# --
|
||||
${TM_SELECTED_TEXT/(.*)(.)/\\left$1\\right$2/}
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Double Quotes
|
||||
# binding: "^`"
|
||||
# --
|
||||
\`\``yas/selected-text`''
|
||||
Reference in New Issue
Block a user