termux-widget
termux-widget copied to clipboard
Allow files to be opened with a shortcut
When in a file browser, users can open files with eligible apps. Users can select termux to open a file, which will make termux to copy the file to Downloads.
It would preferable, if termux could make use of the shortcuts defined for termux-widget to open a file sent to termux.
Example:
- Define a shortcut for VIM
- Open a file from a file browser and send it to termux
- Choose the VIM shortcut to handle the file
- The file is opened in vim and the user won''t hardly notice vim isn't a native android app.
There actually is no need to copy the file to Downloads first, since the storage is available via ~/storage/shared once termux-setup-storage is run.
Regards
I just realized I need this in my life too :) Opening text files with Termux's vim (or your favourite editor) directly from a file browser seems a must to me and I wonder why this feature request ended up stalled...
Will this ever be considered?
@araujorm Your choice is termux-file-editor
, if you want to open/edit files by clicking on them in Android file managers. See https://wiki.termux.com/wiki/Intents_and_Hooks
@xeffyr Hi. Many thanks for the prompt response.
I tried your suggestion but termux still tries to place the file in downloads folder instead of opening it directly in the editor. The symlink points to vim in the ~/bin directory, and manually running it, it works.
Running latest release from f-droid.
Am I missing something?
@araujorm No problems on seveal devices Shots
When I press EDIT
nano downloads/.bashrc
is in a NEW SESSION (copy of ../.bashrc
)!
@RalfWerner I see that but I'm afraid that's barely useful. I would expect to be able to edit the file itself (meaning possibly modify it), not edit a copy of it and leave that copy inside termux's ~/downloads... Which again, I can't see the point :(
Perhaps I'm not making myself clear? If that's the case please tell me.
If on the other hand it's a known bug, do you know if there are plans to solve it?
(Note: if it's the intended behaviour, I guess then I must really be missing something, but if that's the case then please tell me so that I won't insist)