From 098e5b0937ddc260af8eb48c97c3ad9194433f8b Mon Sep 17 00:00:00 2001 From: TiynGER Date: Mon, 18 May 2020 02:03:19 +0200 Subject: [PATCH] latex formatter added --- .config/aliasrc | 5 ++++- .config/nvim/init.vim | 29 ++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.config/aliasrc b/.config/aliasrc index c0226ad..ffc9eb5 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -27,7 +27,10 @@ srd() { find ~/ownCloud/* -type f | grep ".pdf" | fzf | xargs -r $READER ;} alias grep="grep --color=auto" # haste -haste() { a=$(cat); curl -X POST -s -d "$a" https://paste.tiyn.eu/documents | awk -F '"' '{print "https://paste.tiyn.eu/"$4}'; } +haste() { + a=$(cat); + curl -X POST -s -d "$a" https://paste.tiyn.eu/documents | awk -F '"' '{print "https://paste.tiyn.eu/"$4}'; +} #khal alias calendar="khal" diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 1ccbf10..8e74f52 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -74,18 +74,6 @@ let g:vim_markdown_no_default_key_mappings=1 " End Plugin section -" Start Formatting section - -autocmd FileType java,python,c noremap gggqG - -au FileType python setlocal formatprg=autopep8\ - - -au FileType java setlocal formatprg=google-java-format\ - - -au FileType c setlocal formatprg=astyle\ --mode=c - -" End Formatting section - let mapleader ="," set go=a @@ -96,7 +84,6 @@ set clipboard+=unnamedplus set wildmode=longest,list,full " Setting Tab-length set expandtab -set tabstop=4 set softtabstop=4 set shiftwidth=4 " Splits open at the bottom and right, which is non-retarded, unlike vim defaults. @@ -161,3 +148,19 @@ vnoremap "+y cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! " Alias for replacing nnoremap S :%s//gI + +" Start Formatting section + +autocmd FileType java,python,c,tex,latex noremap gggqG + +au FileType python setlocal formatprg=autopep8\ - + +au FileType java setlocal formatprg=google-java-format\ - +autocmd FileType java setlocal shiftwidth=2 softtabstop=2 + +au FileType c setlocal formatprg=astyle\ --mode=c + +au FileType tex,latex setlocal formatprg=latexindent\ - + +" End Formatting section +