diff options
| author | _Tradam <[email protected]> | 2024-05-29 16:26:51 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-29 16:26:51 +0000 |
| commit | 1fd0ab69521d5cc0b8c82adb1dabd766540f245c (patch) | |
| tree | 90e64b5e8e499d3dc79caaa6288af36d5788f2b1 | |
| parent | 8c2168ed238d2a7815e7ff7eb31b83a1172e10d5 (diff) | |
| download | Vim-Configs-1fd0ab69521d5cc0b8c82adb1dabd766540f245c.tar.gz Vim-Configs-1fd0ab69521d5cc0b8c82adb1dabd766540f245c.zip | |
| -rw-r--r-- | init.vim | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -89,6 +89,27 @@ augroup enable_spellcheck_when_relevant \*.txt,*.wiki call EnableSpellCheck() augroup END +function! GitPushOnSave() + "set statusline=GPOS + " + silent! execute('! [ "$(git rev-parse --abbrev-ref HEAD)" = "wip" ]') + if !v:shell_error + silent! execute('!git add -A && git commit -m. && git push') + set statusline=PassedWIPCheck + if !v:shell_error + set statusline=Pushed + else + set statusline=FailedToPush + endif + endif + +endfunction + +augroup git_push_on_save + autocmd! + silent autocmd BufWritePost * call GitPushOnSave() +augroup END + " Toggle Autoindenting Code on filesave nnoremap g= :let b:PlugView=winsaveview()<CR>gg=G:call winrestview(b:PlugView) <CR> @@ -207,9 +228,7 @@ Plug 'mhinz/neovim-remote' Plug 'ziglang/zig.vim' " Markdown Preview -"Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, -" \'for': ['markdown', 'vim-plug']} -Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' } +Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } " Autogenerate Markdown Table of Contents Plug 'mzlogin/vim-markdown-toc' |
