LoginSignup
4
5

More than 1 year has passed since last update.

VimでPowerShellのスクリプトを書く

Last updated at Posted at 2012-12-26

プラグインの導入

PowerShellのスクリプトを書くなら,
PowerShell ISEなどの専用のIDEを使う方が便利かもしれない.
しかし, 普段使い慣れた Vimで書きたいこともある.
ただ, 残念ながら, デフォルトではPowerShell用のFileTypeはない.

そこで, VimPowerShellのスクリプトを書きたい場合は,
以下のいずれかのリンクからプラグインを導入する.

補足

Windows PowerShell Indent File
Windows PowerShell File Type Plugin
はタイトルにあるとおり既に古い (Obsolete).
description に書かれているように, これらは既に
Windows PowerShell Syntax Plugin
に統合されているので, ここからダウンロードするだけで良い.

また, これにはftdetect\ps1.vimが含まれているため,
拡張子がps1のファイルは自動でFileTypeがPowerShell用になる.
そのため, vimfiles以下に, ftdetect\ps1.vimの作成や,
filetype.vimへの追記を自分でする必要はない.

(2012年8月時点)

参考

4
5
0

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
4
5