1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

change vim script style from 4-space indent to 2-space

This commit is contained in:
jdhao
2020-09-26 09:15:40 +08:00
parent c248ab02d4
commit b65c7c6d70
14 changed files with 343 additions and 344 deletions

View File

@@ -15,6 +15,11 @@ set foldmethod=expr foldlevel=0 foldlevelstart=-1
" see `:h K` and https://stackoverflow.com/q/15867323/6064933
set keywordprg=:help
set tabstop=2 " number of visual spaces per TAB
set softtabstop=2 " number of spaces in tab when editing
set shiftwidth=2 " number of spaces to use for autoindent
set expandtab " expand tab to spaces so that tabs are spaces
" Only define following variable if Auto-pairs plugin is used
if &runtimepath =~? 'auto-pairs'
let b:AutoPairs = AutoPairsDefine({'<' : '>'})

View File

@@ -24,9 +24,7 @@ augroup END
augroup resume_edit_position
autocmd!
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | execute "normal! g`\"zvzz"
\ | endif
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit' | execute "normal! g`\"zvzz" | endif
augroup END
" Display a message when the current file is not in utf-8 format.
@@ -34,8 +32,7 @@ augroup END
" https://github.com/vim/vim/issues/4379
augroup non_utf8_file_warn
autocmd!
autocmd BufRead * if &fileencoding != 'utf-8'
\ | unsilent echomsg 'File not in UTF-8 format!' | endif
autocmd BufRead * if &fileencoding != 'utf-8' | unsilent echomsg 'File not in UTF-8 format!' | endif
augroup END
" Automatically reload the file if it is changed outside of Nvim, see

View File

@@ -15,14 +15,12 @@ if g:is_win || g:is_mac
echomsg 'Installing Vim-plug on your system'
silent execute '!curl -fLo ' . g:VIM_PLUG_PATH . ' --create-dirs '
\ . 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
augroup plug_init
autocmd!
autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
augroup END
else
echoerr 'Curl must be available to install vim-plug, or you may install '
\ . 'vim-plug by yourself.'
echoerr 'Curl not available on your system, you may install vim-plug by yourself.'
finish
endif
endif
@@ -753,8 +751,7 @@ if ( g:is_win || g:is_mac ) && executable('latex')
if g:is_win
let g:vimtex_view_general_viewer = 'SumatraPDF'
let g:vimtex_view_general_options_latexmk = '-reuse-instance'
let g:vimtex_view_general_options
\ = '-reuse-instance -forward-search @tex @line @pdf'
let g:vimtex_view_general_options = '-reuse-instance -forward-search @tex @line @pdf'
endif
if g:is_mac