forked from laudebugs/uses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
107 lines (86 loc) · 2.77 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
set nocompatible
set expandtab
set tabstop=2
set shiftwidth=2
set smartindent
set number
"set colorcolumn=80"
set tw=79
set fo-=t " don't automatically wrap text when typing
set noswapfile
set nobackup
"highlight ColorColumn ctermbg=7"
colorscheme slate
filetype plugin indent on
syntax on
" let vimclojure#HighlightBuiltins = 1
" let vimclojure#ParenRainbow = 10
nnoremap <C-t> :tabnew<CR>
inoremap <C-t> <Esc>:tabnew<CR>
nnoremap tj :tabnext<CR>
if bufwinnr(1)
map - <C-W><C-W>
map + <S-C-W><S-C-W>
endif
"---------------- matching delimiters ------------------"
" inoremap ( ()<Esc>:call BC_AddChar(")")<CR>i
" inoremap { {<CR>}<Esc>:call BC_AddChar("}")<CR><Esc>kA<CR>
" inoremap [ []<Esc>:call BC_AddChar("]")<CR>i
" inoremap " ""<Esc>:call BC_AddChar("\"")<CR>i
"jump out of parenthesis
" inoremap <C-j> <Esc>:call search(BC_GetChar(), "W")<CR>a
function! BC_AddChar(schar)
if exists("b:robstack")
let b:robstack = b:robstack . a:schar
else
let b:robstack = a:schar
endif
endfunction
function! BC_GetChar()
let l:char = b:robstack[strlen(b:robstack)-1]
let b:robstack = strpart(b:robstack, 0, strlen(b:robstack)-1)
return l:char
endfunction
"--------------------- end ----------------------------"
"Configs for specific filetypes"
au Filetype python setlocal tabstop=4 shiftwidth=4
au Filetype javascript setlocal tabstop=2 shiftwidth=2
au Filetype c setlocal tabstop=4 shiftwidth=4
au Filetype java setlocal tabstop=4 shiftwidth=4
au Filetype rust setlocal tabstop=4 shiftwidth=4
"----------------- plugin stuff ----------------------"
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.fzf
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'airblade/vim-gitgutter'
Plugin 'easymotion/vim-easymotion'
Plugin 'mileszs/ack.vim'
Plugin 'flazz/vim-colorschemes'
Plugin 'jeetsukumaran/vim-buffergator'
Plugin 'vim-airline/vim-airline'
Plugin 'kien/ctrlp.vim'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'ajh17/VimCompletesMe'
Plugin 'rust-lang/rust.vim'
Plugin 'prettier/vim-prettier'
"syntax plugins"
Plugin 'sheerun/vim-polyglot'
"eslint checker"
Plugin 'vim-syntastic/syntastic'
" Plugin 'dense-analysis/ale'"
call vundle#end() " required
filetype plugin indent on " required
let g:syntastic_javascript_checkers = ['standard']
let g:syntastic_javascript_standard_exec = 'semistandard'
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
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:airline_theme='angr'
let g:ctrlp_custom_ignore = '\v[\/]\.(DS_Storegit|hg|svn|optimized|compiled|node_modules)$'
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.idea/*,*/.DS_Store,*/vendor,*/node_modules