Nuevos cambios en los snippets, comienzo a implementar snippets automáticos

This commit is contained in:
Ricman 2025-04-17 22:58:04 -03:00
parent 5bc15398d6
commit 32b29419f7
1 changed files with 82 additions and 11 deletions

View File

@ -13,13 +13,27 @@ vim.keymap.set({ 'i', 's' }, '<C-h>', function()
end) end)
return { return {
-- AUTOSNIPPETS
s(
{ trig = ';ait', snippetType = 'autosnippet' },
fmt(
[[
\\
{} &= {}
]],
{ i(1), i(0) }
)
),
-- NORMAL SNIPPETS
s( s(
'utninf', 'utninf',
fmt( fmt(
[[ [[
\documentclass[12pt a4paper]{{article}} \documentclass[12pt]{{article}}
\usepackage[spanish]{{babel}} \usepackage[spanish]{{babel}}
\usepackage[utf8]{{inputenc}} \usepackage[utf8]{{inputenc}}
\usepackage{{csquotes}}
% Interlineado 1.5 % Interlineado 1.5
\usepackage{{setspace}} \usepackage{{setspace}}
@ -29,7 +43,7 @@ return {
\usepackage{{mathptmx}} \usepackage{{mathptmx}}
% Acomodar margenes del documento % Acomodar margenes del documento
\usepackage[margin=2cm]{{geometry}} \usepackage[a4paper, margin=2cm, top=3cm, headheight=50pt]{{geometry}}
% Paquetes comunes % Paquetes comunes
\usepackage{{graphicx, float}} \usepackage{{graphicx, float}}
@ -37,14 +51,43 @@ return {
\usepackage{{enumerate}} \usepackage{{enumerate}}
\usepackage[colorlinks=true, citecolor=blue]{{hyperref}} \usepackage[colorlinks=true, citecolor=blue]{{hyperref}}
% Encabezados
\usepackage{{fancyhdr}}
\pagestyle{{fancy}}
\fancyhf{{}}
\fancyfoot[C]{{\thepage}}
\fancyhead[L]{{
\includegraphics[height=1.2cm]{{C:/Users/ricar/OneDrive/Escritorio/Ingeniería en Sistemas/logo_utn.png}}
\shortstack[l]{{
{{\footnotesize Universidad Tecnológica Nacional}} \\
{{\footnotesize Facultad Regional Córdoba}} \\
{{\footnotesize Extensión Áulica Bariloche}}
}}
}}
\fancyhead[C]{{
\shortstack[c]{{
{{\footnotesize {}}} \\
{{\footnotesize {}}} \\
{{\footnotesize }}
}}
}}
\fancyhead[R]{{
\shortstack[r]{{
{{\footnotesize Profesor: {}}} \\
{{\footnotesize Alumno: Ricardo Nicolás Freccero}} \\
{{\footnotesize Fecha: {}}}
}}
}}
% Para bibliografía % Para bibliografía
%\usepackage[backend=biber, style=apa]{{biblatex}} %\usepackage[backend=biber, style=apa]{{biblatex}}
%\addbibresource{{bibliografia.bib}} %\addbibresource{{bibliografia.bib}}
\begin{{document}} \begin{{document}}
\newgeometry{{margin=2cm, top=1.5cm}}
\begin{{titlepage}} \begin{{titlepage}}
\centering \centering
\includegraphics[width=\linewidth]{{C:/Users/ricar/OneDrive/Escritorio/Ingerniería en Sistemas/logo_utn.jpg}}\\[1cm] \includegraphics[width=\linewidth]{{C:/Users/ricar/OneDrive/Escritorio/Ingeniería en Sistemas/logo_utn_frc.jpg}}\\
\textsc{{ \textsc{{
\LARGE Universidad Tecnológica Nacional\\ \LARGE Universidad Tecnológica Nacional\\
@ -60,11 +103,13 @@ return {
\LARGE \LARGE
{} {}
\rule{{\linewidth}}{{1.0mm}}\\ \rule{{\linewidth}}{{1.0mm}}\\
\Large \large
\begin{{flushleft}} \begin{{flushleft}}
Profesor: {} Profesor: {}
Ayudante: {} Ayudante: {}
Fecha: {}
\end{{flushleft}} \end{{flushleft}}
\vfill \vfill
@ -75,6 +120,7 @@ return {
\end{{flushright}} \end{{flushright}}
\end{{titlepage}} \end{{titlepage}}
\restoregeometry
\tableofcontents \tableofcontents
\newpage \newpage
@ -95,12 +141,17 @@ return {
\end{{document}} \end{{document}}
]], ]],
{ {
i(1), rep(2),
rep(3),
rep(5),
rep(7),
i(1, 'Año'),
i(2, 'Materia'), i(2, 'Materia'),
i(3, 'Número del TP'), i(3, 'Trabajo Práctico N°'),
i(4, 'Nombre del TP'), i(4, 'Título'),
i(5), i(5, 'Nombre Profesor'),
i(6), i(6, 'Nombre Ayudante'),
i(7, 'Fecha'),
i(0), i(0),
} }
) )
@ -124,7 +175,7 @@ return {
} }
) )
), ),
s('item', t '\\item '), s('item', { t { '', '', '\\item ' } }),
s( s(
'begin', 'begin',
fmt( fmt(
@ -150,7 +201,7 @@ return {
[[ [[
\begin{{figure}}{} \begin{{figure}}{}
\centering \centering
\includegraphics[width={}\linewidth{{{}}} \includegraphics[width={}\linewidth]{{{}}}
\caption{{{}}} \caption{{{}}}
\label{{fig:{}}} \label{{fig:{}}}
\end{{figure}} \end{{figure}}
@ -169,4 +220,24 @@ return {
} }
) )
), ),
s(
'align',
fmt(
[[
\begin{{align}}{}
{} &= {}
\end{{align}}
{}
]],
{
c(1, {
t '',
fmt('[{}]', { i(1, 'H') }),
}),
i(2),
i(3),
i(0),
}
)
),
} }