diff options
| author | Nanderty <psopka@sopka.ch> | 2023-09-23 12:45:34 +0200 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2023-09-23 12:45:34 +0200 |
| commit | e419285b1f90b0dc77cb3d20bd11ba3c01f5c3bc (patch) | |
| tree | f559371bf9599f30a3aa262b2cbe6f44692910d5 /lua/Snippets/tex/tables.lua | |
| parent | 52cd974b95bb59f6500426fe020a2983dc0d37eb (diff) | |
| download | neovim-config-e419285b1f90b0dc77cb3d20bd11ba3c01f5c3bc.tar.gz neovim-config-e419285b1f90b0dc77cb3d20bd11ba3c01f5c3bc.tar.bz2 neovim-config-e419285b1f90b0dc77cb3d20bd11ba3c01f5c3bc.zip | |
Snippets and code improvements
Diffstat (limited to 'lua/Snippets/tex/tables.lua')
| -rw-r--r-- | lua/Snippets/tex/tables.lua | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lua/Snippets/tex/tables.lua b/lua/Snippets/tex/tables.lua new file mode 100644 index 0000000..80531e1 --- /dev/null +++ b/lua/Snippets/tex/tables.lua @@ -0,0 +1,52 @@ +local helper = require('Snippets.luasniphelpers') +local helper = require('Snippets.luasniphelpers') + +return { + + s({ trig = 'tbl', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{table}[!h] + \centering + \begin{tabular}{ <> } + <> + \end{tabular} + \caption{<> + } + \label{fig:<>} +\end{table} +]], + { + i(1), + i(2), + i(3), + i(4), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'tbx', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{table}[!h] + \centering + \begin{tabularx}{\textwidth}{ <> } + <> + \end{tabularx} + \caption{<> + } + \label{fig:<>} +\end{table} +]], + { + i(1), + i(2), + i(3), + i(4), + } + ), + { condition = helper.line_begin } + ), + +} |
