commit 810c771d81debab7f261c6bc288b4acb49d67d16
parent 20e5084b57fee2b2c4fb96d7fd577942445f924c
Author: oscarbenedito <oscar@oscarbenedito.com>
Date:   Tue, 31 Mar 2020 12:30:39 +0200

Added some vim templates

Diffstat:
Mdot_config/nvim/init.vim | 11++++++++++-
Adot_config/nvim/templates/shebang.sh | 1+
Adot_config/nvim/templates/summary.tex | 30++++++++++++++++++++++++++++++
Adot_config/nvim/templates/tex.Makefile | 7+++++++
Adot_config/nvim/templates/tex.gitignore | 7+++++++
5 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/dot_config/nvim/init.vim b/dot_config/nvim/init.vim @@ -19,7 +19,10 @@ autocmd BufRead,BufNewFile *.cls set filetype=tex autocmd BufRead,BufNewFile *.sty set filetype=tex " nerd tree shortcut -map <C-n> :NERDTreeToggle<CR> +" map <C-n> :NERDTreeToggle<CR> + +" find in subdirectories +set path+=** " copying to clipboard set clipboard=unnamedplus @@ -99,3 +102,9 @@ set modeline set colorcolumn=81 " color line 81 differently set textwidth=80 " break lines longer than 80 characters map <F2> <Esc>:w<CR>:!make<CR> + +" templates +nnoremap ,sh :-1read $XDG_CONFIG_HOME/nvim/templates/shebang.sh<CR>:w<CR>:e<CR>j +nnoremap ,texs :-1read $XDG_CONFIG_HOME/nvim/templates/summary.tex<CR> +nnoremap ,texg :-1read $XDG_CONFIG_HOME/nvim/templates/tex.gitignore<CR> +nnoremap ,texm :-1read $XDG_CONFIG_HOME/nvim/templates/tex.Makefile<CR> diff --git a/dot_config/nvim/templates/shebang.sh b/dot_config/nvim/templates/shebang.sh @@ -0,0 +1 @@ +#!/usr/bin/env sh diff --git a/dot_config/nvim/templates/summary.tex b/dot_config/nvim/templates/summary.tex @@ -0,0 +1,30 @@ +\documentclass[12pt,a4paper]{article} +\usepackage[utf8]{inputenc} +\usepackage[margin=1in]{geometry} +\usepackage{hyperref} +\usepackage[<+language+>]{babel} + +\hypersetup{ + pdfauthor = {Oscar Benedito}, + pdftitle = {<+title+>}, + colorlinks, + linkcolor=blue +} + +% \renewcommand{\contentsname}{Índex} + +\begin{document} + +\begin{center} + {\LARGE\scshape <+title+>} + + \quad + + Oscar Benedito +\end{center} + +% \tableofcontents + + + +\end{document} diff --git a/dot_config/nvim/templates/tex.Makefile b/dot_config/nvim/templates/tex.Makefile @@ -0,0 +1,7 @@ +all: main + +main: *.tex + pdflatex main.tex + +clean: + rm -f *.aux *.log *.out *.auxlock *.toc *.ind *.ilg *.idx *.pdf diff --git a/dot_config/nvim/templates/tex.gitignore b/dot_config/nvim/templates/tex.gitignore @@ -0,0 +1,7 @@ +*.pdf +*.log +*.[oa] +*.out +*.toc +*.aux +*.auxlock