LoginSignup
2
3

More than 5 years have passed since last update.

CotEditorスクリプトで編集中のrubyコードをrbeautifyする。

Posted at

CotEditorのスクリプトで編集中のコードをrbeautifyで整形する方法。以下の通り、とても簡単。

  1. CotEditorのScriptMenuフォルダにrbeautify.rbをコピーする(rbeautifyはgemで入手可能)。
  2. rbeautify.rbの文頭を以下のようにする(書き換える)。
rbeautify_for_CotEditor.rb
#!/usr/bin/ruby -w
# coding: UTF-8
#%%%{CotEditorXInput=AllText}%%%
#%%%{CotEditorXOutput=ReplaceAllText}%%%
(以下略)
  1. ファイル名をrbeautify.^@R.rbなどに変更する。

以上。

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