aboutsummaryrefslogtreecommitdiffstats
path: root/ftplugin/go.vim
diff options
context:
space:
mode:
authorTeddy Wing2016-02-13 22:06:44 +0100
committerTeddy Wing2016-02-13 22:06:44 +0100
commit780ff50f8c087fb0bebd1d640a1ff6a956c89e55 (patch)
tree856b2bc959d318f2010dcb43ab08d76b5f73be73 /ftplugin/go.vim
parentb4b15860b7e1060e054f3955b84c3444bbc52a9a (diff)
downloaddotvim-780ff50f8c087fb0bebd1d640a1ff6a956c89e55.tar.bz2
ftplugin/go.vim: Don't preserve indentation on empty lines
Go style (and `go fmt`) doesn't put indentation on empty lines, so for the sake of good Go, don't add indentation in this case.
Diffstat (limited to 'ftplugin/go.vim')
-rw-r--r--ftplugin/go.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/ftplugin/go.vim b/ftplugin/go.vim
index fa655bd..4ea991b 100644
--- a/ftplugin/go.vim
+++ b/ftplugin/go.vim
@@ -16,5 +16,11 @@ nnoremap <buffer> <leader>cr :!go run %<cr>
nnoremap <buffer> cdf :!go fmt %<cr>
+" Don't preserve indentation on empty lines
+inoremap <buffer> <CR> <CR>
+nnoremap <buffer> o o
+nnoremap <buffer> O O
+
+
" Comment string
setlocal commentstring=//\ %s