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'
10 if !isdirectory($HOME . "/.local/share/vim")
11 call mkdir($HOME . "/.local/share/vim", "p", 0700)
14 set backupdir=$HOME/.local/share/vim//
16 if !isdirectory($HOME . "/.local/state/vim")
17 call mkdir($HOME . "/.local/state/vim", "p", 0700)
20 set undodir=$HOME/.local/state/vim//
24 highlight ColorColumn term=NONE ctermbg=0
25 autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab
26 autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab
27 autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab
28 autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab
29 autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab
30 autocmd FileType todo setlocal colorcolumn=0
35 set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■
38 autocmd InsertEnter * setlocal norelativenumber
39 autocmd InsertLeave * setlocal relativenumber
40 autocmd FocusLost * setlocal norelativenumber
41 autocmd FocusGained * setlocal relativenumber
42 highlight WhiteSpaceBol ctermfg=DarkBlue
43 highlight WhiteSpaceMol ctermfg=Black
44 match WhiteSpaceMol / /
45 2match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/
47 " vim: set et fenc=utf-8 ft=vim sts=4 sw=4 ts=8 tw=79 :