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

codeedit: Create a file if it does not exist #32

Closed
onl1ner opened this issue Feb 8, 2024 · 5 comments · Fixed by #33
Closed

codeedit: Create a file if it does not exist #32

onl1ner opened this issue Feb 8, 2024 · 5 comments · Fixed by #33
Assignees

Comments

@onl1ner
Copy link

onl1ner commented Feb 8, 2024

Currently codeedit command just opens existing files and fails if you try to use it to create one. It would be more convenient if command will create and open a file if it does not exist and just open if it exist (e.g. code on VSCode works this way)

@tom-ludwig
Copy link
Member

What behaviour are we aiming for here? Should the command codeedit create project and codeedit create index.js be distinct, or should codeedit index.js automatically create the file if it doesn't exist in the current directory? I can see how codeedit create might be clearer for beginners, but personally, I'm used to using commands like nvim index.js to create files.

@onl1ner
Copy link
Author

onl1ner commented Feb 9, 2024

I expect codeedit command to automatically create and open a file if it doesn't exist, with the name passed as an argument of the command. So you are not constrained to have a file to open it

@tom-ludwig
Copy link
Member

Thanks for clearing that up. I'll catch up with the other maintainers later. I've got the functionality in place as you described them, but I want to touch base with them first.

@matthijseikelenboom
Copy link

Also, should it be possible to do something like codeedit path/to/file.js and that it then also create the folders if they don't exist?

@onl1ner
Copy link
Author

onl1ner commented Feb 9, 2024

VSCode code command works this way, I think it would be nice to cover this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants