From 7aec0a394162b238525415a27a41f3297ff87373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Sun, 30 Aug 2020 20:43:23 +0200 Subject: [PATCH] Updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .vimrc-gentoo | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.vimrc-gentoo b/.vimrc-gentoo index 95029e4..e0d019f 100644 --- a/.vimrc-gentoo +++ b/.vimrc-gentoo @@ -13,7 +13,7 @@ au BufWritePre * let &bex = '@' . strftime("%F.%H:%M") " plugins call plug#begin('~/.vim/plugged') -Plug 'preservim/nerdtree' +Plug 'preservim/nerdtree' Plug 'vimwiki/vimwiki' Plug 'nmante/vim-latex-live-preview' Plug 'lervag/vimtex' @@ -22,9 +22,9 @@ Plug 'jceb/vim-orgmode' Plug 'prettier/vim-prettier', { 'do': 'npm install --force' } Plug 'iamcco/markdown-preview.nvim', { 'do': 'npm install --force' } " Problem with vim-prettier -" -" git checkout -b test origin/feature/issue-232-add-support-for-prettier-2.x; -" npm install --force +" +" git checkout -b test origin/feature/issue-232-add-support-for-prettier-2.x; +" npm install --force call plug#end() " Vim wiki @@ -33,7 +33,9 @@ let wiki.path = '~/git/notes/' let wiki.path_html = '~/vimwiki_html/' let wiki.syntax = 'default' let wiki.ext = '.wiki' +let wiki.text_ignore_newline = 0 let g:vimwiki_list = [wiki] +let g:vimwiki_list_ignore_newline = 1 let g:vimwiki_table_mappings = 0 " Status-line @@ -132,7 +134,10 @@ autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q! autocmd BufWritePre * %s/\s\+$//e autocmd BufWritepre * %s/\n\+\%$//e -" Auto add notes git -autocmd BufWritePost *.md :Prettier -"autocmd BufWritePost *.md execute '!git add % && git commit -m "Auto-commit: saved %" && git push' | redraw! +" Autoformating markdown +autocmd BufWritePost *.md :Prettier +au BufRead,BufNewFile *.md setlocal textwidth=80 +" Auto add notes git +au BufRead,BufNewFile *.wiki setlocal textwidth=80 +autocmd BufWritePost *.wiki execute '!git add % && git commit -m "Auto-commit: saved %" && git push' | redraw!