Skip to content
Thierry Volpiatto edited this page Sep 1, 2024 · 2 revisions

Table of Contents

Introduction

helm-mode when enabled make all existing completions in Emacs using Helm UI. The behavior of the commands is not modified, only the way completion is provided and look changes.

Enable helm-mode

Add to init file:

(helm-mode 1)

Or use M-x helm-mode to enable or disable it temporarily.

Configure completing-read

helm-completing-read-handlers-alist

Use completions-detailed variable

When setting this variable to non-nil, helm-mode enables affixation functions in many places and provides completions with additional informations, try for example describe-function with and without.

Misc

You will find several variables doing various things in the helm-mode group, modify as needed.

Configure completion-in-region and completing-read behavior

helm-completion-style

Helm

Helm-fuzzy

Emacs

helm-completion-styles-alist

Use completing-read-multiple with Helm-mode enabled

When using completing-read-multiple when helm-mode is enabled you don’t have to use it like in emacs vanilla, that is pressing TAB after each completion done, just mark all you need and keep going.

Allow marked candidates in completing-read

Even better is to get rid of completing-read-multiple when writing your elisp applications, for this let bind the variable helm-comp-read-use-marked around a completing-read call, this will allow the completing-read to return a list of marked candidates instead of a single candidate, of course don’t forget to provide a completing-read-multiple as fallback for non helm users.

e.g.

(let ((helm-comp-read-use-marked t))
  (if (and (boundp 'helm-mode) helm-mode)
      (completing-read ...)
    (completing-read-multiple ...)))
Clone this wiki locally