Skip to content

Instantly share code, notes, and snippets.

@onixus74
Last active October 20, 2016 10:59
Show Gist options
  • Save onixus74/42c05cf2fa8f8dfd91ab5ccfbc16c592 to your computer and use it in GitHub Desktop.
Save onixus74/42c05cf2fa8f8dfd91ab5ccfbc16c592 to your computer and use it in GitHub Desktop.
Vim Python Ide
"https://realpython.com/blog/python/vim-and-python-a-match-made-in-heaven/
"https://github.com/mbrochh/vim-as-a-python-ide/blob/master/.vimrc
set nocompatible " required
filetype off " required
" 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 'gmarik/Vundle.vim'
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
"Custom Config
"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>
" Enable folding with the spacebar
nnoremap <space> za
" Enable folding
set foldmethod=indent
set foldlevel=99
"see the docstrings for folded code
let g:SimpylFold_docstring_preview=1
"PEP8 indentation
au BufNewFile,BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
"Normal indetation for html, js , css
au BufNewFile,BufRead *.js, *.html, *.css
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
"Flagging Unnecessary Whitespace
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
"set Encoding UTF8
set encoding=utf-8
"Python Highlighting
let python_highlight_all=1
syntax on
"YouCompleteMe Config
let g:ycm_autoclose_preview_window_after_completion=1
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
let g:ycm_autoclose_preview_window_after_completion=1
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
"color scheme config
if has('gui_running')
set background=dark
colorscheme solarized
else
colorscheme zenburn
endif
"set line numering
set nu
"System clipboard
set clipboard=unnamed
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
"Bundles
Bundle 'Valloric/YouCompleteMe'
"Plugins
"Plugin 'christoomey/vim-tmux-navigator"
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'scrooloose/syntastic'
Plugin 'nvie/vim-flake8'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment