Skip to content

Instantly share code, notes, and snippets.

@bilzard
Last active April 30, 2019 13:59
Show Gist options
  • Save bilzard/e2396ae5ac1c784c74d52709a4a96530 to your computer and use it in GitHub Desktop.
Save bilzard/e2396ae5ac1c784c74d52709a4a96530 to your computer and use it in GitHub Desktop.

Vim で TypeScript のコードをタグジャンプする

デフォルトでインストールされている ctags は -R オプションがないので、brew でインストールする

brew install ctags

~/.vimrc

command! MakeTags !ctags -R .

デフォルトだと ctags は typescript に対応していないので以下からコードを持ってくる

https://github.com/jb55/typescript-ctags

~/.ctags

プロジェクトで定義した変数や関数を呼び出している箇所にカーソルをあわせて Ctrl-] を押すと定義されているファイルにジャンプする

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment