summaryrefslogtreecommitdiffstats
path: root/lua/Snippets/tex/sections.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/Snippets/tex/sections.lua')
-rw-r--r--lua/Snippets/tex/sections.lua65
1 files changed, 65 insertions, 0 deletions
diff --git a/lua/Snippets/tex/sections.lua b/lua/Snippets/tex/sections.lua
new file mode 100644
index 0000000..432a424
--- /dev/null
+++ b/lua/Snippets/tex/sections.lua
@@ -0,0 +1,65 @@
+local helper = require('Snippets.luasniphelpers')
+local helper = require('Snippets.luasniphelpers')
+
+return {
+
+ s({ trig = 'sec', snippetType = 'autosnippet' },
+ fmta(
+ '\\section{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+ s({ trig = 'nsec', snippetType = 'autosnippet' },
+ fmta(
+ '\\newpage\\section{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+ s({ trig = 'ssec', snippetType = 'autosnippet' },
+ fmta(
+ '\\subsection{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+ s({ trig = 'nssec', snippetType = 'autosnippet' },
+ fmta(
+ '\\newpage\\subsection{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+ s({ trig = 'ssec', snippetType = 'autosnippet' },
+ fmta(
+ '\\newpage\\subsubsection{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+ s({ trig = 'nsssec', snippetType = 'autosnippet' },
+ fmta(
+ '\\newpage\\subsubsection{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+}