-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
125 lines (104 loc) · 3.1 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
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
" set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.vim/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Solarized theme
Plugin 'altercation/vim-colors-solarized'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'nvie/vim-flake8'
Plugin 'psf/black'
Plugin 'fisadev/vim-isort'
Plugin 'jparise/vim-graphql'
Plugin 'pangloss/vim-javascript'
Plugin 'maxmellon/vim-jsx-pretty'
Plugin 'ycm-core/YouCompleteMe'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'mlaursen/vim-react-snippets'
Plugin 'prettier/vim-prettier'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" UltiSnips Trigger Configuration
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" NERDTreeTabs
let g:nerdtree_tabs_open_on_console_startup=2
let g:nerdtree_tabs_startup_cd=1
" isort
let g:vim_isort_map = '<C-i>'
let g:vim_isort_python_version = 'python3'
" Color scheme
set number
syntax enable
set background=dark
silent! colorscheme solarized
set t_Co=256 " force vim to use 256 colors
let g:solarized_termcolors=256 " use solarized 256 fallback
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set fileformat=unix
set showcmd
" Enable airline
let g:airline#extensions#tabline#enabled = 1
" user powerline fonts
let g:airline_powerline_fonts = 1
" Show statusline at the bottom
set laststatus=2
" Indent Guide settings
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1
let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_auto_colors = 1
"autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=65
"autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=45
" <F5> to delete trailing whitespace
nnoremap <silent> <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>
" <F9> mapped to running Black
nnoremap <F9> :Black<CR>
" run Black when saving python files
autocmd BufWritePre *.py execute ':Black'
" run flake8 when saving python files
autocmd BufWritePost *.py call Flake8()
" Python standards
au BufNewFile,BufRead *.py set
\ ft=python
\ tabstop=4
\ softtabstop=4
\ shiftwidth=4
\ textwidth=79
\ expandtab
\ autoindent
\ fileformat=unix
" Markdown files
au BufNewFile,BufRead *.md set
\ ft=markdown
\ tabstop=4
\ softtabstop=4
\ shiftwidth=4
\ textwidth=79
\ expandtab
\ autoindent
" Other file typess
au BufNewFile,BufRead *.yml,*.yaml,*.json,*.css,*.html set
\ tabstop=2
\ softtabstop=2
\ shiftwidth=2
\ textwidth=79
\ expandtab
\ autoindent