-
Notifications
You must be signed in to change notification settings - Fork 0
/
aestetics.vim
99 lines (78 loc) · 2.14 KB
/
aestetics.vim
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
"---------------------
" Activate colorscheme
"---------------------
syntax enable
set t_Co=256
set background=dark
colorscheme focus
"------------------------
" Additional highlighting
"------------------------
set hlsearch " highlight search terms
set number " show line-numbers
set colorcolumn=76 " practice short code
set nowrap " don't wrap lines
set showmatch " show matching parenthesis
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' " Highlight VCS conflicts
"---------------
" OCD must haves
"---------------
" Hide toolbar when using graphical vim
if has('gui_running')
set guioptions=-t
endif
set scrolloff=10
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set shiftround
set cindent
set smarttab
set autoindent
set smartindent
set foldmethod=indent
set foldlevel=99
set splitbelow
set splitright
set list listchars=tab:→\ ,trail:·
"------------------------
" Improved the statusline
"------------------------
set statusline =
set statusline+=%#identifier#
set statusline+=%1*
set statusline+=%{Branch()}
set statusline+=%*
" Filename
set statusline+=%#identifier#
set statusline+=%1*
set statusline+=[%t]
" Flags
set statusline+=%2*
set statusline+=%h%m%r%w
set statusline+=%*
" Warning when file encoding is not utf-8
set statusline+=%#warningmsg#
set statusline+=%2*
set statusline+=\%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''}
set statusline+=%*
" Warning on syntax-error
set statusline+=%#warningmsg#
set statusline+=%2*
set statusline+=\%{SyntasticStatuslineFlag()}
set statusline+=%*
" Row & column
set statusline+=%*
set statusline+=%=
set statusline+=%<
set statusline+=%0*\ row:%l/%L\ \ col:%03c
set statusline+=%*
let g:syntastic_enable_signs = 1
fun! Branch()
let s:status = fugitive#statusline()
if (s:status != '')
return strpart(s:status, 4, strlen(s:status) - 5)
endif
return ''
endfun