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

Extending the function of "Open selected file" #1959

Open
ghost opened this issue Sep 19, 2018 · 5 comments
Open

Extending the function of "Open selected file" #1959

ghost opened this issue Sep 19, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 19, 2018

Geany has a function of opening files it can read, with right-click -> ""Open selected file", with a good (default) shortcut key Ctrl+Shift+O. Nicely, It understand relative addresses (i.e, you don't have to specify the full address), and you don't have to actually select the address.

Inspired by web URL generality (can be both local, and other-site resource), I suggest extending the above function, to become a general resource/address openner:
so that in case it it's a resource that Geany cannot open by itself, to trigger the appropriate program to open:

  • web addresses
  • folders (directories)
  • images
  • others to come
    (It does not have to be implemented all at once)

Design variants/ideas:
A. Allow specification, in Preferences, not only of a default browser, but of any other programs needed to open files in the list above
B. When asked to open something Geany cannot, to invoke the system's "Open with..." dialog.

I know that there is a plugin that can open web links, and that the user can set up 1 custom "Context action". But these are not nearly as convenient as a single, universal command I'm suggesting above.

IMHO, it will be practical and useful daily for everyone.

@elextr
Copy link
Member

elextr commented Sep 19, 2018

Should be a plugin, especially with the system dependencies of external applications, open with dialogs etc its unlikely to be easily portable.

@Skif-off
Copy link
Contributor

Why not use GeanPy, Peasy or GeanyLua? And OS will do everything itself...

@ghost
Copy link
Author

ghost commented Sep 22, 2018

What about variant A. I suggested? Isn't it too basic and simple to require separate plugin?
For example, to open a folder:

  • "Open selected file" already can tell if the when the string selected/under cursor is a directory
  • in Preferences-> Tools -> Tools paths , add another field for the user to specify the path to "File manager" application
  • all is left is to modify the code of "Open selected file" to make it invoke that path

@elextr
Copy link
Member

elextr commented Sep 22, 2018

If its a directory I would have thought you would want to open the Geany file chooser, not an external application.

@ghost
Copy link
Author

ghost commented Sep 22, 2018

An advantage of the external (OS) file manager/explorer is that once there, you can open any file there in whichever other program you want (say right-click & open with... or other ways).

Plus, this also can be used as a default fall-back in case you ask the "Open selected file" to open a file that is neither readable by Geany, nor you have specified yet a command in "Preferences -> Tools" to open with: just open the containing directory then.

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

No branches or pull requests

2 participants