-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
139 lines (118 loc) · 3.6 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
" 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'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdcommenter'
Plugin 'xuyuanp/nerdtree-git-plugin'
Plugin 'altercation/vim-colors-solarized'
Plugin 'vim-python/python-syntax'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'chriskempson/base16-vim'
Plugin 'puremourning/vimspector'
Plugin 'szw/vim-maximizer'
" Python plugins
Plugin 'tmhedberg/SimpylFold'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
set nocompatible
set noshowmode
filetype off
set tabstop=4
set expandtab
set shiftwidth=4
set so=999
set incsearch
let g:python_highlight_all = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='base16'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
let g:airline#extensions#tabline#fnamemod = ':t'
noremap <C-K> :FormatLines<CR>
inoremap <C-K> <C-O>:FormatLines<CR>
filetype plugin indent on
syntax on
set number
set background=dark
if filereadable(expand("~/.vimrc_background"))
let base16colorspace=256
source ~/.vimrc_background
endif
" autocmd vimenter * NERDTree
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_error_symbol = "✗"
let g:syntastic_python_checkers=["gpylint"]
let g:syntastic_python_checker_args = "--rcfile=~/.gpylintrc"
let vim_markdown_preview_github=1
set clipboard=unnamedplus
set hidden
let mapleader = " "
" buffers custom commands
nmap <leader>T :enew<cr>
nmap <leader>l :bnext<CR>
nmap <leader>h :bprevious<CR>
nmap <leader>bq :bp <BAR> bd #<CR>
nmap <leader>bl :ls<CR>
" ctrlp
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$',
\ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
\}
let g:ctrlp_working_path_mode = 'r'
"nmap <leader>p :CtrlP<cr>
nmap <leader>bb :CtrlPBuffer<cr>
nmap <leader>bm :CtrlPMixed<cr>
nmap <leader>bs :CtrlPMRU<cr>
map <leader>p :setlocal paste!<cr>
" Damian conway video
highlight ColorColumn ctermbg=gray
call matchadd("ColorColumn", "\\%81v.", 100)
exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~"
set list
nnoremap ; :
" Jump to next error
nmap <leader>e :lnext<CR>
nmap <leader>E :lprev<CR>
" Move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" folding
set foldmethod=indent
set foldlevel=99
let g:SimpylFold_docstring_preview=1
" NERDTree
nnoremap <Leader>f :NERDTreeToggle<Enter>
nnoremap <silent> <Leader>v :NERDTreeFind<CR>
let NERDTreeIgnore=['\.pyc$', '\~$']
let NERDTreeMinimalUI = 1
let NERDTreeDirArrows = 1
let NERDTreeAutoDeleteBuffer = 1
let NERDTreeQuitOnOpen = 1
" Open NERDTree if no other buffers were opened.
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif
" Close NERDTree if all other buffers were closed.
autocmd bufenter * if (winnr('$') == 1 && exists('b:NERDTreeType') && b:NERDTreeType == 'primary') | q | endif
" Debugging
nnoremap <Leader>z :MaximizerToggle<Enter>
" Line highlight
set cursorline
hi CursorLineNR cterm=NONE ctermfg=yellow