forked from fzxu/dotvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
73 lines (58 loc) · 1.88 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
call pathogen#infect()
set shiftwidth=2
set softtabstop=2
set tabstop=2
set shiftwidth=2
set expandtab
set nofoldenable
" Clear filetype flags before changing runtimepath to force Vim to reload them.
"filetype on
set runtimepath+=$GOROOT/misc/vim
filetype plugin indent on
colorscheme desert
syntax on
set ruler
set hlsearch
set autoread
filetype plugin on
filetype indent on
" nerdtree
let NERDTreeShowHidden=1
" default open nerdtree window
"au VimEnter * NERDTree
" CtrlP
" https://github.com/kien/ctrlp.vim
set wildignore+=*/tmp/*,*/node_modules/*,*.so,*.swp,*.zip,*.class,*.pyc
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn|idea|node_modules)$'
" Some mappings
map <D-r> :!$HOME/.rbenv/shims/ruby %<cr>
map <F8> :!$VIRTUAL_ENV/bin/python %<CR>
autocmd FileType go compiler go
autocmd FileType go autocmd BufWritePre <buffer> Fmt
" jsx
let g:jsx_ext_required = 1
" statusline
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
set laststatus=2
" syntastic
set statusline+=%{exists('g:loaded_syntastic_plugin')?SyntasticStatuslineFlag():''}
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_loc_list_height = 5
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_python_python_exec = '$VIRTUAL_ENV/bin/python'
let g:syntastic_python_checkers = ['flake8']
" vim airline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline#extensions#tabline#enabled = 1
augroup vimrc_autocmds
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%80v.*/
autocmd FileType python set nowrap
augroup END