Skip to content

Commit 0f0c3e2

Browse files
committed
update snippets of bib, tex, and python
bib.snip: fix place holders tex.snip: fix figure snippet and add snippets for math * fix option of includegraphics in figure * \frac and \left \right are implemented python.snip: rename fileidiom to with_open and update * rename filename to file * change mode to r (default)
1 parent a34e67d commit 0f0c3e2

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

neosnippets/bib.snip

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ alias @incollection
4242
author = {${2}},
4343
title = {${3}},
4444
booktitle = {${4}},
45-
year = {${4}},
45+
year = {${5}},
4646
memo = {editor, pages, organization, publisher, address, month, note},
4747
}
4848

@@ -83,9 +83,9 @@ alias @misc
8383
snippet online
8484
alias @online
8585
@online{${1:LABEL},
86-
author = {${1}},
87-
title = {${2}},
88-
url = {${3}},
86+
author = {${2}},
87+
title = {${3}},
88+
url = {${4}},
8989
note = {year/date},
9090
}
9191

neosnippets/python.snip

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ options head
5959
else:
6060
${0:pass}
6161

62-
snippet fileidiom
63-
abbr with open()
62+
snippet with_open
63+
alias fileidiom
6464
options head
65-
with open(${1:#:filename}, '${2:#:mode}') as ${3:f}:
65+
with open(${1:#:file}, '${2:r}') as ${3:f}:
6666
${0:pass}
6767

6868
snippet for

neosnippets/tex.snip

+14-3
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ snippet figure
212212
alias \begin{figure} \figure
213213
\begin{figure}[${1}]
214214
\centering
215-
\includegraphics[${2:width=}]{${3}}
216-
\caption{${4}}
217-
\label{${5}}
215+
\includegraphics[${2:width=${3\}}]{${4}}
216+
\caption{${5}}
217+
\label{${6}}
218218
\end{figure}
219219

220220
snippet filecontents
@@ -338,6 +338,17 @@ alias subparagraph \subparagraph{
338338
\subparagraph{${1}}
339339
${0:TARGET}
340340

341+
# ========== MATH ==========
342+
343+
snippet \frac
344+
alias frac \frac{
345+
\frac{${1}}{${2}}${0}
346+
347+
snippet \left
348+
alias left
349+
abbr \left \right
350+
\left${1:(} ${3:#:body} \right${2:)}${0}
351+
341352
# ========== FONT ==========
342353

343354
snippet bfseries

0 commit comments

Comments
 (0)