1

I'm often in the situation, that I am looking for variables and functions with helm. However when I find whatever I was looking for and I want to use it in my code I close the helm buffer, start typing and try to complete the name with company.

It's really annoying to type again after I already found the candidate I was looking for. So the question is, how can I insert the currently selected helm candidate into the previous buffer ?

  • 1
    What are you using to look up variables and functions? helm-apropos? If so, there is currently no way to insert the candidate into the buffer. If you'd like to implement such functionality, take a look at C-c i in helm-find-files-map, which eventually calls helm-insert-file-name-completion-at-point in helm-files.el. – Tianxiang Xiong Oct 15 '16 at 21:32
  • I usually use describe-variable and describe-function. Thanks for the hint regarding helm-find-files-map. – bertfred Oct 15 '16 at 21:37
3

You can use C-c C-k to add the current candidate to the kill ring. Pressing C-y will then insert it into the current buffer as usual.

If you want to paste the candidate directly into the buffer, you can use helm-copy-to-buffer with C-c C-i.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.