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