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_DATA_HOME??($HOME."/.local/share"))."/vim"
11 call mkdir(x, "p", 0700)
14 execute 'set backupdir='.x.'//'
16 let x = ($XDG_STATE_HOME??($HOME."/.local/state"))."/vim"
18 call mkdir(x, "p", 0700)
21 execute 'set undodir='.x.'//'
22 execute 'set viminfofile='.x.'/.viminfo'
27 highlight ColorColumn term=NONE ctermbg=0
28 autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab
29 autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab
30 autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab
31 autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab
32 autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab
33 autocmd FileType todo setlocal colorcolumn=0
38 set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■
41 autocmd InsertEnter * setlocal norelativenumber
42 autocmd InsertLeave * setlocal relativenumber
43 autocmd FocusLost * setlocal norelativenumber
44 autocmd FocusGained * setlocal relativenumber
45 highlight WhiteSpaceBol ctermfg=DarkBlue
46 highlight WhiteSpaceMol ctermfg=Black
47 match WhiteSpaceMol / /
48 2match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/
50 let g:EditorConfig_enable_for_new_buf = 1