1 source $VIMRUNTIME/defaults.vim
3 let x = ($XDG_CONFIG_HOME??($HOME.'/.config')).'/vim'
4 execute 'set runtimepath='.x.','.&runtimepath.','.x.'/after'
5 execute 'set packpath='.x.','.&packpath.','.x.'/after'
9 let x = ($XDG_STATE_HOME??($HOME.'/.local/state')).'/vim'
11 call mkdir(x, 'p', 0700)
13 execute 'set viminfofile='.x.'/.viminfo'
17 call mkdir(y, 'p', 0700)
19 execute 'set directory='.y.'//'
23 call mkdir(y, 'p', 0700)
26 execute 'set backupdir='.y.'//'
31 call mkdir(y, 'p', 0700)
34 execute 'set undodir='.y.'//'
41 highlight ColorColumn term=NONE ctermbg=0
42 autocmd FileType python setlocal softtabstop=4 shiftwidth=4 expandtab
43 autocmd FileType markdown setlocal softtabstop=4 shiftwidth=4 expandtab
44 autocmd FileType javascript setlocal softtabstop=2 shiftwidth=2 expandtab
45 autocmd FileType json setlocal softtabstop=2 shiftwidth=2 expandtab
46 autocmd FileType html setlocal softtabstop=2 shiftwidth=2 expandtab
47 autocmd FileType todo setlocal colorcolumn=0
52 set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■
55 autocmd InsertEnter * setlocal norelativenumber
56 autocmd InsertLeave * setlocal relativenumber
57 autocmd FocusLost * setlocal norelativenumber
58 autocmd FocusGained * setlocal relativenumber
59 highlight WhiteSpaceBol ctermfg=DarkBlue
60 highlight WhiteSpaceMol ctermfg=Black
61 autocmd BufEnter * 2match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/
62 autocmd BufEnter * match WhiteSpaceMol / /
64 let g:EditorConfig_enable_for_new_buf = 1