-
Notifications
You must be signed in to change notification settings - Fork 0
/
.hamu
executable file
·242 lines (195 loc) · 6.25 KB
/
.hamu
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
"let mapleader=","
let g:pymode_rope = 0
set nocompatible
filetype off
set rtp+=~/dotfiles/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
nnoremap <silent> <F5> :!clear;python3 %<CR>
nnoremap <silent> <F4> :!clear;touch __init__.py;echo you have created a package <CR>
nnoremap <silent> <F3> :!vimdev New <CR>
nnoremap <silent> <F6> :!clear && py.test *.py <CR>
nnoremap <silent> <F7> :!clear && python -m unittest *.py <CR>
" The bundles you install will be listed here
Bundle 'tpope/vim-repeat'
Bundle 'klen/python-mode'
Bundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
Bundle 'scrooloose/nerdtree'
Bundle 'tpope/vim-fugitive'
Bundle 'kien/ctrlp.vim'
Bundle 'vimux'
Bundle 'tpope/vim-commentary'
Bundle 'jedi-vim'
Bundle 'tomasr/molokai'
Bundle 'bling/vim-airline'
"Bundle 'msanders/snipmate.vim'
Bundle 'SirVer/ultisnips'
"Bundle 'vim-snippets'
"Bundle 'musicbox.vim'
"Bundle 'bling/vim-airline'
Bundle 'flazz/vim-colorschemes'
Bundle 'majutsushi/tagbar'
Bundle 'tpope/vim-surround'
"Bundle 'garbas/vim-snipmate'
Bundle 'MarcWeber/vim-addon-mw-utils'
Bundle 'tomtom/tlib_vim'
Bundle 'honza/vim-snippets'
"Bundle 'scrooloose/syntastic' " Syntax checking Bundle for Vim
"Bundle 'tpope/vim-commentary'
"Bundle 'cjrh/vim-conda'
Bundle 'mitsuhiko/vim-sparkup'
Bundle 'Rykka/riv.vim'
"Bundle 'benmills/vimux'
"-------------------=== Python ===-----------------------------
"Bundle 'mitsuhiko/vim-python-combined' " Combined Python 2/3 for Vim
"Bundle 'hynek/vim-python-pep8-indent' " PEP8 indent
"Bundle 'jmcantrell/vim-virtualenv' " Virtualenv support in VIM
set shortmess=a
set cmdheight=2
let g:pymode_run_bind = '<leader>r'
syntax enable " syntax highlight
call vundle#end() " required
filetype on
filetype plugin on
filetype plugin indent on
set ttyfast " terminal acceleration
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsListSnippets="<c-l>"
set autoread
nmap <F9> :bprev<CR>
nmap <F10> :bnext<CR>
:map ,t :w \|:! clear && tmux send-keys -t 0:0.2 C-z " python manage.py test" Enter <cr><cr>
"=====================================================
"" TagBar settings
"=====================================================
" let g:tagbar_autofocus=0
" let g:tagbar_width=20
" autocmd BufEnter *.py :call tagbar#autoopen(0)
" autocmd BufWinLeave *.py :TagbarClose
let g:pymode_run = 1
let g:pymode_lint_on_fly = 1
"filetypeadd Bundle indent on
" The rest of your config follows here
map <F2> :NERDTreeToggle<CR>
" Powerline setup
set guifont=DejaVu\ Sans\ Mono\
set laststatus=2
" Documentation
let g:pymode_doc = 1
let g:pymode_doc_key = 'K'
set term=xterm-256color
let g:pymode_lint_checkers = ["pep8","pyflakes"]
set noswapfile
set nowritebackup
set nobackup
"fancier colors
if has ('gui_running')
highlight Pmenu guibg=#cccccc gui=bold
endif
" Don't autofold code
let g:pymode_folding = 0
" Documentation
let g:pymode_doc = 1
let g:pymode_doc_key = 'K'
" show line numbers
set number
" Change leader to a comma because the backslash is too far away
" That means all \x commands turn into ,x
" The mapleader has to be set before vundle starts loading all
" the Bundles.
let mapleader=","
"isier moving of code blocks
" Try to go into visual mode (v), thenselect several lines of code here and
" then press ``>`` several times.
vnoremap < <gv " better indentation
vnoremap > >gv " better indentation
function! NumberToggle()
if(&relativenumber == 1)
set number
else
set relativenumber
endif
endfunc
nnoremap <Leader>l :call NumberToggle()<cr>
:au FocusLost * set number
:au FocusGained * set relativenumber
autocmd InsertEnter * set number
autocmd InsertLeave * set relativenumber
set relativenumber
" center the cursor vertically
:nnoremap <Leader>zz :let &scrolloff=999-&scrolloff<CR>
" Settings for jedi-vim
" =====================
let g:jedi#usages_command = "<leader>n"
let g:jedi#popup_on_dot = 1
let g:jedi#popup_select_first = 1
let g:jedi#auto_initialization = 1
map <Leader>b Oimport ipdb; ipdb.set_trace() # BREAKPOINT<C-c>
let g:airline_powerline_fonts=1
if !exists('g:airline_symbols')
let g:airline_symbols={}
endif
"let g:airline_theme='dark'
let g:airline#extensions#tabline#enabled=1
set t_Co=256
set linespace=0
set encoding=utf-8
"colorscheme mohammad
"colorscheme wombat256
" Auto check on save
let g:pymode_lint_write = 1
" Support virtualenv
let g:pymode_virtualenv = 1
" Enable breakpoints Bundle
let g:pymode_breakpoint = 1
let g:pymode_breakpoint_bind = '<leader>b'
" syntax highlighting
let g:pymode_syntax = 1
let g:pymode_syntax_all = 1
let g:pymode_syntax_indent_errors = g:pymode_syntax_all
let g:pymode_syntax_space_errors = g:pymode_syntax_all
" Don't autofold code
let g:pymode_folding = 0
" Documentation
let g:pymode_doc = 1
let g:pymode_doc_key = 'K'
"=====================================================
"" AirLine settings
"=====================================================
" let g:airline_theme='badwolf'
let g:airline#extensions#tabline#enabled=1
let g:airline#extensions#tabline#formatter='unique_tail'
let g:airline_powerline_fonts=1
" rope
let g:pymode_rope= 0
let g:pymode_rope_completion= 0
let g:pymode_rope_complete_on_dot=0
let g:pymode_rope_auto_project=0
let g:pymode_rope_enable_autoimport=1
let g:pymode_rope_autoimport_generate=0
let g:pymode_rope_guess_project=0
let g:pymode_rope_autoimport_import_after_complete = 1
let g:pymode_rope_autoimport_bind = '<C-c>ra'
" documentation
let g:pymode_doc=0
let g:pymode_doc_key='K'
" lints
let g:pymode_lint=1
let g:pymode_lint_checker='flake8,pep257'
let g:pymode_lint_write=1 " run lints after file save
let g:pymode_lint_ignore='' " ignore lint errors
" syntastic
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list=1
let g:syntastic_enable_signs=1
let g:syntastic_check_on_wq=0
let g:syntastic_aggregate_errors=1
let g:syntastic_error_symbol='X'
let g:syntastic_style_error_symbol='X'
let g:syntastic_warning_symbol='x'
let g:syntastic_style_warning_symbol='x'
let g:syntastic_python_checkers = ['flake8', 'pep257', 'python']