snippet "\\?b(egin)?" "\begin{}…\end{}" br
\begin{${1:something}}
${2:${VISUAL}}
\end{$1}$0
endsnippet
snippet "enum(erate)?" "\begin{enumerate}…\end{enumerate}" br
\begin{enumerate}
\item $1
\end{enumerate}$0
endsnippet
snippet itz "\begin{itemize}…\end{itemize}" b
\begin{itemize}
\item $1
\end{itemize}$0
endsnippet
snippet desc "\begin{description}…\end{description}" b
\begin{description}
\item[$1] $2
\end{description}$0
endsnippet
global !p
def fix_indent(snip):
vim.eval('feedkeys("\<c-f>")')
endglobal
post_expand "fix_indent(snip)"
snippet "\\?i(tem)?" "\item" br
\item $0
endsnippet
snippet "chap(ter)?" "\chapter{}" br
\chapter{${1:chapter name}}$0
endsnippet
snippet up "\usepackage" b
\usepackage[${1:options}]{${2:package}}$0
endsnippet
snippet it "\textit{}" w
\textit{${1:${VISUAL}}}$0
endsnippet
snippet bf "\textbf{}" w
\textbf{${1:${VISUAL}}}$0
endsnippet
snippet gr "\textgreek{}" w
\textgreek{${1:${VISUAL}}}$0
endsnippet
snippet "sec(tion)?" "\section{}" br
\section{${1:${VISUAL:section name}}}$0
endsnippet
snippet "sec(tion)?\*" "\section*{}" br
\section*{${1:${VISUAL:section name}}}$0
endsnippet
snippet "sub(sec)?" "\subsection{}" br
\subsection{${1:${VISUAL:subsection name}}}$0
endsnippet
snippet "sub(sec)?\*" "\subsection*{}" br
\subsection*{${1:${VISUAL:subsection name}}}%
endsnippet
snippet "ssub(sec)?" "\subsubsection{}" br
\subsubsection{${1:${VISUAL:subsubsection name}}}$0
endsnippet
snippet "ssub(sec)?\*" "\subsubsection*{}" br
\subsubsection*{${1:${VISUAL:subsubsection name}}}$0
endsnippet
snippet fc "\footcite[][]{}" w
\footcite[${1:pre text}][${2:post text}]{${3:citation}}${0}
endsnippet
snippet fn "\footnote" w
\footnote{${1}}${0}
endsnippet
snippet fold "Make a fold [[-,-]]" b
% [[- ${1:label}
${2:${VISUAL}}
% -]] $1$0
endsnippet
snippet foldsec "Make a fold with a section [[-,-]]" b
% [[- ${1:label}
\section{$1}
${2:${VISUAL}}
% -]] $1$0
endsnippet
snippet foldsubsec "Make a fold with a subsection [[-,-]]" b
% [[- ${1:label}
\subsection{$1}
${2:${VISUAL}}
% -]] $1$0
endsnippet
snippet foldsec* "Make a fold with a section* [[-,-]]" b
% [[- ${1:label}
\section*{$1}
${2:${VISUAL}}
% -]] $1$0
endsnippet
snippet foldsubsec* "Make a fold with a subsection* [[-,-]]" b
% [[- ${1:label}
\subsection*{$1}
${2:${VISUAL}}
% -]] $1$0
endsnippet
snippet tq "\textquote[<citation>][<punctuation>]{<quote>}" w
\textquote[${2:citation}][${3:punctuation}]{${1:quote${VISUAL}}}$0
endsnippet
snippet eq "\enquote{<quote>}" w
\enquote{${1:quote${VISUAL}}}$0
endsnippet
snippet notes "Skeleton for LaTeX notes the way I like" b
% [[- LaTeX prelude
\documentclass[12pt,letterpaper]{article}
\usepackage[no-math]{fontspec}
\setmainfont{Baskerville}
\usepackage[nolocalmarks]{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage[variant=classic]{latin}
\setotherlanguage[variant=ancient]{greek}
\newfontfamily\greekfont[Script=Greek,Scale=MatchLowercase]{GFS Neohellenic}
\usepackage{fnpct}
\usepackage{titlesec}
\titleformat*{\section}{\large\bfseries}
\titleformat*{\subsection}{\bfseries}
\titleformat*{\subsubsection}{\bfseries}
\usepackage{parskip}
\usepackage{csquotes}
\DeclareAutoPunct{.,}
\renewcommand{\mkcitation}[1]{\footnote{#1}}
\renewcommand{\mktextquote}[6]{#1#2#4#5#3#6}
\usepackage[style=windycity,citetracker=context,backend=biber]{biblatex}
\addbibresource{${1:plato}.bib}
\usepackage{enumitem}
\setlist{noitemsep}
\usepackage[super]{nth}
\begin{hyphenrules}{latin}
\hyphenation{}
\end{hyphenrules}
\begin{hyphenrules}{greek}
\hyphenation{}
\end{hyphenrules}
\usepackage{fancyhdr}
\fancypagestyle{notes}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\lhead{}
\chead{\MakeUppercase{${2:Notes on ${3:Something}}}}
\rhead{}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
}
\fancypagestyle{bibliography}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\lhead{}
\chead{\MakeUppercase{Bibliography}}
\rhead{}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
}
\newcommand{\MONTH}{%
\ifcase\the\month
\or January% 1
\or February% 2
\or March% 3
\or April% 4
\or May% 5
\or June% 6
\or July% 7
\or August% 8
\or September% 9
\or October% 10
\or November% 11
\or December% 12
\fi}
% -]] Latex prelude
% [[- LaTeX document
\begin{document}
% [[- Title page
\begin{titlepage}
\title{$2}
\author{Peter Aronoff}
\date{`date +%B\ %Y`--\MONTH\ \the\year}
\maketitle
\thispagestyle{empty}
\end{titlepage}
% -]] Title page
\pagestyle{notes}
$0
\end{document}
% -]] LaTeX document
endsnippet
snippet bibdouble "Bibliography with primary and secondary sources" b
% [[- Bibliography
\newpage
\pagestyle{bibliography}
\defbibfilter{primary}{%
keyword=primary
}
\defbibfilter{secondary}{%
keyword=secondary
}
\nocite{*}
\printbibliography[filter=primary,title={Primary Sources}]
\printbibliography[filter=secondary,title={Secondary Sources}]
% -]] Bibliography$0
endsnippet
snippet bibsimple "Simple bibliography" b
% [[- Bibliography
\newpage
\pagestyle{bibliography}
\nocite{${1:*}}
\printbibliography[${2:filter=${3:keyword}},title={Bibliography}]
% -]] Bibliography$0
endsnippet
snippet bibclassical "Classics bibliography" b
% [[- Bibliography
\newpage
\pagestyle{bibliography}
\nocite{${1:*}}
\defbibfilter{sources}{%
( keyword=edition or keyword=translation or keyword=commentary )
and
keyword=${2:keyword}
}
\defbibfilter{secondary}{%
keyword=secondary and keyword=$2
}
\printbibliography[filter=sources,title={Ancient Sources: Editions, Translations, Commentaries}]
\printbibliography[filter=secondary,title=Secondary Literature]
% -]] Bibliography
$0
endsnippet