-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
139 lines (110 loc) · 3.65 KB
/
vimrc
File metadata and controls
139 lines (110 loc) · 3.65 KB
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
129
130
131
132
133
134
135
136
137
138
139
set nocompatible " be iMproved, required
filetype off " required
" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/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'
" Git-related plugins
Plugin 'tpope/vim-fugitive' " Git wrapper for Vim
Plugin 'airblade/vim-gitgutter' " Shows Git diff in the sign column
Plugin 'mhinz/vim-signify' " Shows Git changes in the gutter
Plugin 'jreybert/vimagit' " Magit-inspired Git interface for Vim
" Other plugins
Plugin 'tmhedberg/SimpylFold'
" Bundle 'Valloric/YouCompleteMe'
Plugin 'vim-syntastic/syntastic'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'dense-analysis/ale'
Plugin 'nvie/vim-flake8'
Plugin 'ycm-core/YouCompleteMe', { 'do': './install.py' }
Plugin 'vim-python/python-syntax'
Plugin 'google/yapf'
Plugin 'preservim/nerdtree'
Plugin 'vim-airline/vim-airline'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'kien/ctrlp.vim'
Plugin 'Shougo/vimshell.vim'
"Plugin 'tpope/tcomment'
"Plugin 'tpope/tcomment.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
" filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
syntax on
set t_Co=256
" colorscheme atom-dark-256
set foldmethod=indent
set foldlevel=99
nnoremap <space> za
" Python-specific settings
au BufNewFile, BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=4
\ set expandtab
\ set autoindent
\ set fileformat=unix
au BufNewFile,BufRead *.js, *.html, *.css
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
let g:ale_linters = {'python': ['flake8']}
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_auto_trigger = 1
let g:ycm_semantic_triggers = {'python': ['.']}
autocmd BufWritePre *.py silent! execute 'YapfFormat'
set number
" =========================
" Git-Related Customizations
" =========================
" Leader key
let mapleader = "\<Space>"
" Fugitive mappings
nnoremap <leader>gs :Gstatus<CR>
nnoremap <leader>gc :Gcommit<CR>
nnoremap <leader>gp :Gpush<CR>
nnoremap <leader>gl :Glog<CR>
nnoremap <leader>gb :Gblame<CR>
" GitGutter mappings
nnoremap <leader>hp :GitGutterPreviewHunk<CR>
nnoremap <leader>hs :GitGutterStageHunk<CR>
nnoremap <leader>hu :GitGutterUndoHunk<CR>
" vim-signify mappings
nnoremap ]c :SignifyNextHunk<CR>
nnoremap [c :SignifyPrevHunk<CR>
" Magit-inspired interface mapping
nnoremap <leader>gm :Magit<CR>
" Set up commit message settings
autocmd FileType gitcommit setlocal spell textwidth=72
" Optional: Toggle NERDTree with <leader>n
nnoremap <leader>n :NERDTreeToggle<CR>
"if has('gui_running')
" set background=dark
" colorscheme solarized
"else
" colorscheme zenburn
"endif
"
"call togglebg#map("<F5>")
let g:SimpylFold_docstring_preview=1
let python_highlight_all=1
syntax on
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
"au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
set encoding=utf-8