-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
87 lines (67 loc) · 2.01 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
execute pathogen#infect()
set number
set ruler
set title
set t_Co=256
syntax enable
colorscheme bubblegum
" fix tmux issue with background
:set t_ut=
" highlight inc search
set hlsearch
set incsearch
"This clears the 'last search pattern' by hitting return
nnoremap <CR> :noh<CR><CR>
" open new slip panes to right and bottom, which feels more natural
set splitbelow
set splitright
filetype plugin indent on
set ts=2 sw=2 et
let g:indent_guides_start_level = 2
let g:indent_guides_auto_colors = 0
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=#3A3A3A ctermbg=237
" autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4
hi IndentGuidesEven ctermbg=darkgrey
" let g:indent_guides_guide_size = 1
au BufNewFile,BufRead *.ejs set filetype=html
" Syntastic with jshint
let g:syntastic_javascript_checkers = ['jshint']
let g:indent_guides_enable_on_vim_startup = 1
function s:find_jshintrc(dir)
let l:found = globpath(a:dir, '.jshintrc')
if filereadable(l:found)
return l:found
endif
let l:parent = fnamemodify(a:dir, ':h')
if l:parent != a:dir
return s:find_jshintrc(l:parent)
endif
return "~/.jshintrc"
endfunction
function UpdateJsHintConf()
let l:dir = expand('%:p:h')
let l:jshintrc = s:find_jshintrc(l:dir)
let g:syntastic_javascript_jshint_conf = l:jshintrc
endfunction
au BufEnter * call UpdateJsHintConf()
" Vim-Airline
set laststatus=2
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_alt_sep = '>'
" vim-gitgutter
let g:gitgutter_highlight_lines = 1
let g:gitgutter_realtime = 1
" vim-tagbar
nnoremap <silent><F3> :TagbarToggle<CR>
let g:tagbar_width = 30
let g:tagbar_autoclose = 1
" NERD-tree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
map <C-n> :NERDTreeToggle<CR>
nnoremap <S-tab> :bn<CR>
map <C-t> :tabnew<CR>
" spellchek for txt files
au BufRead *.txt setlocal spell
" make Gdiff to open shit vertically
set diffopt+=vertical