]> git.sev.monster Git - dotfiles.git/blame_incremental - etc/vim/.vimrc
replace modeline with editorconfig; small fixes
[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_DATA_HOME??($HOME."/.local/share"))."/vim"
10if !isdirectory(x)
11 call mkdir(x, "p", 0700)
12endif
13set backup
14execute 'set backupdir='.x.'//'
15set backupcopy=yes
16let x = ($XDG_STATE_HOME??($HOME."/.local/state"))."/vim"
17if !isdirectory(x)
18 call mkdir(x, "p", 0700)
19endif
20set undofile
21execute 'set undodir='.x.'//'
22execute 'set viminfofile='.x.'/.viminfo'
23unlet x
24
25set autoindent
26set colorcolumn=80
27highlight ColorColumn term=NONE ctermbg=0
28autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab
29autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab
30autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab
31autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab
32autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab
33autocmd FileType todo setlocal colorcolumn=0
34
35set cursorline
36set hlsearch
37set list
38set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■
39set number
40set relativenumber
41autocmd InsertEnter * setlocal norelativenumber
42autocmd InsertLeave * setlocal relativenumber
43autocmd FocusLost * setlocal norelativenumber
44autocmd FocusGained * setlocal relativenumber
45highlight WhiteSpaceBol ctermfg=DarkBlue
46highlight WhiteSpaceMol ctermfg=Black
47match WhiteSpaceMol / /
482match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/
49
50let g:EditorConfig_enable_for_new_buf = 1
This page took 0.027533 seconds and 4 git commands to generate.