-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvimrc.after
79 lines (62 loc) · 2.13 KB
/
vimrc.after
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
au BufReadPost * if &readonly | setlocal nomodifiable | else | setlocal modifiable | endif
au FileType ruby setlocal shiftwidth=2 tabstop=2 expandtab
au FileType javascript setlocal shiftwidth=2 tabstop=2 expandtab
au FileType coffee setlocal shiftwidth=2 tabstop=2 expandtab
au FileType less setlocal shiftwidth=2 tabstop=2 expandtab
au FileType scss setlocal shiftwidth=2 tabstop=2 expandtab
au FileType css setlocal shiftwidth=2 tabstop=2 expandtab
au FileType html setlocal shiftwidth=2 tabstop=2 expandtab
" Avoiding tabs
au BufWritePre {*.rb,*.coffee,*.scss,*.less,*.haml,*.slim,*.erb,*.vim,*.vundle} silent! :%s/\t/ /e
" Set first line when editing a git commit message
au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
" Resize splits when the window is resized
au VimResized * exe "normal! \<c-w>="
" Disable paste mode when leaving Insert Mode
au InsertLeave * set nopaste
if exists('g:use_autosave')
au FocusLost * silent! wa
set autowriteall
else
set noautowriteall
endif
if has("gui_running")
if !exists('g:guifont')
let g:guifont = 'Anonymous Pro for Powerline:h16'
end
set macligatures
let &guifont = g:guifont
let g:airline_powerline_fonts = 1
endif
if exists('g:apperances_lightline')
if !exists('g:lightline')
let g:lightline = {}
end
if !exists('g:lightline_theme')
let g:lightline_theme = 'hybrid'
endif
let g:lightline.colorscheme = g:lightline_theme
if exists('g:use_powerline_fonts')
let g:lightline.separator = { 'left': "\u2b80", 'right': "\u2b82" }
let g:lightline.subseparator = { 'left': "\u2b81", 'right': "\u2b83" }
else
let g:lightline.separator = { 'left': "", 'right': "" }
let g:lightline.subseparator = { 'left': "", 'right': "" }
endif
call lightline#init()
elseif exists("g:apperances_airline")
if !exists('g:airline_theme')
let g:airline_theme = 'bubblegum'
endif
if exists('g:use_powerline_fonts')
let g:airline_powerline_fonts = 1
endif
execute 'AirlineTheme '+g:airline_theme
endif
if !exists('g:color_scheme')
set background=dark
colorscheme hybrid
else
let g:colors_name = g:color_scheme
endif
syntax enable