If I have a 100 files open in my project, is there a way to type in a few characters to find and switch to an open file?
That is standard functionality of the treeview in the document sidebar, type characters and the selection moves to the first match, and there is an entry showing what you typed at the bottom of the sidebar. Note this entry goes away and forgets what you typed after a short while or immediately on enter.
There is an unbound keybinding to switch to the document sidebar, so bind it to (for eg) F10 and you just type `F10 filena enter enter` or as much of the `filename` as you need to select it (first enter is to close the entry, second is to switch to the selected).
Also you may want to reduce the font and icon size of the documents sidebar using CSS so you fit more in `Tools->Configuration Files->geany.css` add:
```CSS #treeview6 { font-size: 8pt; -gtk-icon-transform: scale(0.75); } ```
save and restart Geany. Unfortunately there seems to be a minimum row height, that may be my distro or more experimentation needed.
Thanks @elextr , It worked,very nice to know how to do that now! Except for the keybinding. I tried to assign ctrl+F10 when prompted for the combination, but it would only register the Left control key. So I tried editing the keybindings conf file, and entered `<Primary>F10`, restarted Geany. Doesn't do anything.
Ah, well, ctrl + apostrophe worked at the prompt. Great!
For me both `<ctrl_L> F10` and `<ctrl_R> F10` register in the keybinding dialog as `<primary> F10` and both work. The decoding and naming of keys is buried in the depths of GTK or GDK or the Xserver or the Wayland server or .. well you get the picture :-) so Geany has no choice if something decides the controls are not separable.
Geany just calls a GTK function to convert keypresses to the text name that shows in the keybinding dialog, we have no control over it. (As an aside this causes issues with the `<ctrl>CXV` keys when in Cyrillic, Geany gets a Cyrillic character and has no way of knowing its a `C` or `X` or `V` key making copy, cut, paste impossible in Cyrillic unless the user rebinds the keys).
One thing to be aware of is that `<ctrl> F10` and some other key combos are snaffled by some desktops for things like maximise/minimise, and the desktop overrides Geany.
FWIW, shameless publicity stunt: you can also give [Commander plugin](https://plugins.geany.org/commander.html) a spin 😉
The documentation is a bit scarce, and @elextr will rightfully lecture me about it, but basically it allows looking up actions (basically menu entries) and open files by fuzzy matching.
fuzzy matching
What, no AI, needs a backend to Github Copilot :wink:
I'm on Xfce. When I press `<ctrl>F10` nothing happens.
No matter. I'm using `<ctrl>apostrophe` and it's working sweetly.
I thought I *might* try writing a plugin that will pin up to 3 or 4 documents to the tabs over the editor window (similar to Firefox: pinned tabs go to the left and are narrower than normal tabs). I looked over the HowTo on the Geany website. Are there any existing plugins that do something similar, or operate on tabs that I might look at for examples?
FWIW, shameless publicity stunt: you can also give [Commander plugin](https://plugins.geany.org/commander.html) a spin 😉
The documentation is a bit scarce, and @elextr will rightfully lecture me about it, but basically it allows looking up actions (basically menu entries) and open files by fuzzy matching.
@b4n I've enabled it. I'll let you know if I have any questions. In the meantime, could you write a document here on how to use it? ;)
AFAIK all notebook tab manipulation is inside Geany. I suppose pin could be useful, but one has to ask, "if those documents are so important, why are the other 100 open?" ;-)
@elextr So I can search through them if I need to work on patch that only involves 3 or 4 files. And because I usually have all the files associated with a project open. I don't create Geany project files for each patch. Is there a more efficient way for me to use Geany?
AFAIK all notebook tab manipulation is inside Geany.
Does that mean a plugin involving tabs can't be done?
And because I usually have all the files associated with a project open. I don't create Geany project files for each patch. Is there a more efficient way for me to use Geany?
Well, close the project while you make the patch, you should not need a project for that, remember Geany "projects" are pretty much just a named session file, only a few settings can be changed per project, and the files will all come back when you re-open the project.
If the patch needs unusual build commands add extra ones and save them in your user configuration, see the fine manual and my humble self's wiki article on the build system.
Thats not to say this is a perfect solution, but its available now.
Does that mean a plugin involving tabs can't be done?
It would need careful analysis:
1. is sufficient manipulation capability available from GTK (AFAIK it has no pin, but I'm no expert) and is it visible in the plugin API 2. will Geany just override anything the plugin does, it doesn't know about plugins so it has no reason not to behave in its normal way and ignore any pinning.
@elextr I started working on it in https://github.com/geany/geany-plugins/pull/1308 AFAIK Geany won't override anything the plugin does.
github-comments@lists.geany.org