]>
Commit | Line | Data |
---|---|---|
1b8a4102 | 1 | source $VIMRUNTIME/defaults.vim |
2 | ||
8d4a98e1 | 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' | |
1b8a4102 | 6 | |
8d4a98e1 | 7 | packadd matchit |
fef7b7c4 | 8 | |
4850f4c2 | 9 | let x = ($XDG_DATA_HOME??($HOME."/.local/share"))."/vim" |
10 | if !isdirectory(x) | |
11 | call mkdir(x, "p", 0700) | |
8d4a98e1 | 12 | endif |
1b8a4102 | 13 | set backup |
4850f4c2 | 14 | execute 'set backupdir='.x.'//' |
6abf57e0 | 15 | set backupcopy=yes |
4850f4c2 | 16 | let x = ($XDG_STATE_HOME??($HOME."/.local/state"))."/vim" |
17 | if !isdirectory(x) | |
18 | call mkdir(x, "p", 0700) | |
8d4a98e1 | 19 | endif |
1b8a4102 | 20 | set undofile |
4850f4c2 | 21 | execute 'set undodir='.x.'//' |
22 | execute 'set viminfofile='.x.'/.viminfo' | |
23 | unlet x | |
1b8a4102 | 24 | |
25 | set autoindent | |
1b8a4102 | 26 | set colorcolumn=80 |
ddcfe43c | 27 | highlight ColorColumn term=NONE ctermbg=0 |
1b8a4102 | 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 | |
ddcfe43c | 33 | autocmd FileType todo setlocal colorcolumn=0 |
1b8a4102 | 34 | |
35 | set cursorline | |
36 | set hlsearch | |
1b8a4102 | 37 | set list |
38 | set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■ | |
39 | set number | |
40 | set relativenumber | |
ddcfe43c | 41 | autocmd InsertEnter * setlocal norelativenumber |
42 | autocmd InsertLeave * setlocal relativenumber | |
43 | autocmd FocusLost * setlocal norelativenumber | |
44 | autocmd FocusGained * setlocal relativenumber | |
fab483dd | 45 | highlight WhiteSpaceBol ctermfg=DarkBlue |
46 | highlight WhiteSpaceMol ctermfg=Black | |
47 | match WhiteSpaceMol / / | |
48 | 2match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/ | |
ddcfe43c | 49 | |
fef7b7c4 | 50 | " vim: set et fenc=utf-8 ft=vim sts=4 sw=4 ts=8 tw=79 : |