LoginSignup
63

More than 5 years have passed since last update.

vimでTypeScriptの補完をできるようにする

Last updated at Posted at 2014-02-17

今まではWebstormを使っていたけど補完がvimでもできたので
vimに出戻りました。

NeoBundle 'https://github.com/leafgarland/typescript-vim.git'
NeoBundle 'https://github.com/clausreinke/typescript-tools.git'

NeoBundleでこの2つをインストールします

npm install -g typescript-tools

nodeにtypescript-toolsをインストールします

以上で準備完了です。

あとはvimでtypescriptファイルを開いて
補完情報を渡してくれるtssを起動させます。
開いたファイルをターゲットに起動するには

:TSSstarthere

コマンドを実行します。
これで補完してくれるようになります。
tsファイルを読み込み直したいときは

:TSSreload

を実行します。

この状態でCTRL-x+CTRL-oを押せば補完が効くようになります。
軽快で便利。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
63