Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local history: allow to configure entries location to be relative to workspace #145321

Closed
badrelmers opened this issue Mar 17, 2022 · 14 comments
Closed
Labels
feature-request Request for new features or functionality timeline-local-history

Comments

@badrelmers
Copy link

I hope we can have an option to save the backup file relative to the original file (inside .vscode for example). like local history does.

why not use local history if it does what I want? because it was not updated for 2 years and have a lot of bugs that makes it unusable for me: for example it stopped working with the single file mode, I have to open a folder in vscode otherwise it does not work...)

@bpasero
Copy link
Member

bpasero commented Mar 17, 2022

If I understand this request correctly, a setting to configure where to store local history entries, maybe with support for a relative path to store into the workspace is desired here?

@bpasero bpasero self-assigned this Mar 17, 2022
@bpasero bpasero added timeline-local-history under-discussion Issue is under discussion for relevance, priority, approach labels Mar 17, 2022
@badrelmers
Copy link
Author

a setting to configure where to store local history entries

yes exactly

maybe with support for a relative path to store into the workspace is desired here?

yes with relative path, but I hope it will work in the single file mode too (without needing to use a workspace/folder). this is how local history worked before vscode changed something internally.

@bpasero
Copy link
Member

bpasero commented Mar 17, 2022

Where would the history be stored into when in single file mode where no folder is opened?

@bpasero bpasero changed the title Timeline - save the backup file relative to the original file Local history: allow to configure entries location to be relative to workspace Mar 17, 2022
@badrelmers
Copy link
Author

badrelmers commented Mar 17, 2022

Where would the history be stored into when in single file mode where no folder is opened?

relative to the file I m working on, inside a folder. for example .vscode/History or .history or some configurable path from settings.

@bpasero
Copy link
Member

bpasero commented Mar 17, 2022

Yeah true, that would be consistent. But you might end up with a lot of .vscode folders for every "loose" file you edit in.

@badrelmers
Copy link
Author

But you might end up with a lot of .vscode folders for every "loose" file you edit in.

This is not a problem at all, this is how notepad++ works too (and also the local history), it works very well, I feel safe when I see these backup folders near my files, and I can fully and easily control the backup files, and I can move the parent folder without losing the backup files, and I can rename or delete the original file and still be able to find easily the backup file...

@bpasero bpasero added the feature-request Request for new features or functionality label Mar 18, 2022
@bpasero bpasero added this to the Backlog Candidates milestone Mar 18, 2022
@bpasero bpasero removed their assignment Mar 18, 2022
@bpasero bpasero removed the under-discussion Issue is under discussion for relevance, priority, approach label Mar 18, 2022
@Z-E-D
Copy link

Z-E-D commented Apr 3, 2022

it stopped working with the single file mode, I have to open a folder in vscode otherwise it does not work...)

How do you get that "single file mode"? Currently, every single file that I open in VSCode, even these that are not inside the current workspace, are saved to the Local History.

I would like that VSCode save files to the Local History only if they are part of the currently opened workspace. I don't want it to make file backups for each and every file that I want to edit in VSCode, even my shopping lists and playlist files.

@bpasero
Copy link
Member

bpasero commented Apr 3, 2022

There is a workbench.localHistory.exclude setting that is somewhat helping but not ideal, sounds like a new feature request to file.

@badrelmers
Copy link
Author

badrelmers commented Apr 3, 2022

@Z-E-D I use a batch (.bat) to open vscode, and I use the portable vscode (zip file).
so this is how I open vscode to get the single file mode:
code.exe -r myfile
but remember that vscode will open itself in the same mode it had when you close it, so to test this first close any open folder using File>Close Folder or File>Close Workspace.

but why this now that vscode has implemented the local history and it works as you want it.

@Z-E-D
Copy link

Z-E-D commented Apr 3, 2022

Thanks for responses. I am using VSCode in portable mode, but I would like to avoid creating batch files if I just want to edit a simple file of any kind, just to prevent making its backup.

I just opened a new issue for my request (#146649).

By the way, I agree that VSCode should have an option for saving backup files (local history entries) in the folders relative to the original files.

@LewisUD
Copy link

LewisUD commented May 2, 2022

This would be great as I'd imagine that in my environment (editing files on a shared drive) it would allow my colleagues to also view the file history.

@vscodenpa
Copy link

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality timeline-local-history
Projects
None yet
Development

No branches or pull requests

6 participants
@bpasero @badrelmers @LewisUD @Z-E-D @vscodenpa and others