Closed ghost closed 4 years ago
I will take a look! One thing that has contributed to little development/changes is the lack of tests. Mitchell just added a bunch a test system for Textadept and i'll look into adapting something like that, too.
First, could you take another look at the save_as implementation? It should integrate with TR pretty seamlessly and is a great addition in day-to-day workflow IMO.
I need to try this out again, what has changed to the earlier version?
I also added the ability to open multiple files at once which was something that is missing from TR unless I overlooked it. This however depends on the save_as functionality hence it would need to get merged first.
How are these related? Is it opening all files in a folder or selecting multiple files?
Also made a change so that there is a confirmation dialog before a file is created via the open dialog. Before this change the open dialog would silently create files if you made a typo while trying to open a file.
That sounds useful! :-) Maybe it should just block further selection?
Lastly just as a convenience function I added a hotkey for going up one directory level even if there is text in the entry field (which prevents backspace from going up one directory level).
Right now you can press Ctrl-Backspace to delete text, and then Backspace to go up, this would skip this?
I need to try this out again, what has changed to the earlier version?
I think last time you looked at it there was some problem with an inputbox that you disliked. There are no more inputboxes, just a confirmation for overwriting a file. Don't think you can do without that.
How are these related?
IIRC there is some code overlap to check for valid conditions/avoid crashes.
Is it opening all files in a folder or selecting multiple files?
It will open all currently displayed items. So you can filter the list e.g. by typing .lua
to only display lua files and then open all those.
I thought about a tagging/select feature to open multiple individual files but so far this has been good enough. The use case was opening all files in a certain folder at once and that has been achieved.
[...] Maybe it should just block further selection?
I don't quite follow, could you elaborate on this?
Right now you can press Ctrl-Backspace to delete text, and then Backspace to go up, this would skip this?
Correct.
It's simply intended as a timesaver. I currently have it mapped to LEFT which makes for easy access.
Feel free to look at any of the corresponding feature branches. They are all aptly named and the code is fairly straight forward.
[...] Maybe it should just block further selection? I don't quite follow, could you elaborate on this?
I meant, an option would be to prevent opening a new file with the mis-typed name, and not open a dialog. On the other hand this could be useful to create a new file ...
Right now you can press Ctrl-Backspace to delete text, and then Backspace to go up, this would skip this?
Correct. It's simply intended as a timesaver. I currently have it mapped to LEFT which makes for easy access.
How about Alt-Up which is what is used in the default GTK gui dialog?
Feel free to look at any of the corresponding feature branches. They are all aptly named and the code is fairly straight forward.
Will do!
On the other hand this could be useful to create a new file ...
I actually use that functionality quite a bit but it is annoying if it happens accidentally, which is why I made the dialog.
How about Alt-Up which is what is used in the default GTK gui dialog?
Ideally all the hotkeys can be configured by the user without changing core files. I haven't looked into this yet however.
Can you open a PR for this one?
https://github.com/loomer/textredux/commit/cc8299516b731c8b93c3226ca9a2e333bf6ed4d4
That should be very useful!
How about Alt-Up which is what is used in the default GTK gui dialog?
Ideally all the hotkeys can be configured by the user without changing core files. I haven't looked into this yet however.
What do you think about having Alt-Up?
list.keys['aup'] = function()
updir(list)
end
I'd prefer this because it's the same as in the default dialog and if at some point in the future 'left' would allow editing of the search term there would be no conflict.
https://github.com/loomer/textredux/commit/f2588e6abc389a87b6249a312f40aaae56ff2d20
I don't mind Alt+Up considering all the GUI filebrowsers seem to use it.
Originally I picked LEFT because CLI filebrowsers like ranger/nnn use it but either is probably fine.
Can you open a PR for the save-as? Probably easier to discuss details there ... Thanks for for your contributions!
With the many changes currently being made to TA I think TR will be adversly affected.
Are you already working on something to mitigate this?
I looked a bit into the changelog, doesn't look too bad, hopefully only adjusting to new names.
Seems pretty resolved to me.
I'd like to get your feedback on various improvements that I've made and if you think any of them are viable enough to get merged upstream.
First, could you take another look at the save_as implementation? It should integrate with TR pretty seamlessly and is a great addition in day-to-day workflow IMO.
I also added the ability to open multiple files at once which was something that is missing from TR unless I overlooked it. This however depends on the save_as functionality hence it would need to get merged first.
Also made a change so that there is a confirmation dialog before a file is created via the open dialog. Before this change the open dialog would silently create files if you made a typo while trying to open a file.
Lastly just as a convenience function I added a hotkey for going up one directory level even if there is text in the entry field (which prevents backspace from going up one directory level).
I really enjoy TR but unfortunately development is somewhat stale so I tried to add some features that I'd like to see. Let me know what you think.