From 81ccea43ea126e9cb08a3af1afb22f9f0d4fc216 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Mon, 17 Aug 2020 14:54:08 +0200 Subject: [PATCH] =?UTF-8?q?Retab=20vim=20scripts=20=F0=9F=92=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vim/plugin/autosave.vim | 14 +++++++------- vim/plugin/colors.vim | 28 ++++++++++++++-------------- vim/plugin/git.vim | 20 ++++++++++---------- vim/plugin/scratch.vim | 4 ++-- vim/plugin/surround.vim | 32 ++++++++++++++++---------------- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/vim/plugin/autosave.vim b/vim/plugin/autosave.vim index 42dc5c0..f464de2 100644 --- a/vim/plugin/autosave.vim +++ b/vim/plugin/autosave.vim @@ -1,16 +1,16 @@ " Extend autosavefeature :) function! TryAutosave() - if &autowriteall - if &mod - silent write - end - redraw - end + if &autowriteall + if &mod + silent write + end + redraw + end endfunction if exists("$AUTOSAVE") - set autowriteall + set autowriteall end augroup autosave diff --git a/vim/plugin/colors.vim b/vim/plugin/colors.vim index ee4667f..3ec0384 100644 --- a/vim/plugin/colors.vim +++ b/vim/plugin/colors.vim @@ -2,21 +2,21 @@ let g:only_generic_hl=1 com! Dark silent! let g:colors_name_bak = g:colors_name - \ | let g:ayucolor="dark" - \ | let g:arcadia_Daybreak=0 - \ | let g:arcadia_Midnight=1 - \ | let g:alduin_Shout_Become_Ethereal=1 - \ | set bg=dark - \ | silent! exec "colorscheme ".g:colors_name_bak - \ | silent! delc PaperColor + \ | let g:ayucolor="dark" + \ | let g:arcadia_Daybreak=0 + \ | let g:arcadia_Midnight=1 + \ | let g:alduin_Shout_Become_Ethereal=1 + \ | set bg=dark + \ | silent! exec "colorscheme ".g:colors_name_bak + \ | silent! delc PaperColor com! Light silent! let g:colors_name_bak = g:colors_name - \ | let g:ayucolor="light" - \ | let g:arcadia_Daybreak=1 - \ | let g:arcadia_Midnight=0 - \ | let g:alduin_Shout_Become_Ethereal=0 - \ | set bg=light - \ | silent! exec "colorscheme ".g:colors_name_bak - \ | silent! delc PaperColor + \ | let g:ayucolor="light" + \ | let g:arcadia_Daybreak=1 + \ | let g:arcadia_Midnight=0 + \ | let g:alduin_Shout_Become_Ethereal=0 + \ | set bg=light + \ | silent! exec "colorscheme ".g:colors_name_bak + \ | silent! delc PaperColor " Commands for some colorschemes I often use com! Ayu colorscheme ayu diff --git a/vim/plugin/git.vim b/vim/plugin/git.vim index ddbd67e..ab2df79 100644 --- a/vim/plugin/git.vim +++ b/vim/plugin/git.vim @@ -232,25 +232,25 @@ au BufWritePost * try | let b:blame=git_blame("","") | catch | unlet! b:bla command! -range -nargs=? Blame call blame_command(, , ) command! -range DBlame !git blame % -L , command! GitNext call git_next() - \| GitInfo + \| GitInfo command! GitPrev call git_prev() - \| GitInfo + \| GitInfo command! GitGoBlame call go_blame() - \| GitInfo + \| GitInfo command! GitFirst call git_first() | call s:git_info() command! GitLast call git_last() | call s:git_info() command! GitInfo call git_info() command! -nargs=1 GitCheckout call file_at_revision() command! -nargs=? GitCompare try - \| call s:gitroot() | call git_diff() - \| catch - \| echo 'Not a git repo!' - \| endtry + \| call s:gitroot() | call git_diff() + \| catch + \| echo 'Not a git repo!' + \| endtry command! GitRoot call cd_git_root('%') command! GitOrig exec 'e '.b:git_original_file command! ShowGitRoot try - \| echo gitroot() - \| catch | echo 'Not a git repository' - \| endtry + \| echo gitroot() + \| catch | echo 'Not a git repository' + \| endtry augroup END diff --git a/vim/plugin/scratch.vim b/vim/plugin/scratch.vim index 5449949..7629469 100644 --- a/vim/plugin/scratch.vim +++ b/vim/plugin/scratch.vim @@ -1,3 +1,3 @@ command! -nargs=? Scratch enew - \ | set filetype= - \ | set buftype=nofile + \ | set filetype= + \ | set buftype=nofile diff --git a/vim/plugin/surround.vim b/vim/plugin/surround.vim index 80297e4..1f3d1c2 100644 --- a/vim/plugin/surround.vim +++ b/vim/plugin/surround.vim @@ -28,57 +28,57 @@ endf " └──────────┘ function! s:dquote_op(type) - normal `[m<`]m> - call surround(a:type, '"', '"') + normal `[m<`]m> + call surround(a:type, '"', '"') endf nnoremap " :set operatorfunc=dquote_opg@ vnoremap " :call vsurround('"', '"') function! s:squote_op(type) - normal `[m<`]m> - call surround(a:type, "'", "'") + normal `[m<`]m> + call surround(a:type, "'", "'") endf nnoremap ' :set operatorfunc=squote_opg@ vnoremap ' :call vsurround("'", "'") function! s:paren_op(type) - normal `[m<`]m> - call surround(a:type, "(", ")") + normal `[m<`]m> + call surround(a:type, "(", ")") endf nnoremap ( :set operatorfunc=paren_opg@ vnoremap ( :call vsurround("(", ")") function! s:pracket_op(type) - normal `[m<`]m> - call surround(a:type, "[", "]") + normal `[m<`]m> + call surround(a:type, "[", "]") endf nnoremap [ :set operatorfunc=bracket_opg@ vnoremap [ :call vsurround("[", "]") function! s:brace_op(type) - normal `[m<`]m> - call surround(a:type, "{", "}") + normal `[m<`]m> + call surround(a:type, "{", "}") endf nnoremap { :set operatorfunc=brace_opg@ vnoremap { :call vsurround("{", "}") function! s:angle_op(type) - normal `[m<`]m> - call surround(a:type, "<", ">") + normal `[m<`]m> + call surround(a:type, "<", ">") endf nnoremap < :set operatorfunc=angle_opg@ vnoremap < :call vsurround("<", ">") function! s:backtick_op(type) - normal `[m<`]m> - call surround(a:type, "`", "`") + normal `[m<`]m> + call surround(a:type, "`", "`") endf nnoremap ` :set operatorfunc=backtick_opg@ vnoremap ` :call vsurround("`", "`") function! s:asterisk_op(type) - normal `[m<`]m> - call surround(a:type, "*", "*") + normal `[m<`]m> + call surround(a:type, "*", "*") endf nnoremap * :set operatorfunc=asterisk_opg@ vnoremap * :call vsurround("*", "*")