Le 22/07/2016 à 14:03, Vasiliy Faronov a écrit :
Colomban Wendling's Commander plugin [1] also supports switching between open files, even though this is not documented.
Yeah documentation could be improved indeed.
However, to limit Commander to display *only* the files, you have to type an "f:" prefix (likewise "c:" for menu items). Personally I find this cumbersome, so I use a straightforward patch that adds keybindings for limited modes (not sending this upstream yet because it needs more UI work).
You could have a keybinding that just popups the dialog like normal, but pre-fills it with the appropriate prefix. Shouldn't be too much change and virtually no UI rework.
I just created https://github.com/geany/geany-plugins/pull/468, seems straightforward enough :)
Colomban, do you think these two features -- symbols from the current document, and keybindings for limited modes -- would be good to have in Commander?
Sure, they seem useful.
About symbols, at some point I wanted to have a mode showing all symbols form the workspace (not only current file), but a simple implementation was way too slow with a large number of files. Probably for one single file it'd be alright; otherwise, a more complex but probably more efficient approach could be dynamically searching for matches instead of building the list and filtering it. But that requires large rework.
Also, just one thing: adding new dynamic elements might require making sure it doesn't get too much in the way of other matches. I mean that for example, out of habit I now expect some short "commands" to do something particular, and would be a little annoyed if they didn't work because something else matched. But well, that doesn't have to stop innovation either, so it's a matter of balance. Though, with automatic filtering it becomes less of a problem, as it becomes very easy to filter a particular category, and things in other categories then won't conflict :)
Regards, Colomban