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

Open directory with default application #33

Closed
lescx opened this issue Apr 9, 2024 · 4 comments
Closed

Open directory with default application #33

lescx opened this issue Apr 9, 2024 · 4 comments
Labels
done This feature has been completed idea any new ideas or suggestions

Comments

@lescx
Copy link
Contributor

lescx commented Apr 9, 2024

It would be cool if I would be able to open a directory (e.g. this superfile/ repository) in my $EDITOR. What do you think about this?

If this is something that is going to be implemented, we need to think about how to handle terminal based editors, i.e. should we move back to spf after closing the editor?

@yorukot yorukot added the enhancement New feature or request label Apr 9, 2024
@AnshumanNeon
Copy link
Contributor

This is a nice suggestion. I can try to implement this. Shouldn't really be hard.
I think currently superfile can support vim, neovim, nano and emacs
What are your thoughts on this?

@lescx
Copy link
Contributor Author

lescx commented Apr 9, 2024

There are already a few OS specific ways we can check for the default editor.
Of course there are $EDITOR (and $VISUAL which isn't important in this context) we can check for. No need to only rely on the mentioned ones - I do not have vim, neovim, nano or emacs installed on my system for example.

The most simple and error-prone method: A user can define $EDITOR to be for example EDITOR=flatpak run com.visualstudio.code to also open graphical editors (or, more generally a default application - there might be people who want to open e.g. Unreal Engine).

A better way would be to use the linux-specific $XDG_CONFIG_HOME/mimeapps.list where a user can define an application for the inode/directory MIME type. GNOME documentation

macOS uses Uniform Type Identifiers for this.

@yorukot yorukot added idea any new ideas or suggestions and removed enhancement New feature or request labels Apr 10, 2024
@yorukot
Copy link
Owner

yorukot commented Apr 22, 2024

@lescx update this feature in https://github.com/MHNightCat/superfile/tree/open-with-editor

@yorukot yorukot added the done This feature has been completed label Apr 22, 2024
@yorukot
Copy link
Owner

yorukot commented Apr 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done This feature has been completed idea any new ideas or suggestions
Projects
None yet
Development

No branches or pull requests

3 participants