diff options
author | Amin Bandali <bandali@gnu.org> | 2019-08-27 00:46:57 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2019-08-27 01:38:32 -0400 |
commit | 2b3c93ec75a0c69ba421bd11260cd46cac70b536 (patch) | |
tree | 52d113ce46162c5c7efdeb87a8cbf8c8713e3f9b | |
parent | 3b3615f5761d8949046d65906d3f324eec9b18e8 (diff) | |
download | configs-2b3c93ec75a0c69ba421bd11260cd46cac70b536.tar.gz configs-2b3c93ec75a0c69ba421bd11260cd46cac70b536.tar.xz configs-2b3c93ec75a0c69ba421bd11260cd46cac70b536.zip |
emacs: yasnippet: add some convenience snippets for latex-mode
12 files changed, 71 insertions, 0 deletions
diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/cite b/.emacs.d/etc/yasnippet/snippets/latex-mode/cite new file mode 100644 index 0000000..058bd2b --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/cite @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: cite +# key: c +# -- +${1:~}\cite{${2:$$(unless yas-modified-p (mapconcat 'identity (reftex-citation 'dont-insert) ","))}} $0
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/emph b/.emacs.d/etc/yasnippet/snippets/latex-mode/emph new file mode 100644 index 0000000..36b19d7 --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/emph @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: emph +# key: e +# -- +\emph{$1}$0
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/enumerate b/.emacs.d/etc/yasnippet/snippets/latex-mode/enumerate new file mode 100644 index 0000000..df51892 --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/enumerate @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: enumerate +# key: ol +# -- +\begin{enumerate} +$0 +\end{enumerate}
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/item b/.emacs.d/etc/yasnippet/snippets/latex-mode/item new file mode 100644 index 0000000..d4773f5 --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/item @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: item +# key: - +# -- +\item $0
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/item-li b/.emacs.d/etc/yasnippet/snippets/latex-mode/item-li new file mode 100644 index 0000000..1bc93b5 --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/item-li @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: item-li +# key: li +# type: command +# -- +(yas-expand-snippet (yas-lookup-snippet "item"))
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/itemize b/.emacs.d/etc/yasnippet/snippets/latex-mode/itemize new file mode 100644 index 0000000..eb97984 --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/itemize @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: itemize +# key: ul +# -- +\begin{itemize} +$0 +\end{itemize}
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/label b/.emacs.d/etc/yasnippet/snippets/latex-mode/label new file mode 100644 index 0000000..8a98d7e --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/label @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: label +# key: lbl +# -- +\label{$0}
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/newcommand b/.emacs.d/etc/yasnippet/snippets/latex-mode/newcommand new file mode 100644 index 0000000..e9e03ca --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/newcommand @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: newcommand +# key: cmd +# -- +\newcommand{\\${1:name}}${2:[${3:0}]}{$0}
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/section b/.emacs.d/etc/yasnippet/snippets/latex-mode/section new file mode 100644 index 0000000..88faeab --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/section @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: section +# key: sec +# -- +\section{${1:name}} +\label{sec:${2:label}} + +$0
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/subsection b/.emacs.d/etc/yasnippet/snippets/latex-mode/subsection new file mode 100644 index 0000000..0bb1c5b --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/subsection @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: subsection +# key: ssec +# -- +\subsection{${1:name}} +\label{subsec:${2:label}} + +$0
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/textbf b/.emacs.d/etc/yasnippet/snippets/latex-mode/textbf new file mode 100644 index 0000000..84171d7 --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/textbf @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: textbf +# key: b +# -- +\textbf{$1}$0
\ No newline at end of file diff --git a/.emacs.d/etc/yasnippet/snippets/latex-mode/usepackage b/.emacs.d/etc/yasnippet/snippets/latex-mode/usepackage new file mode 100644 index 0000000..2afd38b --- /dev/null +++ b/.emacs.d/etc/yasnippet/snippets/latex-mode/usepackage @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: usepackage +# key: pkg +# -- +\usepackage{$0}
\ No newline at end of file |