-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc-python-ide
138 lines (115 loc) · 3.51 KB
/
vimrc-python-ide
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
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
if has("gui_running") " Start of pluggins IF
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'
" Airline:
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" NerdTree:
Plugin 'scrooloose/nerdtree'
" Python Mode:
Plugin 'klen/python-mode'
" Python virtualenv:
Plugin 'jmcantrell/vim-virtualenv'
" Django plus plugin
Plugin 'tweekmonster/django-plus.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" 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
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"
"""
""" Plugins Settings
"""
" --- Settings for vim-airline --- "
set laststatus=2
let g:airline_powerline_fonts = 1
set guifont=Source\ Code\ Pro\ for\ Powerline:h14
let g:airline#extensions#tabline#enabled = 1
" --- NerdTree --- "
map <C-n> :NERDTreeToggle<CR>
" Ignore filestypes
let NERDTreeIgnore = ['\.pyc$']
" --- Python-mode settings --- "
let g:pymode_rope = 1
" Documentation
let g:pymode_doc = 1
let g:pymode_doc_key = 'K'
"Linting
let g:pymode_lint = 1
let g:pymode_lint_checker = "pyflakes,pep8"
" Auto check on save
let g:pymode_lint_write = 1
" Support virtualenv
let g:pymode_virtualenv = 1
" Enable breakpoints plugin
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
" --- VirtualEnv --- "
set guioptions-=L
let g:virtualenv_directory = $PYVENV_HOME
let g:virtualenv_stl_format = '[%n]'
" --- <Plugin Name> --- "
" --- GUI Color Settings --- "
color murphy
endif " End of plugins IF
"""
""" My Settings
"""
syntax on
" set bg=dark
" color murphy
set number
set encoding=utf-8
""" split navigations """
" --------------------- "
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Buffer switch
nnoremap <C-S-tab> :bprevious<CR>
nnoremap <C-tab> :bnext<CR>
" Use <leader>l to toggle display of whitespace
nmap <leader>l :set list!<CR>
" automatically change window's cwd to file's dir
set autochdir
" I'm prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab
" more subtle popup colors
if has ('gui_running')
highlight Pmenu guibg=#cccccc gui=bold
endif
" ----
"""
""" Filetypes handling
"""
au BufNewFile,BufRead *.js, *.html, *.css, *.md, *.rb
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2