From 5aab839415af4c7c64a43e0e69d5590a2ac66e9e Mon Sep 17 00:00:00 2001 From: tiynger Date: Fri, 18 Oct 2019 10:19:23 +0200 Subject: [PATCH] more vim tex snippets added --- .config/nvim/init.vim | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 735d41f..fcc1300 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -6,7 +6,7 @@ if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim endif -set bg=light +"set bg=light set go=a set mouse=a set nohlsearch @@ -29,14 +29,24 @@ set splitbelow splitright vnoremap "+y map "+P +" Mapping Dictionaries +map :setlocal spell! spelllang=de +map :set spelllang=en_us + " Read files correctly autocmd BufRead,BufNewFile *.tex set filetype=tex -" Compiler for languages -map c :w! \| !compiler % - +""" LATEX " Clean LaTex build files autocmd VimLeave *.tex !texclear % +autocmd FileType tex inoremap ,ul \begin{itemize}\end{itemize}<++>3kA\item +autocmd FileType tex inoremap ,li \item +autocmd FileType tex inoremap ,sec \section{}<++>2kf}i +autocmd FileType tex inoremap ,ssec \subsection{}<++>2kf}i +autocmd FileType tex inoremap ,sssec \subsubsection{}<++>2kf}i + +" Compiler for languages +map c :w! \| !compiler % " Delete trailing whitespaces on save autocmd BufWritePre * %s/\s\+$//e