Created
November 9, 2018 23:33
-
-
Save lxfontes/9c8fc7255725edde7bfe12cfd29c941c to your computer and use it in GitHub Desktop.
Create godoc for function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" adapted from https://github.com/fatih/dotfiles/blob/master/vimrc | |
" create a go doc comment based on the word under the cursor | |
function! s:create_go_doc_comment() | |
norm "zyiw | |
execute ":norm O// " | |
norm "zp | |
execute ":norm A ..." | |
endfunction | |
nnoremap <leader>ui :<C-u>call <SID>create_go_doc_comment()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment