-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
75 lines (65 loc) · 2.05 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
:inoremap kj <ESC>
:nnoremap = <c-w><Right>
:nnoremap - <c-w><Left>
set tabstop=4
set shiftwidth=4
set nu
set modeline
set expandtab
set softtabstop=4
set ignorecase
map <C-J> <C-W>j<C-W>
map <C-K> <C-W>k<C-W>
map <C-H> <C-W>h<C-W>
map <C-L> <C-W>l<C-W>
vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
" Autocomplete remaps
inoremap <expr> j ((pumvisible())?("\<C-n>"):("j"))
inoremap <expr> k ((pumvisible())?("\<C-p>"):("k"))
inoremap <expr> <cr> ((pumvisible())?("\<C-y>"):("\<cr>"))
inoremap <expr> <Esc> pumvisible() ? "\<C-e>" : "\<Esc>"
set nocompatible " be ViMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-syntastic/syntastic'
Plugin 'easymotion/vim-easymotion'
Plugin 'morhetz/gruvbox'
Plugin 'preservim/nerdtree'
Plugin 'tpope/vim-commentary'
Plugin 'psf/black'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" 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
" NerdTree
:let g:NERDTreeWinSize=60
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTreeToggle<CR>
" Syntastic
let g:syntastic_python_checkers = ['python']
let g:syntastic_c_checkers = ['gcc']
let g:syntastic_cpp_checkers = ['g++']
let g:syntastic_check_on_w = 1
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
" Easy Motion
map <Leader> <Plug>(easymotion-prefix)
colorscheme gruvbox
set background=dark
" Black Formatter
augroup black_on_save
autocmd!
autocmd BufWritePre *.py Black
augroup end