-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
137 lines (108 loc) · 2.97 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
" general stuff
syntax on
set noswapfile
" syntax enable
:let mapleader = ","
set clipboard=unnamed
set tabstop=4
set shiftwidth=4
set expandtab
set nu! " line numbers
set mouse=a
set nocompatible
filetype off " required
" filetype plugin on
"set cursorline
"set cursorcolumn
set encoding=utf-8
set t_Co=256
set laststatus=2
set noshowmode
set colorcolumn=80
" bells are evil!
set noerrorbells visualbell t_vb=
" tab navigation
map [1;5D <C-Left>
map [1;5C <C-Right>
nnoremap <C-Left> :tabprevious<CR>
nnoremap <C-Right> :tabnext<CR>
nnoremap <C-t> :tabnew<CR>
inoremap <C-Left> <Esc>:tabprevious<CR>i
inoremap <C-Right> <Esc>:tabnext<CR>i
inoremap <C-t> <Esc>:tabnew<CR>
" Wrapped line navigation
nnoremap k gk
nnoremap j gj
" GUI
set go-=T
set go-=m
set go-=r
set go-=R
set go-=l
set go-=L
" Plugins
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
" required!
Plugin 'gmarik/Vundle.vim'
" Plugins
Plugin 'itchyny/lightline.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'flazz/vim-colorschemes'
Plugin 'godlygeek/tabular'
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'Yggdroot/indentLine'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'dhruvasagar/vim-table-mode'
Plugin 'terryma/vim-multiple-cursors'
call vundle#end()
filetype plugin indent on " required!
syntax enable
" vim-colorschemes
colorscheme badwolf
" colorscheme flattown
" syntastic
let g:syntastic_python_python_exec = 'python3'
" let g:syntastic_quiet_messages = { 'type': 'style' }
" let g:syntastic_python_checkers = ['pyflakes']
" let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': [],'passive_filetypes': [] }
" " nnoremap <C-w>E :SyntasticCheck<CR> :SyntasticToggleMode<CR>
" indentLine (show indentation)
let g:indentLine_char = '|'
let g:indentLine_color_term = 239
autocmd Filetype json :IndentLinesDisable
" NERDTree
map <C-y> :NERDTreeToggle<CR>
let g:NERDTreeWinPos = "left"
let NERDTreeShowHidden=1
" lightline.vim
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'component': {
\ 'readonly': '%{&readonly?"":""}',
\ },
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '', 'right': '' }
\ }
" vim-markdown
" let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
" vim-table-mode
let g:table_mode_corner_corner = '+'
let g:table_mode_header_fillchar = '='
" tmux compatibility
map <Esc>[B <Down>
if &term =~ '256color'
" if &term =~ '^screen'
" disable Background Color Erase (BCE) so that color schemes
" render properly when inside 256-color tmux and GNU screen.
" see also http://snk.tuxfamily.org/log/vim-256color-bce.html
set t_ut=
endif
" do not quote signature in mutt
au BufRead /tmp/mutt* normal :g/^> -- $/,/^$/-1d^M/^$^M^L
nnoremap <leader>p Oimport pdb; pdb.set_trace()<Esc>
vnoremap <leader>y "+y<Esc>
inoremap <leader>std std::cout << << std::endl;<Esc>
nnoremap <leader>jpretty :execute '%!python -m json.tool'<CR><Esc>