My vimrc for golang and python.

"" common

set nocompatible               " be iMproved, 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 'VundleVim/Vundle.vim'
"
" " The following are examples of different formats supported.
" " Keep Plugin commands between vundle#begin/end.
" " plugin on GitHub repo

Plugin 'ervandew/supertab'

Plugin 'majutsushi/tagbar'

Plugin 'kien/ctrlp.vim'

Plugin 'scrooloose/nerdtree'

Plugin 'airblade/vim-gitgutter'

" go
Plugin 'fatih/vim-go'

Plugin 'nsf/gocode', {'rtp': 'vim/'}

" python
" Plugin 'davidhalter/jedi-vim'

Plugin 'vim-scripts/indentpython.vim'

Plugin 'scrooloose/syntastic'

Plugin 'nvie/vim-flake8'

Plugin 'cespare/vim-toml'

" 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

nmap ]h <Plug>GitGutterNextHunk
nmap [h <Plug>GitGutterPrevHunk

let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'

let g:jedi#completions_command = "<C-N>"

let mapleader = ","
set autoindent
set tabstop=4
set softtabstop=4
set shiftwidth=4

map <S-j> 12j
map <S-k> 12k
map <C-j> gT
map <C-k> gt

set nohlsearch
set backspace=indent,eol,start
syntax on
filetype plugin on
set number
""autocmd FileType python setlocal completeopt-=preview
set expandtab
""colorscheme molokai

nmap <F8> :TagbarToggle<CR>

"" Python
au BufNewFile,BufRead *.py
    \ set tabstop=4 |
    \ set softtabstop=4 |
    \ set shiftwidth=4 |
    \ set textwidth=79 |
    \ set expandtab |
    \ set autoindent |
    \ set fileformat=unix |

set encoding=utf-8

au FileType python let python_highlight_all=1

let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1

let g:go_fmt_command = "goimports"
let g:go_fmt_fail_silently = 1

let g:jedi#show_documentation_command = 0

" golint
set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim
set completeopt-=preview

" autocmd BufWritePost,FileWritePost *.go execute 'Lint' | cwindow
let g:SuperTabDefaultCompletionType = "context"

map <C-e> :NERDTreeToggle<CR>

au FileType go nmap <F5> <Plug> (go-run)
au FileType go nmap <F6> <Plug>(go-build)
au FileType go nmap <F7> <Plug>(go-test)
au FileType go nmap <leader>c <Plug> (go-coverage)

au FileType go nnoremap // :normal! I// <CR>
au FileType go nnoremap \\ :normal! ^xx <CR>
au FileType go nmap gl :GoLint<CR>
au FileType go nmap gv :GoVet<CR>

au FileType python nnoremap // :normal! I# <CR>
au FileType python nnoremap \\ :normal! ^x <CR>

set pastetoggle=<F2>
set noundofile

" git revert
nmap gc <Plug>GitGutterRevertHunk<CR>
nmap gn <Plug>GitGutterNextHunk<CR>
nmap gp <Plug>GitGutterPrevHunk<CR>