-" Plugins will be downloaded under the specified directory.
-" The Plugin manager project is on https://github.com/junegunn/vim-plug
-call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
-
-" Declare the list of plugins.
-" 42 Header on F1
-Plug 'https://github.com/42Paris/42header'
-
-Plug 'vim-latex/vim-latex'
-
-" List ends here. Plugins become visible to Vim after this call.
-call plug#end()
+"" Plugins will be downloaded under the specified directory.
+"" The Plugin manager project is on https://github.com/junegunn/vim-plug
+"call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
+"
+"Plug 'vim-latex/vim-latex'
+"
+"" List ends here. Plugins become visible to Vim after this call.
+"call plug#end()
" May be useful for vim-latex?
let g:tex_flavor='latex'
-" Defining name and email for the 42 header
-let g:user42 = 'ljiriste'
-let g:mail42 = 'ljiriste@student.42prague.com'
-
set nocompatible
set tabstop=4
set shiftwidth=0
filetype plugin indent on " redundant after syntax on
autocmd FileType gitcommit set spell spelllang=en_us
-autocmd FileType tex set spell spelllang=en_us
+autocmd FileType tex set spell spelllang=en_us,cs
function Cpp_class(classname)
let skel = join(readfile(glob('~/.vim/templates/class_skeleton.h')), "\n")
let skel = substitute(skel, 'CLASSNAME_H', toupper(a:classname) . "_H", 'g')
put! =skel
endfunction
+
+function Make_latex(target)
+ let skel = join(readfile(glob('~/.vim/templates/Makefile_latex')), "\n")
+ let skel = substitute(skel, 'target.pdf', a:target . '.pdf', 'g')
+ put! =skel
+endfunction
--- /dev/null
+
+TARGETS := target.pdf
+
+DEPS_DIR := .deps
+
+LATEXMK := latexmk \
+ -recorder \
+ -use-make \
+ -deps \
+ -e 'warn qq(In Makefile, turn off custion dependencies\n);' \
+ -e '@cus_dep_list=();' \
+ -e 'show_cus_dep()' \
+
+.PHONY : clean fclean re
+
+all : $(TARGETS)
+
+$(DEPS_DIR):
+ mkdir $@
+
+%.pdf : %.tex | $(DEPS_DIR)
+ $(LATEXMK) -pdf -dvi- -ps- -deps-out=$(DEPS_DIR)/$@.dep $<
+
+clean :
+ $(LATEXMK) -c
+
+fclean :
+ $(LATEXMK) -C
+ rm -rf $(DEPS_DIR)
+
+re : fclean
+ $(MAKE)