source $VIMRUNTIME/defaults.vim let x = ($XDG_CONFIG_HOME??($HOME."/.config"))."/vim" execute 'set runtimepath='.x.','.&runtimepath.','.x.'/after' execute 'set packpath='.x.','.&packpath.','.x.'/after' packadd matchit let x = ($XDG_DATA_HOME??($HOME."/.local/share"))."/vim" if !isdirectory(x) call mkdir(x, "p", 0700) endif set backup execute 'set backupdir='.x.'//' set backupcopy=yes let x = ($XDG_STATE_HOME??($HOME."/.local/state"))."/vim" if !isdirectory(x) call mkdir(x, "p", 0700) endif set undofile execute 'set undodir='.x.'//' execute 'set viminfofile='.x.'/.viminfo' unlet x set autoindent set colorcolumn=80 highlight ColorColumn term=NONE ctermbg=0 autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab autocmd FileType todo setlocal colorcolumn=0 set cursorline set hlsearch set list set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■ set number set relativenumber autocmd InsertEnter * setlocal norelativenumber autocmd InsertLeave * setlocal relativenumber autocmd FocusLost * setlocal norelativenumber autocmd FocusGained * setlocal relativenumber highlight WhiteSpaceBol ctermfg=DarkBlue highlight WhiteSpaceMol ctermfg=Black match WhiteSpaceMol / / 2match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/ let g:EditorConfig_enable_for_new_buf = 1