-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
128 lines (111 loc) · 3.04 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
execute pathogen#infect()
syntax on
set number
set nocompatible
filetype plugin indent on
set ts=4
set sts=4
set sw=4
"set smartindent
"set autoindent
set expandtab
set laststatus=2
set background=dark
colorscheme solarized
set guifont=Ubuntu\ Mono\ derivative\ Powerline
if !has('gui_running')
set t_Co=256
endif
let g:lightline = {
\ 'colorscheme': 'solarized_dark',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'fugitive', 'filename' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'MyFugitive',
\ 'readonly': 'MyReadonly',
\ 'modified': 'MyModified',
\ 'filename': 'MyFilename'
\ },
\ 'separator': { 'right': '', 'left': '' },
\ 'subseparator': { 'right': '', 'left': '' }
\ }
function! MyModified()
if &filetype == "help"
return ""
elseif &modified
return "+"
elseif &modifiable
return ""
else
return ""
endif
endfunction
function! MyReadonly()
if &filetype == "help"
return ""
elseif &readonly
return ""
else
return ""
endif
endfunction
function! MyFugitive()
return exists('*fugitive#head') && strlen(fugitive#head()) ? ' '.fugitive#head() : ''
endfunction
function! MyFilename()
return ('' != MyReadonly() ? MyReadonly() . ' ' : '') .
\ ('' != expand('%t') ? expand('%t') : '[No Name]') .
\ ('' != MyModified() ? ' ' . MyModified() : '')
endfunction
" Shortcut to rapidly toggle `set list`
nmap <leader>l :set list!<CR>
" Shortcut to retab!
nmap <leader>r :retab!<CR>
" fire up ctrlp
nmap <leader>f :CtrlP<CR>
nmap <leader>. :CtrlPTag<CR>
" fire up the silver searcher
nmap <leader>a :Ag!
" Fire up the tagbar
nmap <leader>b :TagbarToggle<CR>
" Ctags stuff
nmap <leader>c :tag
" set paste
nmap <leader>p :set paste!<CR>
" set nonumber
nmap <leader>n :set nonumber!<CR>
" Thoughtbot vimconfigs
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Flake8
"nmap <leader>8 :call Flake8()<CR>
nmap <leader>s :SyntasticCheck<CR>
let g:syntastic_go_checkers = ['golint']
let g:syntastic_ruby_checkers = ['rubocop']
let g:syntastic_enable_perl_checker = 1
let g:syntastic_perl_checkers = ['perl', 'podchecker']
" Use the same symbols as TextMate for tabstops and EOLs
set listchars=tab:▸\ ,eol:¬
" 80 chars?
"highlight OverLength ctermbg=red ctermfg=white guibg=#592929
"match OverLength /\%81v.\+/
if exists('+colorcolumn')
set colorcolumn=120
else
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
endif
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1
"let g:indent_guides_auto_colors = 0
"autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=3
"autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2
autocmd Filetype python setlocal ts=4 sts=4 sw=4
autocmd Filetype perl setlocal ts=4 sts=4 sw=4
autocmd Filetype yaml setlocal ts=2 sts=2 sw=2
autocmd Filetype yml setlocal ts=2 sts=2 sw=2