~cyplo/dotfiles

ref: 1ca69547b9a678da7a89ac93b7822ac478a2ab7d dotfiles/.vimrc.settings -rwxr-xr-x 1.2 KiB
1ca69547 — Cyryl Płotnicki update 4 months ago
                                                                                
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
" global settings
set autoread
set nocompatible
set noswapfile
set undofile
set undodir=$HOME/.vim/undo
set spell spelllang=en_gb
set updatetime=300
set nobackup
set nowritebackup

" buffers can be switched despite having changes
set hidden

" file settings
set encoding=utf-8

" special chars
set listchars=tab:▸\ ,eol:¬
highlight NonText guifg=#4a4a59
highlight SpecialKey guifg=#4a4a59

" tabs and spaces
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab

" line ending
set fileformats=unix,dos

" colours
set t_Co=256
syntax enable
set background=dark
highlight clear SignColumn
colorscheme solarized

" appearance
set number
set relativenumber
set laststatus=2
set noshowmode
set showtabline=1 "only show tabline when more than 1 tab
set updatetime=300

" exclude quickfix from the buffers list
augroup qf
    autocmd!
    autocmd FileType qf set nobuflisted
augroup END

augroup filetype_yaml
    autocmd!
    autocmd BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=indent
    autocmd FileType yaml |
    setlocal shiftwidth=2 |
    setlocal softtabstop=2 |
    setlocal tabstop=2
augroup END

" vimdiff
set diffopt+=iwhite
set diffexpr=""