From fff985021ceb132e4197fe28b58aa27cccd89972 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Sun, 21 Apr 2013 18:21:36 -0500 Subject: [PATCH 1/4] Correct the ref snippet and add package snippet --- UltiSnips/tex.snippets | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/UltiSnips/tex.snippets b/UltiSnips/tex.snippets index a3f3ccb..fd5372c 100644 --- a/UltiSnips/tex.snippets +++ b/UltiSnips/tex.snippets @@ -4,7 +4,7 @@ extends texmath # LATEX SNIPPETS # ########################################################################### -snippet r "\ref{}" w +snippet r "\\ref{}" w \ref{$1} endsnippet @@ -122,4 +122,12 @@ ${0} % subparagraph $2 (end) endsnippet +############### +# Utilities # +############### + +snippet pac "Package" b +\usepackage[${1:options}]{${2:package}}$0 +endsnippet + # vim:ft=snippets: From ed78c4db704ce953cdc1b4cbae7168114e4965a3 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Sun, 28 Apr 2013 11:01:16 -0500 Subject: [PATCH 2/4] Add BibLaTeX snippets and parenthesis snippet Signed-off-by: Rene Vergara Add a snippet for BibLaTeX for book, inbook, online and article. Add a snippet for LaTeX to enter a parenthesis pair. --- UltiSnips/bib.snippets | 50 ++++++++++++++++++++++++++++++++++++++++++ UltiSnips/tex.snippets | 4 ++++ 2 files changed, 54 insertions(+) create mode 100644 UltiSnips/bib.snippets diff --git a/UltiSnips/bib.snippets b/UltiSnips/bib.snippets new file mode 100644 index 0000000..8cfed9d --- /dev/null +++ b/UltiSnips/bib.snippets @@ -0,0 +1,50 @@ +snippet online "Online resource" b +@Online{${1:name}, + author={${2:author}}, + title={${3:title}}, + date={${4:date}}, + url={${5:url}} +} +$0 +endsnippet + +snippet article "Article reference" b +@Article{${1:name}, + author={${2:author}}, + title={${3:title}}, + journaltitle={${4:journal}}, + volume={${5:NN}}, + number={${6:NN}}, + year={${7:YYYY}}, + pages={${8:NN}--${9:NN}} +} +$0 +endsnippet + +snippet book "Book reference" b +@book{${1:name}, + author={${2:author}}, + title={${3:title}}, + subtitle={${4:subtitle}}, + year={${5:YYYY}}, + location={${6:somewhere}}, + publisher={${7:publisher}}, + pages={${8:NN}--${9:NN}} +} +$0 +endsnippet + +snippet inb "In Book reference" b +@Inbook{${1:name}, + author={${2:author}}, + title={${3:title}}, + subtitle={${4:subtitle}}, + booktitle={${5:book}}, + editor={${6:editor}}, + year={${7:YYYY}}, + location={${8:somewhere}}, + publisher={${9:publisher}}, + pages={${10:NN}--${11:NN}} +} +$0 +endsnippet diff --git a/UltiSnips/tex.snippets b/UltiSnips/tex.snippets index fd5372c..0f2f7dd 100644 --- a/UltiSnips/tex.snippets +++ b/UltiSnips/tex.snippets @@ -130,4 +130,8 @@ snippet pac "Package" b \usepackage[${1:options}]{${2:package}}$0 endsnippet + +snippet lp "Long parenthesis" +\left(${1:${VISUAL:contents}}\right)$0 +endsnippet # vim:ft=snippets: From 91bc8d43e29a12d5d62ad087d4047484ed42e368 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Sun, 28 Apr 2013 11:03:36 -0500 Subject: [PATCH 3/4] Add snippet for ledger Signed-off-by: Rene Vergara Add a snippet to enter a transaction into a ledger file to be used with the ledger accounting tool. Recommend to use the vim-ledger plugin for filetype detection. --- UltiSnips/ledger.snippets | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 UltiSnips/ledger.snippets diff --git a/UltiSnips/ledger.snippets b/UltiSnips/ledger.snippets new file mode 100644 index 0000000..6eee4c3 --- /dev/null +++ b/UltiSnips/ledger.snippets @@ -0,0 +1,6 @@ +snippet t "Transaction" b +${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} ${4:*} ${5:Payee} + ${6:Expenses} \$${7:0.00} + ${8:Assets:Checking} + +endsnippet From 2a1a32031d722bdd8eda499a9511284e33ebab0f Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Sun, 26 May 2013 15:48:58 -0500 Subject: [PATCH 4/4] Corrects formatting of snippets Signed-off-by: Rene Vergara --- UltiSnips/bib.snippets | 6 +++--- UltiSnips/ledger.snippets | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/UltiSnips/bib.snippets b/UltiSnips/bib.snippets index 8cfed9d..adbde15 100644 --- a/UltiSnips/bib.snippets +++ b/UltiSnips/bib.snippets @@ -1,5 +1,5 @@ snippet online "Online resource" b -@Online{${1:name}, +@online{${1:name}, author={${2:author}}, title={${3:title}}, date={${4:date}}, @@ -9,7 +9,7 @@ $0 endsnippet snippet article "Article reference" b -@Article{${1:name}, +@article{${1:name}, author={${2:author}}, title={${3:title}}, journaltitle={${4:journal}}, @@ -35,7 +35,7 @@ $0 endsnippet snippet inb "In Book reference" b -@Inbook{${1:name}, +@inbook{${1:name}, author={${2:author}}, title={${3:title}}, subtitle={${4:subtitle}}, diff --git a/UltiSnips/ledger.snippets b/UltiSnips/ledger.snippets index 6eee4c3..73beba6 100644 --- a/UltiSnips/ledger.snippets +++ b/UltiSnips/ledger.snippets @@ -1,6 +1,6 @@ snippet t "Transaction" b ${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} ${4:*} ${5:Payee} - ${6:Expenses} \$${7:0.00} + ${6:Expenses} \$${7:0.00} ${8:Assets:Checking} - +$0 endsnippet