Use tabs for indentation and spaces for alignment

This commit is contained in:
Anthony Rose 2019-08-05 10:54:46 +01:00
parent c1155dfd3a
commit bce6d644ed

112
vimrc
View file

@ -13,8 +13,8 @@ set nocompatible
" ======================================================================
" Load Pathogen if Vim does not support packages.
if !has("packages")
runtime pack/acp/opt/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect('pack/acp/start/{}')
runtime pack/acp/opt/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect('pack/acp/start/{}')
endif
" ======================================================================
@ -80,84 +80,84 @@ set wrap
" General settings for non-minimal Vim builds.
if has("eval")
" Protect commands that are only available when +eval is enabled.
" Technically only "if 1" would be required, as "has()" is provided
" by +eval, but this is clearer.
command Q q
command W w
command WQ wq
filetype plugin indent on
let g:go_version_warning=0
let g:netrw_altv=1
let g:netrw_banner=0
let g:netrw_browse_split=4
let g:netrw_liststyle=3
let g:netrw_sort_sequence='[\/]$,*'
let g:netrw_winsize=-28
let g:org_indent=0
let g:org_tag_column=78
" Set colour levels for different terminals.
if &term == "xterm-256color"
set t_Co=256
elseif &term == "xterm"
set t_Co=256
elseif &term == "rxvt-unicode"
set t_Co=256
else
set t_Co=16
endif
colorscheme PaperColor
" Protect commands that are only available when +eval is enabled.
" Technically only "if 1" would be required, as "has()" is provided
" by +eval, but this is clearer.
command Q q
command W w
command WQ wq
filetype plugin indent on
let g:go_version_warning=0
let g:netrw_altv=1
let g:netrw_banner=0
let g:netrw_browse_split=4
let g:netrw_liststyle=3
let g:netrw_sort_sequence='[\/]$,*'
let g:netrw_winsize=-28
let g:org_indent=0
let g:org_tag_column=78
" Set colour levels for different terminals.
if &term == "xterm-256color"
set t_Co=256
elseif &term == "xterm"
set t_Co=256
elseif &term == "rxvt-unicode"
set t_Co=256
else
set t_Co=16
endif
colorscheme PaperColor
endif
" ======================================================================
" Settings based on feature detection.
if has("autocmd")
autocmd BufRead,BufNewFile *.go set shiftwidth=8 tabstop=8
autocmd BufRead,BufNewFile *.html set shiftwidth=2
autocmd BufRead,BufNewFile *.md set filetype=markdown tabstop=4
autocmd BufRead,BufNewFile *.opml set shiftwidth=2
autocmd BufRead,BufNewFile *.xml set shiftwidth=2
autocmd BufRead,BufNewFile *.yml set shiftwidth=2
autocmd BufRead,BufNewFile *.go set shiftwidth=8 tabstop=8
autocmd BufRead,BufNewFile *.html set shiftwidth=2
autocmd BufRead,BufNewFile *.md set filetype=markdown tabstop=4
autocmd BufRead,BufNewFile *.opml set shiftwidth=2
autocmd BufRead,BufNewFile *.xml set shiftwidth=2
autocmd BufRead,BufNewFile *.yml set shiftwidth=2
endif
if has("folding")
set nofoldenable
set nofoldenable
endif
if has("gui_running")
if has("gui_gtk")
set clipboard=unnamedplus
set guifont=Iosevka\ Term\ Light\ 11,
\Liberation\ Mono\ 11,
\Monospace\ Regular\ 11
elseif has("gui_win32")
set clipboard=unnamed
set guifont=Source_Code_Pro:h9:cANSI:qDRAFT,
\Consolas:h10:cANSI
endif
set background=light
set columns=88
set guioptions+=cm
set guioptions-=T
set lines=40
if has("gui_gtk")
set clipboard=unnamedplus
set guifont=Iosevka\ Term\ Light\ 11,
\Liberation\ Mono\ 11,
\Monospace\ Regular\ 11
elseif has("gui_win32")
set clipboard=unnamed
set guifont=Source_Code_Pro:h9:cANSI:qDRAFT,
\Consolas:h10:cANSI
endif
set background=light
set columns=88
set guioptions+=cm
set guioptions-=T
set lines=40
endif
if has("patch-7.3.541")
set formatoptions+=j
set formatoptions+=j
endif
if has("printer")
set printheader=%t%h%m%=Page\ %N
set printoptions=paper:A4,number:y,syntax:n
set printheader=%t%h%m%=Page\ %N
set printoptions=paper:A4,number:y,syntax:n
endif
if has("smartindent")
set smartindent
set smartindent
endif
if has("syntax")
syntax on
syntax on
endif
" ======================================================================