]> git.sev.monster Git - dotfiles.git/blame - etc/vim/.vimrc
major rework
[dotfiles.git] / etc / vim / .vimrc
CommitLineData
1b8a4102 1source $VIMRUNTIME/defaults.vim
2
8d4a98e1 3let x = ($XDG_CONFIG_HOME??($HOME."/.config"))."/vim"
4execute 'set runtimepath='.x.','.&runtimepath.','.x.'/after'
5execute 'set packpath='.x.','.&packpath.','.x.'/after'
6unlet x
1b8a4102 7
8d4a98e1 8packadd matchit
fef7b7c4 9
8d4a98e1 10if !isdirectory($HOME . "/.local/share/vim")
11 call mkdir($HOME . "/.local/share/vim", "p", 0700)
12endif
1b8a4102 13set backup
8d4a98e1 14set backupdir=$HOME/.local/share/vim//
6abf57e0 15set backupcopy=yes
8d4a98e1 16if !isdirectory($HOME . "/.local/state/vim")
17 call mkdir($HOME . "/.local/state/vim", "p", 0700)
18endif
1b8a4102 19set undofile
8d4a98e1 20set undodir=$HOME/.local/state/vim//
1b8a4102 21
22set autoindent
1b8a4102 23set colorcolumn=80
ddcfe43c 24highlight ColorColumn term=NONE ctermbg=0
1b8a4102 25autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab
26autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab
27autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab
28autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab
29autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab
ddcfe43c 30autocmd FileType todo setlocal colorcolumn=0
1b8a4102 31
32set cursorline
33set hlsearch
1b8a4102 34set list
35set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■
36set number
37set relativenumber
ddcfe43c 38autocmd InsertEnter * setlocal norelativenumber
39autocmd InsertLeave * setlocal relativenumber
40autocmd FocusLost * setlocal norelativenumber
41autocmd FocusGained * setlocal relativenumber
fab483dd 42highlight WhiteSpaceBol ctermfg=DarkBlue
43highlight WhiteSpaceMol ctermfg=Black
44match WhiteSpaceMol / /
452match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/
ddcfe43c 46
fef7b7c4 47" vim: set et fenc=utf-8 ft=vim sts=4 sw=4 ts=8 tw=79 :
This page took 0.066896 seconds and 4 git commands to generate.