diff options
author | Teddy Wing | 2020-06-12 22:09:18 +0200 |
---|---|---|
committer | Teddy Wing | 2020-06-15 22:38:18 +0200 |
commit | 72dfc1aeb930043bf1213d2cb8ed8d1317a18cdb (patch) | |
tree | 5ae59d28948989777e819a21dded44ada67e96b5 | |
parent | 45525743771e357a7eec814a737df459649f7e8b (diff) | |
download | dotvim-72dfc1aeb930043bf1213d2cb8ed8d1317a18cdb.tar.bz2 |
ftplugin/go.vim: Add `Ze` mapping to insert `if err` block
Vim-Go has a `:GoIfErr` command, which inserts an `if err != nil` check.
Add a mapping for it to make it quicker to access.
-rw-r--r-- | ftplugin/go.vim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ftplugin/go.vim b/ftplugin/go.vim index 1fdc154..4cf9e62 100644 --- a/ftplugin/go.vim +++ b/ftplugin/go.vim @@ -37,3 +37,5 @@ nmap <buffer> <leader>z <Plug>(go-test) nmap <buffer> <leader>Z <Plug>(go-test-func) nmap <buffer> z<C-^> <Plug>(go-alternate-edit) nmap <buffer> <C-w>z<C-^> <Plug>(go-alternate-vertical) + +nmap <buffer> Ze <Plug>(go-iferr) |