CodeEditApp / CodeEditApp/CodeEdit
✨ New files should not be saved to location until manually saved
- 主要语言
- Swift
- 星标
- 23k
- 派生
- 1.2k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Is your feature request related to a problem? Please describe.
Sometimes users just want to create a new file for a scratchpad, to type out some ideas, to paste content in and play around without any repercussion, make a simple todo list, or just take notes. Currently if creating a file via "File → New" or ⌘N will prompt you to select a location before a new file is created. This doesn't allow for on-the-fly file creation because these files shouldn't have a location, that is until the user decides that they want to keep the file and save it in a particular location.
### Describe the solution you'd like
Upon creating a new file via "File → New" or ⌘N, CodeEdit will create a new tab with an empty editor immediately. No file will be saved to a known location however these tabs will persist across application restarts. There is no limit to how many new unsaved files a user can create in a workspace. When the user attempts to save the file, CodeEdit will prompt the user to select a location. If the user attempts to close the tab before saving, CodeEdit will warn the user before this is unsaved and by closing the tab they will loose the contents of that file if they proceed.
### Additional context
https://user-images.githubusercontent.com/806104/220177195-68040f36-e0a6-4c20-bb76-1f8298d29fef.mp4
The proposed behavior is how VS Code currently behaves.
This also applies if the user creates a new file from the Welcome Window.
If the user creates a new file by right clicking a folder in the project navigator and clicking New File, it will add the new file there and not create any empty tabs as specified above.
https://user-images.githubusercontent.com/806104/220187300-0ff07059-e5a9-4fd1-aa5d-1cd0c11b8171.mp4
As shown in the video above, untitled files should be stored as a temporary file in our Application Support folder until the user saves. Then it can be moved to the user-defined location.
贡献指南
调研方向
从 File → New 和 ⌘N 流程开始,然后追踪来自 Welcome Window 和 project navigator 的新文件有何不同。检查 Application Support 中提议的临时文件行为,包括跨重启的持久性、保存位置选择,以及关闭未保存标签页时的警告。当未命名标签页无需初始位置即可工作,同时 project navigator 文件保留其指定行为时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- macos, swift
- 领域
- desktop
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100