Extract vim indent code into plugin
This commit is contained in:
parent
86d112978e
commit
9c6ecb6426
2 changed files with 21 additions and 17 deletions
21
vim/plugin/indent.vim
Normal file
21
vim/plugin/indent.vim
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
if exists("$EXPANDTAB")
|
||||||
|
set expandtab
|
||||||
|
else
|
||||||
|
set noexpandtab
|
||||||
|
end
|
||||||
|
|
||||||
|
if exists("$TABSTOP")
|
||||||
|
let &tabstop=str2nr($TABSTOP)
|
||||||
|
else
|
||||||
|
set tabstop=3
|
||||||
|
end
|
||||||
|
|
||||||
|
" Just use the value of &tabstop
|
||||||
|
set shiftwidth=0
|
||||||
|
" I use proper tabstop anyway
|
||||||
|
set softtabstop=0
|
||||||
|
" Don't use shiftwidth for indentation
|
||||||
|
set nosmarttab
|
||||||
|
set autoindent
|
||||||
|
set smartindent
|
||||||
|
set smarttab
|
|
@ -74,23 +74,6 @@ set nowb
|
||||||
" set noswapfile
|
" set noswapfile
|
||||||
set swapfile
|
set swapfile
|
||||||
|
|
||||||
" Indentation, etc.
|
|
||||||
if exists("$EXPANDTAB")
|
|
||||||
set expandtab
|
|
||||||
else
|
|
||||||
set noexpandtab
|
|
||||||
end
|
|
||||||
if exists("$TABSTOP")
|
|
||||||
let &tabstop=str2nr($TABSTOP)
|
|
||||||
else
|
|
||||||
set tabstop=3
|
|
||||||
end
|
|
||||||
set shiftwidth=0 " Not needed
|
|
||||||
set softtabstop=0 " Not needed
|
|
||||||
set smarttab
|
|
||||||
set autoindent
|
|
||||||
set smartindent
|
|
||||||
set smarttab
|
|
||||||
set gdefault
|
set gdefault
|
||||||
|
|
||||||
" set wrap
|
" set wrap
|
||||||
|
|
Loading…
Reference in a new issue