summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrNuget <drnuget@outlook.com>2025-01-19 09:52:06 +0200
committerDrNuget <drnuget@outlook.com>2025-01-19 09:52:06 +0200
commit4d7d01c74d8488e6101bef87a204dce8fb509373 (patch)
treef0ebc4f4ad6a83d11e6c1217250af353cb126b65
parent25572391a991b5d3a36274901b3911f675d38108 (diff)
vimrc latex macros usepackage,subsubsection,titleformat
-rw-r--r--.config/nvim/init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index fb300c7..82614f6 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -32,12 +32,15 @@ vim.cmd([[
autocmd Filetype c inoremap f<tab> for(;;)<space>{<enter>}<esc><up>e2li
" LaTex Macros
+ autocmd Filetype tex inoremap up<tab> \usepackage{}<left>
autocmd Filetype tex inoremap equ<tab> \begin{equation*}<enter><enter>\end{equation*}<up><tab>
autocmd Filetype tex inoremap ig<tab> \includegraphics{}<left>
autocmd Filetype tex inoremap b<tab> \begin{}<enter>\end{}<esc>kf{a
autocmd Filetype tex inoremap e<tab> <esc>0f{lvf}hyj0f{pO
autocmd Filetype tex inoremap s<tab> \section{}<left>
autocmd Filetype tex inoremap ss<tab> \subsection{}<left>
+ autocmd Filetype tex inoremap sss<tab> \subsubsection{}<left>
+ autocmd Filetype tex inoremap tf<tab> {}<esc>yy4pki\titleformat<right>
]])