LoginSignup
7
3

More than 3 years have passed since last update.

Vim Plugin for GitHub Actions (YAML)

Posted at

GitHub Actions (YAML) 用の Vim Plugin を作っています。
https://github.com/yasuhiroki/github-actions-yaml.vim

image.png

機能

  • .github/workflows/*.yml なファイルに機能するプラグイン
  • syntax highlight
    • GitHub Actions 固有の文字列に新しく syntax highlight を定義しています
    • matrix と入力したつもりが matrlx と入力してしまった...という時に色で気づきやすくなります
  • completion
    • omnifunc を追加したので、GitHub Actions 固有の文字列の入力に補完が効きます

インストール方法

dein.vim をご利用の方は↓でインストールできます。他のプラグインでも慣れた方法でインストールできるかと...。

call dein#add('yasuhiroki/github-actions-yaml.vim')

うまく動かない場合は

このプラグインは filetype の yaml を継承しており 1 既存の YAML の syntax をベースに GitHub Actions 用の syntax を定義しています。
そのためYAMLファイルに対して何かカスタムしている場合は、このプラグインがうまく動かないかもしれません。少なくとも、 vim の標準の YAML syntax を使っていないとハイライトは機能しません。

裏話

過去に circle.vim というプラグインを作っており、それとほぼ同じ(キーワードを差し替えただけ)だったりします。


  1. filetype=yaml.ghaという設定をしています 

7
3
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
7
3