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