reddit / emacs

Switch buffers in tab bar mode with ido like functionality

ginkx · 2022-01-30 22:53
I use emacs for everything from taking notes, OS level tasks like organizing the file system and calculating dinner costs, to programming in a variety of languages. Ido mode [helps me](https://imgur.com/a/x2ch1A5) in opening files and switching buffers without having to remember the exact filenames. I also use tab bar mode that rolled out with emacs 27 to quickly assess which files are open in a glance. For switching between tabs, I use the `tab-bar-switch-to-tab` command. While it works well, sometimes I [do not remember](https://imgur.com/a/tEwFQjN) the exact filename(or the case specific name). It breaks the flow of my thoughts when I have to think about the exact filename. That's why I'm looking for an ido mode equivalent for the `tab-bar-switch-to-tab` command. I am happy with the tab bar mode and I do not want to start using other packages just for this additional functionality. Is there any way to customize the `tab-bar-switch-to-tab` command to have an ido like completion? If not, is it something that can be implemented and how could I go about implementing that - asking for pointers to start with.
karthink · 2022-01-31 02:19
`tab-bar-switch-to-tab` uses `completing-read`, so the choices are available as completions. Try turning on `icomplete-mode` or `fido-mode`.
ginkx · 2022-01-31 05:35
While `icomplete-mode` in its default setting is unable to do a case insensitive match, `fido-mode` seems to do the job by matching patterns in a case insensitive way. My only concern is whether `fido-mode` will conflict with `ido-mode` in any way. `fido-mode` also seems to complete commands in addition which is not what I want, but I could live with that.
wargxs · 2022-01-31 16:45
I don’t think it conflicts because ido mode replaces the original command with an ido version - for the commands that it supports.