vimrc/after/ftplugin/tex.vim
Arija A. e025e29839
Init
Signed-off-by: Arija A. <ari@ari.lt>
2025-07-05 13:27:02 +03:00

35 lines
761 B
VimL
Executable file

fun! MakeNewLaTeXFile()
put ='\documentclass{article}'
put ='\usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}'
put ='\usepackage{hyperref}'
put =''
put ='\hypersetup{'
put =' colorlinks = true,'
put =' urlcolor = blue,'
put =' linkcolor = blue,'
put =' citecolor = red'
put ='}'
put =''
put =''
put ='\title{}'
put ='\author{}'
put ='\date{\today}'
put =''
put =''
put ='\begin{document}'
put ='\maketitle'
put ='\tableofcontents'
put ='\pagebreak{}'
put =''
put ='\end{document}'
put =''
norm ggdd
endfun
augroup NewTexFile
autocmd!
if line('$') == 1 && col('$') == 1
call MakeNewLaTeXFile()
endif
augroup END