-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
81 lines (65 loc) · 2.39 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
" Activate syntax highlighting
syntax on
" Don't auto-create indents
filetype plugin indent on
" Backspace not limited to just inserted characters:
" (https://unix.stackexchange.com/a/307974)
set backspace=indent,eol,start
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autowrite
" Line numbers are disabled by default.
set nonumber
set nocursorline
highlight LineNr ctermfg=DarkGrey ctermbg=black
" Jump to search result and highlight results.
set incsearch
set hlsearch
highlight Search cterm=NONE ctermbg=Yellow ctermfg=black
" unicode options
set encoding=utf-8 "display file as utf-8 in terminal
set fileencoding=utf-8 "write file to disk as utf-8
" Improve visibility of hard tabs, non-breaking spaces and trailing spaces
set list listchars=tab:→·,nbsp:␣,trail:·
" Don't make spelling issues too annoying
highlight SpellBad cterm=underline ctermfg=red ctermbg=NONE
highlight SpellCap cterm=underline
autocmd Filetype gitcommit setlocal tw=70
autocmd Filetype python setlocal ts=4 sts=4 sw=4 expandtab
autocmd Filetype html setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype htmldjango setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype css setlocal ts=2 sw=2 sts=2 expandtab
autocmd Filetype scss setlocal ts=2 sw=2 sts=2 expandtab
autocmd Filetype svg setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype make setlocal noexpandtab
autocmd Filetype yaml setlocal ts=2 sw=2 sts=2 expandtab
autocmd Filetype bib setlocal ts=2 sw=2 sts=2 expandtab
autocmd Filetype markdown setlocal ts=2 sts=2 sw=2 expandtab tw=80
let g:tex_flavor = 'latex'
autocmd Filetype tex setlocal ts=2 sw=2 sts=2 expandtab tw=80 spell spelllang=de_de
autocmd Filetype conf setlocal ts=2 sts=2 sw=2 expandtab
" pgsql.vim
let g:sql_type_default = 'pgsql'
" Automatically rustfmt rust code on save
let g:rustfmt_autosave = 1
" Format python code with isort and black.
augroup format_python_code
autocmd!
autocmd BufWritePre *.py Isort
autocmd BufWritePre *.py Black
autocmd BufWritePost *.py call flake8#Flake8()
augroup end
" Setup fzf
set rtp+=~/.fzf
" Activate syntax highlighting from https://github.com/vim-python/python-syntax
let g:python_highlight_all = 1
" vim-flake8
let g:flake8_show_quickfix=0 " use :copen and :close to open/close the error message window
let g:flake8_show_in_file=1
" java-syntax.vim
highlight link javaIdentifier NONE
" Status line plugin config
set laststatus=2
set noshowmode