" Go vim settings compiler go " Compile package nnoremap cc :make " Compile file nnoremap cf :make % " Compile & run file nnoremap cr :!go run % " Format nnoremap cdf :!go fmt % " Don't preserve indentation on empty lines inoremap nnoremap o o nnoremap O O " Comment string setlocal commentstring=//\ %s nmap Zr :GoRun . nmap Zb (go-build) nmap Zc (go-test-compile) nmap Zf (go-imports) nmap z (go-test) nmap Z (go-test-func)