-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
130 lines (98 loc) · 3.03 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
map <C-x> I# <esc>
runtime! debian.vim
map <F3> :call whylog#Whylog_Action()<CR>
map <F4> :call whylog#Whylog_Teach()<CR>
map <F5> :call whylog#Python_Path()<CR>
runtime plugin/sensible.vim
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set number
call pathogen#infect()
syntax enable
let g:syntastic_python_checkers=['pep8']
execute pathogen#infect()
syntax on
" show trailing spaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
match ExtraWhitespace /\s\+$\| \+\ze\t/
match ExtraWhitespace /[^\t]\zs\t\+/
match ExtraWhitespace /^\t*\zs \+/
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
let bp="import ipdb; ipdb.set_trace()"
vmap <C-a> I# <esc>
vmap <C-d> I<del><esc>
map <C-b> <esc>oimport ipdb; ipdb.set_trace()<esc>
map <C-k> <esc>Oimport ipdb; ipdb.set_trace()<esc>
map <C-y> <esc>:NERDTree<esc>
map <C-l> <esc>:e <esc>
imap <C-y> <esc>:NERDTree<esc>
imap jkl; <Esc>
imap asdf <Esc>
imap fdsa <Esc>
imap ;lkj <Esc>
" map CTRL-E to end-of-line (insert mode)
imap <C-e> <esc>$i<right>
" map CTRL-A to beginning-of-line (insert mode)
imap <C-a> <esc>0i
" show long lines
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
"
match OverLength /\%80v.\+/
map <F2> :echo 'Current time is ' . strftime('%c')<CR>
"set colorcolumn=81
" highlight ColorColumn ctermbg=darkyellow
" vundle {{{1
" needed to run vundle (but i want this anyways)
set nocompatible
filetype off
" vundle needs filtype plugins off
" i turn it on later
syntax off
" set the runtime path for vundle
set rtp+=~/.vim/bundle/Vundle.vim
" start vundle environment
call vundle#begin()
" list of plugins {{{2
" let Vundle manage Vundle (this is required)
" Plugin 'gmarik/Vundle.vim'
" Plugin 'tmhedberg/SimpylFold'
" Plugin 'Valloric/YouCompleteMe'
" to install a plugin add it here and run :PluginInstall.
" to update the plugins run :PluginInstall! or :PluginUpdate
" to delete a plugin remove it here and run :PluginClean
" YOUR LIST OF PLUGINS GOES HERE LIKE THIS:
" Plugin 'bling/vim-airline'
" add plugins before this
call vundle#end()
" now (after vundle finished) it is save to turn filetype plugins on
filetype plugin indent on
syntax on
" Auto-check file for errors on write:
let g:PyFlakeOnWrite = 1
let g:PyFlakeCheckers = 'pep8,mccabe,frosted'
let g:PyFlakeDefaultComplexity=10
let g:PyFlakeDisabledMessages = 'E501'
let g:PyFlakeAggressive = 0
let g:PyFlakeCWindow = 6
let g:PyFlakeSigns = 1
let g:PyFlakeSignStart = 1
let g:PyFlakeMaxLineLength = 100
let g:PyFlakeRangeCommand = 'Q'
autocmd BufNewFile,BufRead *.py set foldmethod=indent
set mouse=a
let g:SimpylFold_docstring_preview=1
"python with virtualenv support
py << EOF
import os.path
activate_this = os.path.join('/home/andrzej/.virtualenvs/whylog', 'bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
EOF
" vim2hs files
" let g:haskell_conceal_wide = 1