From b65c7c6d702ba0371e917066b55a58cf14f2d1bb Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 26 Sep 2020 09:15:40 +0800 Subject: change vim script style from 4-space indent to 2-space --- after/ftplugin/vim.vim | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'after/ftplugin/vim.vim') diff --git a/after/ftplugin/vim.vim b/after/ftplugin/vim.vim index efea738..4f92851 100644 --- a/after/ftplugin/vim.vim +++ b/after/ftplugin/vim.vim @@ -9,16 +9,21 @@ set formatoptions-=r " focus is lost (see " https://github.com/tmux-plugins/vim-tmux-focus-events/issues/14) set foldmethod=expr foldlevel=0 foldlevelstart=-1 - \ foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText() + \ foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText() " Use :help command for keyword when pressing `K` in vim file, " 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({'<' : '>'}) + let b:AutoPairs = AutoPairsDefine({'<' : '>'}) - " Do not use `"` for vim script since `"` is also used for comment - let b:AutoPairs = {'(':')', '[':']', '{':'}', "'":"'", '`':'`', '<':'>'} + " Do not use `"` for vim script since `"` is also used for comment + let b:AutoPairs = {'(':')', '[':']', '{':'}', "'":"'", '`':'`', '<':'>'} endif -- cgit v1.2.3