]> git.sev.monster Git - dotfiles.git/blame - etc/vim/.vimrc
zshrc: add syncwatch alias
[dotfiles.git] / etc / vim / .vimrc
CommitLineData
1b8a4102 1source $VIMRUNTIME/defaults.vim
2
afd175d7 3let x = ($XDG_CONFIG_HOME??($HOME.'/.config')).'/vim'
8d4a98e1 4execute 'set runtimepath='.x.','.&runtimepath.','.x.'/after'
5execute 'set packpath='.x.','.&packpath.','.x.'/after'
1b8a4102 6
8d4a98e1 7packadd matchit
fef7b7c4 8
afd175d7 9let x = ($XDG_STATE_HOME??($HOME.'/.local/state')).'/vim'
4850f4c2 10if !isdirectory(x)
afd175d7 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)
8d4a98e1 24endif
1b8a4102 25set backup
afd175d7 26execute 'set backupdir='.y.'//'
6abf57e0 27set backupcopy=yes
afd175d7 28
29let y = x.'/undo'
30if !isdirectory(y)
31 call mkdir(y, 'p', 0700)
8d4a98e1 32endif
1b8a4102 33set undofile
afd175d7 34execute 'set undodir='.y.'//'
35
4850f4c2 36unlet x
afd175d7 37unlet y
1b8a4102 38
39set autoindent
1b8a4102 40set colorcolumn=80
ddcfe43c 41highlight ColorColumn term=NONE ctermbg=0
1b8a4102 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
ddcfe43c 47autocmd FileType todo setlocal colorcolumn=0
1b8a4102 48
49set cursorline
50set hlsearch
1b8a4102 51set list
52set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■
53set number
54set relativenumber
ddcfe43c 55autocmd InsertEnter * setlocal norelativenumber
56autocmd InsertLeave * setlocal relativenumber
57autocmd FocusLost * setlocal norelativenumber
58autocmd FocusGained * setlocal relativenumber
fab483dd 59highlight WhiteSpaceBol ctermfg=DarkBlue
60highlight WhiteSpaceMol ctermfg=Black
61match WhiteSpaceMol / /
622match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/
ddcfe43c 63
e69caf64 64let g:EditorConfig_enable_for_new_buf = 1
This page took 0.51882 seconds and 4 git commands to generate.