Skip to content

Instantly share code, notes, and snippets.

@edersonbadeca
Created July 28, 2015 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edersonbadeca/c051097f662263264b73 to your computer and use it in GitHub Desktop.
Save edersonbadeca/c051097f662263264b73 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
" let Vundle manage Vundle
Plugin 'gmarik/Vundle.vim'
" Status line and buffer explorer
Plugin 'bling/vim-airline'
" Fugitive is a Git plugin
Plugin 'tpope/vim-fugitive'
Plugin 'klen/python-mode'
" Dispatch tasks asynchronous
Plugin 'tpope/vim-dispatch'
Plugin 'airblade/vim-gitgutter'
" Lint, codecompletion, documentation lookup, jump to classes, refactoring
" tools, etc...
Plugin 'davidhalter/jedi-vim'
Plugin 'scrooloose/syntastic'
" Full path fuzzy file, buffer, mru, tag, ... finder for Vim.
Plugin 'kien/ctrlp.vim'
Plugin 'majutsushi/tagbar'
" Select text at the same indent level.
Plugin 'michaeljsmith/vim-indent-object'
" Syntax highlighting for Dockerfiles
Plugin 'docker/docker' , {'rtp': '/contrib/syntax/vim/'}
" Plugin for yapf
Plugin 'google/yapf'
" DEBUG FOR PHP
Plugin 'joonty/vdebug.git'
" All of your Plugins must be added before the following line
" Plugin for visual expand selection
Plugin 'terryma/vim-expand-region'
call vundle#end() " required
filetype plugin indent on " required!
"colors
colorscheme distinguished
"colorscheme frozen
"colorscheme cgpro
"colorscheme guardian
set showcmd " Show incomplete cmds down the bottom
set incsearch " Find the next match as we type the search
set hlsearch " Hilight searches by default
set magic " Set magic on, for regular expressions
set wildmode=longest,full " Complete longest common string, then each full match
set wildmenu
set ignorecase
set smartcase
set history=1000
set ff=unix
set encoding=utf-8
set fileencoding=utf-8
set autoread " Automatically reread files that have been changed externally
set backspace=indent,eol,start
set hidden " Switch buffers even if the current one have unsaved changes
set noswapfile
set nu
syntax on
" Plugin Configuration
let g:Powerline_symbols = 'fancy'
let g:pymode_lint_cwindow = 0
let g:pymode_lint_signs = 1
let g:pymode_breakpoint = 1
let g:pymode_breakpoint_cmd = 'import ipdb; ipdb.set_trace()'
" Auto save files when focus is lost
au FocusLost * silent! wa
set autowriteall
" Set a POSIX shell
set shell=bash
" Set <Tab> to 2 spaces everywhere, but for Python files.
"autocmd FileType * top=2 shiftwidth=2 softtabstop=2 expandtab
"autocmd FileType python set tabstop=4 shiftwidth=4 softtabstop=4 expandtab
" in makefiles, don't expand tabs to spaces, since actual tab characters are
" needed, and have indentation at 4 chars
autocmd FileType make set noexpandtab shiftwidth=4 softtabstop=4
" Remove trailing whitespace
autocmd BufWritePre * :%s/\s\+$//e
" Map Ctrl+<movement> to move around windows.
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
" Map <leader>+<movement> to move around buffers
nnoremap <Leader><Left> :bp<CR>
nnoremap <Leader>h :bp<CR>
nnoremap <Leader><Right> :bn<CR>
nnoremap <Leader>l :bn<CR>
nnoremap <Leader>w :bd<CR>
nnoremap <Leader>e :Explore<CR>
nnoremap <Leader>y :PymodeLintAuto<CR>
inoremap kj <ESC>
inoremap jk <ESC>
inoremap <tab> <C-p>
nnoremap <leader>f :e $MYVIMRC<CR>
nnoremap <leader>ff :so $MYVIMRC<CR>
" Map space to search
map <space> /
map <c-space> ?
" Easy Usage
set pastetoggle=<leader>z
" Powerline setup
set term=xterm-256color
set guifont=Menlo\ for\ Powerline\ 9
set laststatus=2
" NERD Tree setup
" F2 to toggle the tree view
map <F2> :NERDTreeToggle<CR>
let NERDTreeIgnore=['\~$', '\.pyc$', '^__pycache__$']
set wildignore+=*.o,*.pyc
" NERDCommenter
" For some reason, Vim sees Ctrl+/ as Ctrl+_
map <C-_> <plug>NERDCommenterToggle
" Tagbar setup
map <silent> <F3> :TagbarToggle<CR>
let tagbar_left = 1
let tagbar_autoclose = 1
let tagbar_autofocus = 1
let tagbar_sort = 0
" vim-airline
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme= "powerlineish"
" git gutter
highlight clear SignColumn
" Syntatic
let g:syntastic_python_pylint_post_args='--disable C0301,C0111,C0103,F0401,I0011,R0201,R0801,R0902,R0903,R0904,R0913,R0914,E1002,E1101,E0611,W0142,W0212,W0232,W0401,unused-argument'
" CtrlP
let g:ctrlp_extensions = ['tag', 'undo', 'line', 'changes', 'mixed']
" UltiSnips
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" Fix tmux background colors
set term=screen-256color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment