4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Sublime text で開いているタブを開くコマンドリストをクリップボードに保存するプラグイン

Last updated at Posted at 2014-04-09

git-flow + Redmine でプロジェクト運用しているんだけど複数チケットのブランチ間を結構頻繁に移動して、その度に作業中のファイル群を開くのにパスを入力していくのが面倒だったので、subl コマンドで一括して開けるようコマンドを生成してクリップボードに保存するプラグインを書いた。

import sublime, sublime_plugin

class ListingCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        list = []
        for x in range(0, self.view.window().num_groups()):
            for file in self.view.window().views_in_group(x):
                if file.file_name() == None:
                    continue
                list.append('subl "%s"\n' % file.file_name())
                sublime.set_clipboard(''.join(list))
4
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?