Updated fix

This commit is contained in:
Marcin Woźniak 2020-08-30 15:13:25 +02:00
parent 75d6aa6ed3
commit 5b1d472097
2 changed files with 11 additions and 4 deletions

6
.vimrc
View File

@ -13,7 +13,7 @@ au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
" plugins " plugins
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', "{ 'on': 'NERDTreeToggle' } Plug 'preservim/nerdtree', "{ 'on': 'NERDTreeToggle' }
call plug#end() call plug#end()
" Status-line " Status-line
@ -83,3 +83,7 @@ nnoremap <F7> :tabprevious<CR>
nnoremap <F8> :tabnext<CR> nnoremap <F8> :tabnext<CR>
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
" Automatically deletes all trailing whitespace and newlines at end of file on save.
autocmd BufWritePre * %s/\s\+$//e
autocmd BufWritepre * %s/\n\+\%$//e

View File

@ -13,7 +13,7 @@ au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
" plugins " plugins
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree' Plug 'preservim/nerdtree'
Plug 'vimwiki/vimwiki' Plug 'vimwiki/vimwiki'
Plug 'nmante/vim-latex-live-preview' Plug 'nmante/vim-latex-live-preview'
Plug 'lervag/vimtex' Plug 'lervag/vimtex'
@ -128,8 +128,11 @@ autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo | set bg=light
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR> autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR> autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
" Automatically deletes all trailing whitespace and newlines at end of file on save.
autocmd BufWritePre * %s/\s\+$//e
autocmd BufWritepre * %s/\n\+\%$//e
" Auto add notes git " Auto add notes git
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown autocmd BufWritePost *.md :Prettier
"autocmd BufWritePost *.md :Prettier
"autocmd BufWritePost *.md execute '!git add % && git commit -m "Auto-commit: saved %" && git push' | redraw! "autocmd BufWritePost *.md execute '!git add % && git commit -m "Auto-commit: saved %" && git push' | redraw!