mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-01-30 22:57:54 +00:00
Update UltiSnips snippets
This commit is contained in:
parent
083b2c666f
commit
b818e30a2f
@ -29,3 +29,37 @@ ${2:Gabriel Arazas}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet ie "Parenthetical material Latin 'id est' (ie)" iw
|
||||
(i.e., $1) $0
|
||||
endsnippet
|
||||
|
||||
snippet eg "Parenthetical material Latin 'exempli gratia' (eg)" iw
|
||||
(e.g., $1) $0
|
||||
endsnippet
|
||||
|
||||
snippet em "Quick em dash"
|
||||
—
|
||||
endsnippet
|
||||
|
||||
snippet em-mat "Em dash material" iw
|
||||
— $1 — $0
|
||||
endsnippet
|
||||
|
||||
snippet em-ie "'id est' surrounded with em dash" iw
|
||||
— i.e., $1 — $0
|
||||
endsnippet
|
||||
|
||||
snippet em-eg "'exempli gratia' surrounded with em dash" iw
|
||||
— e.g., $1 — $0
|
||||
endsnippet
|
||||
|
||||
# Quick word snippets
|
||||
# Each of these quick word snippets has a prefix of `qw-`
|
||||
snippet qw-lx "LaTeX" iw
|
||||
LaTeX
|
||||
endsnippet
|
||||
|
||||
snippet qw-as "Asciidoctor" iw
|
||||
Asciidoctor
|
||||
endsnippet
|
||||
|
||||
|
@ -12,16 +12,32 @@ def smart_space(next_str, auto_str=" ", loose=False):
|
||||
endglobal
|
||||
|
||||
# Text formatting
|
||||
snippet "h(\d)" "Quick header snippet" biw
|
||||
snippet "h(\d)" "Quick header snippet" bir
|
||||
`!p
|
||||
header_level = int(match.group(1))
|
||||
legit_header_level = True if header_level >= 1 and header_level <= 6 else False
|
||||
|
||||
snip.rv = "#" * header_level if legit_header_level else ""
|
||||
snip.rv = "=" * header_level if legit_header_level else ""
|
||||
`
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet ch "Chapter header" bi
|
||||
|
||||
|
||||
|
||||
|
||||
== $1
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet "sh(\d)" "Section header" bir
|
||||
|
||||
|
||||
`!p snip.rv = "=" * int(match.group(1))`
|
||||
endsnippet
|
||||
|
||||
snippet bf "Boldface" iw
|
||||
**$1** $0
|
||||
endsnippet
|
||||
@ -171,3 +187,25 @@ snippet abstract "Abstract block" bi
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet append "Appendix block" bi
|
||||
[appendix]
|
||||
== ${1:Appendix}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet stem "Stem block" bi
|
||||
[stem]
|
||||
++++
|
||||
$1
|
||||
++++
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet mstem "Stem macro" iw
|
||||
stem:[$1] $0
|
||||
endsnippet
|
||||
|
||||
snippet foot "Footnote macro" iw
|
||||
footnote:[$1] $0
|
||||
endsnippet
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
snippet usnip "A working snippet for creating UltiSnips snippets" ib
|
||||
`!p snip.rv = "snippet"` ${1:<word_trigger>} ${2:<description>} ${3:<flags>}
|
||||
`!p snip.rv = "snippet"` ${1:<word_trigger>} "${2:<description>}" ${3:<flags>}
|
||||
$4
|
||||
`!p snip.rv = "endsnippet"`
|
||||
$0
|
||||
|
Loading…
Reference in New Issue
Block a user