A Sublime Text Package
When a new window is opened with a single folder:
- A
.sublime.autoopenfile is looked for in the folder. If it exists, each file listed in the file is then opened. - Otherwise it'll look for a
notes.txt,notes.md,readme.md,readme.txt, thenreadmefiles in that order in the root folder then awikifolder and opens the first it finds.
The files and folders looked for by default can be changed in the package settings.
Try having a notes.txt or readme.md file in a folder and opening that folder in sublime.
mkdir ~/tmp
echo hello world > ~/tmp/notes.txt
subl ~/tmp
OR
Put the files you want to be opened when this folder is opened into a .sublime.autoopen file, like:
# .sublime.autoopen contents
my_other_note_file.md
Combined with the Open URL plugin ... create a projects.txt file that you put lines in for each project folder. Then just open this projects.txt file, put the cursor over a line, ctrl+u to "open url" to that folder, and bamn, the folder is opened and the appropriate notes/readme file is opened automatically.
Shout out to @josiahcoad for code reviewing and improvement ideas!
Check out my other Sublime Text packages