Add startup option to open last opened folder #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #30
Feature Description
Adds a new startup option that allows MarkText to automatically open the last folder that was opened in the previous session.
Use Case
Many users work with the same folder/project repeatedly across multiple MarkText sessions. This feature eliminates the need to manually navigate and open the same folder every time MarkText starts.
Implementation
New Startup Option: "Open last opened folder"
lastOpenedFolderin preferencesopenDirectory()Files Changed
src/main/app/index.js- Added startup logic for last foldersrc/main/preferences/schema.json- Added preference definitionssrc/main/windows/editor.js- Save last opened folder on directory opensrc/renderer/src/prefComponents/general/index.vue- Added UI togglesrc/renderer/src/store/preferences.js- Added preference statestatic/locales/*.json- Added i18n strings for all languagesstatic/preference.json- Added default preferenceTesting
Tested on macOS:
Benefits