Skip to content

Instantly share code, notes, and snippets.

@zah
Created November 8, 2012 17:11
Show Gist options
  • Save zah/4040134 to your computer and use it in GitHub Desktop.
Save zah/4040134 to your computer and use it in GitHub Desktop.
vim jump to definition
fun! JumpToDef()
if exists("*GotoDefinition_" . &filetype)
call GotoDefinition_{&filetype}()
else
exe "norm! \<C-]>"
endif
endf
" Jump to tag
nn <M-g> :call JumpToDef()<cr>
ino <M-g> <esc>:call JumpToDef()<cr>i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment