Skip to content

Instantly share code, notes, and snippets.

@mhinz
Created September 12, 2013 15:11
Show Gist options
  • Save mhinz/6539113 to your computer and use it in GitHub Desktop.
Save mhinz/6539113 to your computer and use it in GitHub Desktop.
function! GoTags() abort
let files = substitute(glob('`find -name "*.go" -not -path "*/goeg/*" 2> /dev/null`'), '\n', ' ', '')
let tempfile = tempname()
call system('gotags '. files .' > '. tempfile)
call rename(tempfile, 'tags')
echom '>> Go tags updated!'
endfunction
command Gotags :call GoTags()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment