diff options
author | Teddy Wing | 2014-06-14 21:53:11 -0400 |
---|---|---|
committer | Teddy Wing | 2014-06-14 21:53:11 -0400 |
commit | 6863aa943308a97525cd8a3086f3de58ef688b04 (patch) | |
tree | b59efe18d96e1b0786ab970b60be73e86260bb8d | |
parent | 5b1d2482f222092ae55ec3ad23f414f5f7a1b3e3 (diff) | |
download | dotvim-6863aa943308a97525cd8a3086f3de58ef688b04.tar.bz2 |
Add ftplugin/go.vim
Include basic settings plus compiler mappings. Mappings facilitate
compiling and running Go programs.
-rw-r--r-- | ftplugin/go.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ftplugin/go.vim b/ftplugin/go.vim new file mode 100644 index 0000000..a433d88 --- /dev/null +++ b/ftplugin/go.vim @@ -0,0 +1,17 @@ +" Go vim settings + +compiler go + + +" Compile package +nnoremap <buffer> <leader>cc :make<cr> + +" Compile file +nnoremap <buffer> <leader>cf :make %<cr> + +" Compile & run file +nnoremap <buffer> <leader>cr :!go run %<cr> + + +" Comment string +setlocal commentstring=//\ %s |