]> git.sev.monster Git - dotfiles.git/blame_incremental - etc/vim/.vimrc
zshrc: use int for _sev_exectime
[dotfiles.git] / etc / vim / .vimrc
... / ...
CommitLineData
1source $VIMRUNTIME/defaults.vim
2
3let x = ($XDG_CONFIG_HOME??($HOME.'/.config')).'/vim'
4execute 'set runtimepath='.x.','.&runtimepath.','.x.'/after'
5execute 'set packpath='.x.','.&packpath.','.x.'/after'
6
7packadd matchit
8
9let x = ($XDG_STATE_HOME??($HOME.'/.local/state')).'/vim'
10if !isdirectory(x)
11 call mkdir(x, 'p', 0700)
12endif
13execute 'set viminfofile='.x.'/.viminfo'
14
15let y = x.'/swap'
16if !isdirectory(y)
17 call mkdir(y, 'p', 0700)
18endif
19execute 'set directory='.y.'//'
20
21let y = x.'/backup'
22if !isdirectory(y)
23 call mkdir(y, 'p', 0700)
24endif
25set backup
26execute 'set backupdir='.y.'//'
27set backupcopy=yes
28
29let y = x.'/undo'
30if !isdirectory(y)
31 call mkdir(y, 'p', 0700)
32endif
33set undofile
34execute 'set undodir='.y.'//'
35
36unlet x
37unlet y
38
39set autoindent
40set colorcolumn=80
41highlight ColorColumn term=NONE ctermbg=0
42autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab
43autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab
44autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab
45autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab
46autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab
47autocmd FileType todo setlocal colorcolumn=0
48
49set cursorline
50set hlsearch
51set list
52set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■
53set number
54set relativenumber
55autocmd InsertEnter * setlocal norelativenumber
56autocmd InsertLeave * setlocal relativenumber
57autocmd FocusLost * setlocal norelativenumber
58autocmd FocusGained * setlocal relativenumber
59highlight WhiteSpaceBol ctermfg=DarkBlue
60highlight WhiteSpaceMol ctermfg=Black
61match WhiteSpaceMol / /
622match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/
63
64let g:EditorConfig_enable_for_new_buf = 1
This page took 0.029979 seconds and 4 git commands to generate.