Sublime Text: text list of open files

喜夏-厌秋 提交于 2020-01-01 04:54:07

问题


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 new file pops up that has lists all the open file names.

4 open files: 

open_file_1.cc
open_file_1.h
open_file_2.cc
open_file_2.h

回答1:


I wrote a small plugin for this as I could not find anything. Pasting it here so that someone can use it if needed in future.

https://github.com/rrg/ListOpenFiles



回答2:


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.




回答3:


This plugin should be fairly easy to modify to suit your needs:

https://github.com/phildopus/sublime-goto-open-file



来源:https://stackoverflow.com/questions/19665615/sublime-text-text-list-of-open-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!