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