Sublime Text: text list of open files

前端 未结 3 1655
悲&欢浪女
悲&欢浪女 2021-02-14 09:28

I have some files opened in sublime text. I can see that list on the side panel. I want to know if there is a plugin that can give me this list as text. i.e., I hit a button and

3条回答
  •  生来不讨喜
    2021-02-14 09:54

    Press:

    Ctrl ` (Control-backtick)
    

    To open up Sublime's internal Python console. Then run the following command:

    print("\n".join([view.file_name() for view in sublime.active_window().views() if view and view.file_name()]));
    

    The console should print a newline-separated list of the full paths to your open files. Note that this is a bit of a hack since Sublime's console doesn't support multiline Python. The main advantage here is that you don't have to install anything.

提交回复
热议问题