Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text: text list of open files

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
like image 492
sublime Avatar asked Oct 29 '13 17:10

sublime


People also ask

How do I display files in Sublime Text?

You have to add a folder to the Sublime Text window in order to navigate via the sidebar. Go to File -> Open Folder... and select the highest directory you want to be able to navigate. Also, 'View -> Sidebar -> Show Sidebar' if it still doesn't show.

Where are Sublime Text files stored?

Depending on your operating system, this directory is located in: Windows: %APPDATA%\Sublime Text. Mac: ~/Library/Application Support/Sublime Text.

How do I close all files in Sublime Text?

Now you can close all open files with “shift+super+ctrl+w”.

How do I enable open in Sublime Text?

You can open any solution, project, folder or file in Sublime Text by simply right-clicking it in Solution Explorer and selectOpen in Sublime Text.


3 Answers

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
like image 175
sublime Avatar answered Oct 16 '22 15:10

sublime


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.

like image 20
Max Wallace Avatar answered Oct 16 '22 14:10

Max Wallace


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

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

like image 3
lawlist Avatar answered Oct 16 '22 13:10

lawlist