Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

テキストファイルをスクリプトファイルとして使用したい / Treat plain-text as CotEditor scripting file #15

Closed
usami-k opened this issue Mar 2, 2014 · 4 comments
Labels
request feature requests from users

Comments

@usami-k
Copy link
Contributor

usami-k commented Mar 2, 2014

http://sourceforge.jp/ticket/browse.php?group_id=1836&tid=24183 から移動)

ヘルプ項目「スクリプトメニューをカスタマイズする」に「CotEditor は次の拡張子を持つファイルをスクリプトファイルとして認識します:.applescript .scpt .sh .pl .php .rb .py」との記述があります。
単純に定型文を現在の挿入キャレットの位置に流し込むためにスクリプトを使用することも少なくありません。願わくば、.textClipping および .txt のファイルについては単純に「%%%{CotEditorXOutput=InsertAfterSelection}%%%」と同じ挙動をするようにしていただけると助かります。

@1024jp 1024jp added this to the 1.5 milestone Mar 11, 2014
@1024jp 1024jp self-assigned this Mar 11, 2014
@1024jp
Copy link
Member

1024jp commented Mar 11, 2014

便利そうなので実装したい。検討してみる。

@1024jp
Copy link
Member

1024jp commented Mar 27, 2014

実装自体は簡単なのですぐできた(未コミット)。

ただ、どうせならもう少し拡張してスクリプトメニューとは別管理の「スニペット」機能を新たに付けた方がいいのではないかとか、でもそうするとCotEditorにはすでに「テキストキーバインディング」という似た機能があるから棲み分けが難しいかも、など悩み中。

一番美しい実装は、

  1. スニペット機能を付ける(ひとまずは単純なテキスト挿入)
  2. スニペットはキーバインディングでも呼び出し可能とし、既存のテキストキーバインディングはそちらに移行する

なのかもしれない。となると今度は作業が大掛かりになってしまうが。

@1024jp 1024jp removed this from the 1.5 milestone Apr 21, 2014
@1024jp
Copy link
Member

1024jp commented Apr 21, 2014

やるならちゃんと実装したので、v1.5 のマイルストーンは外します。

ただし、やるとしても v1.7 以降になると思います。

@1024jp 1024jp changed the title テキストファイルをスクリプトファイルとして使用したい テキストファイルをスクリプトファイルとして使用したい / Use tlain-text as CotEditor scripting file Jul 9, 2014
@1024jp 1024jp changed the title テキストファイルをスクリプトファイルとして使用したい / Use tlain-text as CotEditor scripting file テキストファイルをスクリプトファイルとして使用したい / Treat plain-text as CotEditor scripting file Jul 16, 2014
@1024jp 1024jp removed their assignment Jul 18, 2014
@1024jp 1024jp added the request feature requests from users label Oct 30, 2014
@1024jp
Copy link
Member

1024jp commented Sep 23, 2022

ずっとこのイシューは開けっぱなしにしていましたが、やはりこれをスクリプトとして実装するのは悪手だと思うので、クローズします。
スニペット自体はいつの日か改良したい気持ち(全然手をつけられていないですが。

@1024jp 1024jp closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request feature requests from users
Development

No branches or pull requests

2 participants