I first set up this key binding :
(global-set-key (kbd "<f4>") (lambda () (interactive) (other-window -1)))
When I use imenu I always have to perform the following steps:
Step 1: Press M-x
Step 2: type imenu
, Press RET
Step 3: Press TAB
;; run minibuffer-complete
Step 4: Press f4
;; run (other-window -1)
for switch to *Completions*
buffer
Step 5: Press C-s
;; run isearch-forward
I want to use a function to perform the above 5 steps.
Is this possible? This is useful when there are a lot of functions.
Similarly, if want to display struct, need to insert between the second and third steps:
Step 3: type Class
, Press RET
My current solution is to use xdotool:
show struct list: (global-set-key (kbd "<f8>") (lambda () (interactive) (shell-command "xdotool key alt+x && xdotool type 'imenu' && xdotool key Return && xdotool type 'Class' && xdotool key Return && xdotool key Tab && xdotool key F4 && xdotool key ctrl+s")))
show function list: (global-set-key (kbd "<f9>") (lambda () (interactive) (shell-command "xdotool key alt+x && xdotool type 'imenu' && xdotool key Return && xdotool key Tab && xdotool key F4 && xdotool key ctrl+s")))
I want to quickly locate the item by fuzzy search in *Completions*
buffer, Instead of pressing Tab key complete in the minibuffer