Does emacs ido support buffer flexibility?

I found ido to be very useful when looking for files (Cx Cf) and buffers (Cx b), especially when flex negotiation is enabled. I also installed smex (built on top of ido) to do the same with the commands. Is it possible to use ido to complete words in an open buffer?

For example, in a buffer that contains these words stackoverflow-questions stackoverflow-tags stackoverflow-users , sofq should sofq before stackoverflow-questions .

+4
source share
1 answer

The IDO has received an excellent bunch of various helper functions that are light enough to refine the components used. The following snippet of the function is surprisingly quick, but not fully integrated with existing completion methods:

 (defun buffer-completion () "Use IDO to pick completion matches from current buffer." (interactive) (let ((words (split-string (buffer-string)))) (insert (ido-completing-read "Word completion:" words))) 

To further smooth out the use of our completion, we could use a thing-at-point or equivalent function to skip the distracting hints of the minibuffer.

+2
source

Source: https://habr.com/ru/post/1484131/


All Articles