Back

A Package in a league of its own: Helm

Table of Contents

This guide is extracted from part 3 of the Mini Manual series, for people who only wants to learn Helm and what makes it great.

Author:

Homepage: Github

Features:

Helm is incremental completion and selection narrowing framework for Emacs. It will help steer you in the right direction when you're looking for stuff in Emacs (like buffers, files, etc).

Helm is a fork of anything.el originally written by Tamas Patrovic and can be considered to be its successor. Helm sets out to clean up the legacy code in anything.el and provide a cleaner, leaner and more modular tool, that's not tied in the trap of backward compatibility.

Installation:

You can use Emacs Prelude that is already setup properly according to this guide to try out Helm and skip the rest of the installation.

If you have your own Emacs configuration, M-x list-packages and select helm package, then install it. After finish installing, add this code snippet to activate the package:

Minimal config:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PACKAGE: helm              ;;
;;                            ;;
;; GROUP: Convenience -> Helm ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'helm-config)
(helm-mode 1)

Extended config:

  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PACKAGE: helm              ;;
;;                            ;;
;; GROUP: Convenience -> Helm ;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'helm)

;; must set before helm-config,  otherwise helm use default
;; prefix "C-x c", which is inconvenient because you can
;; accidentially pressed "C-x C-c"
(setq helm-command-prefix-key "C-c h")

(require 'helm-config)
(require 'helm-eshell)
(require 'helm-files)
(require 'helm-grep)

(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebihnd tab to do persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z")  'helm-select-action) ; list actions using C-z

(define-key helm-grep-mode-map (kbd "<return>")  'helm-grep-mode-jump-other-window)
(define-key helm-grep-mode-map (kbd "n")  'helm-grep-mode-jump-other-window-forward)
(define-key helm-grep-mode-map (kbd "p")  'helm-grep-mode-jump-other-window-backward)

(setq
 helm-google-suggest-use-curl-p t
 helm-scroll-amount 4 ; scroll 4 lines other window using M-<next>/M-<prior>
 helm-quick-update t ; do not display invisible candidates
 helm-idle-delay 0.01 ; be idle for this many seconds, before updating in delayed sources.
 helm-input-idle-delay 0.01 ; be idle for this many seconds, before updating candidate buffer
 helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp.

 helm-split-window-default-side 'other ;; open helm buffer in another window
 helm-split-window-in-side-p t ;; open helm buffer inside current window, not occupy whole other window
 helm-buffers-favorite-modes (append helm-buffers-favorite-modes
                                     '(picture-mode artist-mode))
 helm-candidate-number-limit 200 ; limit the number of displayed canidates
 helm-M-x-requires-pattern 0     ; show all candidates when set to 0
 helm-ff-file-name-history-use-recentf t
 helm-move-to-line-cycle-in-source t ; move to end or beginning of source
                                        ; when reaching top or bottom of source.
 ido-use-virtual-buffers t      ; Needed in helm-buffers-list
 helm-buffers-fuzzy-matching t          ; fuzzy matching buffer names when non--nil
                                        ; useful in helm-mini that lists buffers
 )

;; Save current position to mark ring when jumping to a different place
(add-hook 'helm-goto-line-before-hook 'helm-save-current-pos-to-mark-ring)

(helm-mode 1)

Usage:

After using Helm, you are going to have a big change in the way you use Emacs. After getting used to the Helm way, you don't want to leave it. However, if you don't like Helm, you can still use Ido, which is introduted in later section. Let's learn how to use helm by play with it.

Completion with Helm is very different with the usual Emacs completion:

You can practice the above commands with C-x b, whicn runs helm-mini. If you mark more than one buffers, RET opens the selected buffers.

IMPORTANT: Please remember that, when you use Helm, you never TAB to complete prefixes like vanilla or other packages like Ido and its related packages. In Helm, when you type something, candidates get updated automatically. In vanilla Emacs, you have to TAB to get a/ list of candidate. This is a great feature from Helm, not a miss of feature. You have to forget the mentally of TABBING to get candidates. If you want quick completion of search patterns in Helm prompt, you always have hippie-expand to replace the TAB behaviour, as introduced at the beginning of this section. This is the biggest confusion for new people switching to Helm. When you are used to Helm, you will love it.

When you execute a Helm command, you enter a Helm session. A Helm session is a dedicated state to working with Helm features; while in a Helm session, a dedicated Helm buffer is always opened. When you quit a Helm session, a Helm buffer is closed. In Helm, you basically need to remember the 3 commands:

However, for convenience, let's TAB with C-z in the above settings, so we can use TAB more comfortably, because you actually use helm-execute-persistent-action more than helm-select-action by adding the code snippet below:

(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebihnd tab to do persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z")  'helm-select-action) ; list actions using C-z

In a Helm session, if you need help, use C-c ?, or refer to this manual again. The commands in the key bindings above are good enough to help you using Helm productively.

Why is Helm poweful?

  • Simple and Consistent interface: Every Helm session starts with a same simple interface: a prompt for entering search patterns and a Helm buffer for displying results as a user types. Because of the consistency and simple interface, new people use Helm with ease.
  • Interactivity: By nature, Helm is very interactive: as a user types, results get updated immediately in the Helm buffer. Because of this feature, Helm provides a unique interactive verion of many commmands that do not exist outside of Helm. For example, helm-ff-run-grep, update grep results as you type.
  • Matching mechanism: This is a powerful feature in Helm that I hvaen't seen in other packages: out of order matching, with regular expression. That's right, you can enter every search pattern as regexp!. A really powerful concept: it enhances explanatory power for many things. One of use cases is exploring a new project: using Helm, you can "learn" the project structure interactively. For example, suppose I'm completely new to the linux kernel source tree, and I wonder whether a file main.c exists for x86 architecture. I know that they must have x86 directory somewhere, and the file could contain main.c in it, i.e. It can be main.c or x86-main.c. These are the only information I know, so I must confirm whether it is true or not, so I tried it in Helm:

    helm_projectile.gif

    First, I enter main.c, and I got lots of candidates. Then, I only want the main.c inside x86 directory, so I type x86. The whole pattern is main.c x86 and Helm returns the correct candidate: arch/x86/boot/main.c.

    It does exist. I also wonder where i5100_edac.c exists, because Intel has a datasheet for it a long time, so it must be implemented. As demonstrated in the above screencast, there was only one i5100_eda.c. Using other so-called "fuzzy-matching" mechanism, you are still required to know things in advanced and this severely limit the explanatory power. For example, to get to the file driver/edac/i5100_edac.c, you have to know the path to fuzzy match like this: dedi51; d for matching driver, ed for matching edac because other directories also start with "e"; i51 for matching i5100_edac.c because serveral files also start with "i5", or contains "1" and "0" or "edac" in it. "i51" is the only unique prefix. Using Helm, you can immediately enter the unique pattern of a candidate and ignore the common prefix to get a candidate. For example, in the screencast above, I got driver/edac/i5100_edac.c immediately just by typing "i51" and the file was narrowed down.

    It's also not all that useful when using with a large source tree, since the source tree contains a large amount of files, and many of these files have same prefix.

  • Performance: Helm can work with over 10000 candidates no problem.

Operate on text at point:

If you are already in a Helm session, you can still get input from the current editing buffer by the following key bindings:

  • C-w yanks word at point, starting from point to the end of the word, into the Helm prompt (the minibuffer).
  • M-n yanks symbol at point

If helm-mode is activated, help commands also automatically recognize symbols at point if such symbols exist in Emacs, and use Helm interface for interactive selecting. For example:

  • C-h f, which runs describe-function, automatically takes the symbol at point as default for searching function.
  • C-h v, which runs describe-variable, automatically takes the symbol at point as default for searching variable.
  • C-h w, which runs where-is, automatically takes the symbol at point as default for showing key binding for a command.
  • … and so on… (C-h C-h to view all commands)

All of those commands automatically make use Helm.

Command: helm-M-x

Key binding:

No key binding. We should give it one:

(global-set-key (kbd "M-x") 'helm-M-x)

Description:

M-x and see the difference. You will see a buffer that lists commands in Emacs. Some of you may not like it because it seems overkill at first. However, even if you really don't like, please bear with me until the end.

Now, type li pa; that's right li , a space and pa. You will see, list-packages is at the top. Surprise! Let's try another input. Now, type pa ^li, and you will receive list-package as the first entry.

helm-M-x is also better then the default M-x, because it provides key bindings right next to the commands, and TAB provides you the built-in documentation of that command in another buffer.

NOTE: You have to bind helm-M-x to M-x manually. Otherwise, you still get Helm completion, but using the vanilla M-x that does not provides the above features like showing key bindings and TAB to open built-in documentation. Another important thing is, you have to pass prefix argument AFTER you run helm-M-x, because your prefix argument will be displayed in the modeline when in helm-M-x buffer. Passing prefix argument BEFORE helm-M-x has no effect.

Demo:

helm-m-x.gif

Command: helm-show-kill-ring

Key binding:

No key binding. We should give it one:

(global-set-key (kbd "M-y") 'helm-show-kill-ring)

Description:

Do you remember that C-y cycle the kill ring? However, working with default kill ring is painful because you have a burden to remember an invisible thing, that is the kill ring, at which position you kill what. To view the kill ring, you have to C-h v and type kill-ring to see content of the kill ring, and it is not pretty.

helm-show-kill-ring solves this problem: Helm shows the kill ring in a readable format and allows you to narrow down by entering sub-strings of candidates. You are lifted the cognitive burden when using the default M-y.

If you follow my Helm configuration, M-y binds to helm-show-kill-ring. Try it and see! Much easier than the default.

Demo:

helm-kill-ring in action (the demo starts when you see START in the minibuffer):

helm-kill-ring.gif

Command: helm-mini

Key binding:

No key binding. We should give it one:

(global-set-key (kbd "C-x b") 'helm-mini)

helm-mini comprises of multiple sources:

  • Current opening buffers, under the header Buffers.
  • Recently opened files, under the header Recentf.
  • Allow you to create a new buffer by pressing RET, under the header Create Buffer.

You can move back and forth between the groups by using <left> and <right> arrow keys. Or you can just scroll down/up with C-v and M-v.

You can filter out buffers by major mode using the pattern *<major-mode>. For example, *dired narrows to only Dired buffers. You can also filter out buffers that belong to a major mode by adding ! to the pattern. For example, *!dired select all buffers that are not in Dired mode.

You can also select buffers in a specific directory by using the pattern /directory. For example, /.emacs.d/ narrows to buffers that are only inside .emacs.d. Add ! before the pattern for reverse version. For example, !/.emacs.d/ narrows to buffers not in .emacs.d.

You can even use helm-mini to narrow to buffers that contains a regexp in their contents, by appending @ before the search pattern. For example, you can select buffers that only contain the string "test": @test. If you want to see the locations of the string in the buffers, C-s while in helm-mini session to switch to helm-moccur. By default, helm-mini searches all opening buffers; you can mark buffers to search by C-SPC; note that even if you mark buffers with C-SPC, content search using @ still lists all buffers that contain the pattern; only when you switch to helm-moccur, matches that are in selected buffers are displayed. You can also perform occur only on the current buffer with prefix argument: C-u C-s.

Meaning of colors and prefixes for buffers:

  • Remote buffers are prefixed with '@'.
  • Red => Buffer have its file modified on disk by an external process.
  • Indianred2 => Buffer exists but its file have been deleted.
  • Orange => Buffer is modified and its file not saved to disk.
  • Italic => A non-file buffer.

Some Emacs themes change the colors. You should check the corresponding colour in your color themes.

Example:

  • If I enter in pattern prompt: *lisp ^helm @moc, Helm will narrow down the list by selecting only buffers that are in lisp mode, start by helm and match "moc" in their contents.
  • If I want to specify more than one major-mode, separate them with ,, e.g *!lisp,!sh,!fun will list all buffers but the ones in lisp-mode, sh-mode and fundamental-mode.
  • If I enter in pattern prompt: *lisp ^helm moc. Notice there is no @ this time helm will look for lisp mode buffers starting by "helm" and have "moc" in their name.
  • If I enter in pattern prompt: *!lisp !helm Helm will narrow down to buffers that are not in "lisp" mode and that do not match "helm".
  • If I enter in pattern prompt: /helm/ w3 Helm will narrow down buffers that are in any "helm" sub-directory and matching w3.

    helm-mini is like an interactive version of ibuffer.

Demo:

helm-mini.gif

The demo starts when you see Eval: START in the minibuffer. Note that the demo used helm-buffers-list, but it's almost the same as helm-mini. The only difference is that helm-buffers-list uses ido-virtual-buffers for listing recently used files, while helm-mini uses recentf.

  • All the C buffers are selected using the pattern *C. In the demo, I also select Tcl buffers with *Tcl and then switched back to C buffers with *C.
  • I only want to have buffers that contains only the string crash. To do that, I add a space, then add the pattern @crash. After the initial search pattern, I hand over the current matching buffers to helm-moccur - moccur with Helm interface using C-s. Candidates can be filtered gradually by adding more pattern, i.e. I added memory to filtered down to buffers that contain the string "memory" among the buffers that are containing crash.
  • As you can see, as you filtered out, the number of candidates decreases, as displayed in the modeline. At the end, there were 12 buffers remained as the result of filtering, down from the total 253 buffers.

The demo above is part of Helm's homepage now.

Similar Commands:

  • helm-for-files: this command lists buffers and recent files and files in current directory. However, when no match is found, helm-mini asks if you want to create a new buffer by highlighting the only entry that look like this:

    helm-new-file-buffer.gif

    while helm-for-files starts a helm-locate session to search in file system for the desired file. By default, helm-for-files binds to <prefix> f (current prefix is C-c h).

  • helm-buffer-list: similar to helm-mini, but instead of listing recent files from recentf, it uses ido-virtual-buffers, which is a list of recently visited files managed by ido. The virtual buffers do not contain path in it. Depends on preference, you can use this command in place of helm-mini.

Command: helm-find-files

Key binding:

<prefix> C-x C-f or C-x C-f (prefix is C-x c by default, or C-c h if set). This is a rather long key sequence, and *=helm-find-files= deserves a better binding:

(global-set-key (kbd "C-x C-f") 'helm-find-files)

Description:

helm-find-files is file navigation on steroid:

  • helm-find-files can fuzzy match candidates in current directory. e.g "fob" or "fbr" will complete "foobar".
  • You can also execute persistent action, which binds to C-z (by default), or TAB if you use my configuration to view content of the buffer. Move the buffer up/down by M-<next> and M-<prior>.
  • You can go up one directory level with C-l. NOTE: if you use C-l, Helm goes up one level and the cursor is on the directory you've just got out. If you want to go up and have the cursors on the parent directory, in Helm prompt, enter ../.
  • To create a directory, enter a new name that does not exist in the current directory and append / at the end. After you created a directory, Helm continues in that directory.
  • To create a new file, enter a name and select the top row that has the symbol [?] next to it. By default, Helm always selects the first match in the directory.
  • You can invoke grep on the current highlighting entry by C-s. C-u C-s to perform recursive grep.
  • Enter ~/ at end of pattern to quickly reach home directory.
  • Enter / at end of pattern to quickly reach root of your file system.
  • Enter ./ at end of pattern to quickly reach `default-directory' (initial start of session). If you are in `default-directory' move cursor on top.

You can perform more actions on the highlighting entry by running helm-select-action, which is bound to TAB by default and C-z in my configuration.

Demo:

I only needed to type into the prompt a few character to get the candidate I wanted among many candidates. The demo starts when you see START in the minibuffer:

helm-find-files.gif

Find file at point:

Do you know the command ffap? It was introduced in part 1, but here is the demo:

ffap.gif

helm-find-files can do that too: all you need to do is moving your point on a proper filepath, and Helm will reach the correct path for you, similar to the screenshot. Now, you have no longer to use a separate command for open file at point, but using the same C-x C-f. It's really convenient.

File and directory histories:

With prefix argument before running helm-find-files, Helm displays a list of visited directories. Select one at point transfer helm-find-files to that directory and you can start navigating there.

During a helm-find-files session, you can get a list of visited files and directories with C-c h. From there, the default action is RET to open the file/directory at point, or continue with helm-find-files starting at that file/directory.

You can use M-p and M-n to move back and forth between previously visited directory.

Command: helm-ff-do-grep, Live grep in Helm

Key binding:

From within a helm-find-files session, you can invoke helm-ff-run-grep with C-s to search a file/directory on highlighted entry in the Helm buffer. With prefix argument, recursively grep a selected directory.

Description:

Every time you type in a character, helm updates grep result at that very moment.

Demo:

live_grep.gif

Command: helm-semantic-or-imenu

Key binding:

<prefix> i (prefix is C-x c by default, or C-c h if set).

Description:

The Imenu facility offers a way to find the major definitions, such as function definitions, variable definitions in a file by name. You can run imenu command individually.

Semantic is a package that provides language-aware editing commands based on 'source code parsers'. When enabled, each file you visit is automatically parsed. Semantic provides execellent supports for C/C++. To enable Semantic mode, execute (semantic-mode 1).

Helm offers an interface to both Semantic and Imenu at the same time: If `semantic-mode' is active in the current buffer, then use semantic for generating tags, otherwise fall back to imenu. If point is on a symbol, helm feeds the symbol into input prompt by default.

Demo:

Here is helm-semantic-or-imenu in action, please notice the "pattern: " prompt in the minibuffer:

  • At first, I narrow to candidates that are functions with this pattern in the prompt: Functi.
  • Then, I narrow to candidates that are functions and contains void in it with this pattern: functi void, effectively select functions that have type void or accept void arguments.
  • Then, I narrow to candidates that are functions and contains int in it with this pattern: functi int, effectively select functions that have type int or accept int arguments.
  • Then, I narrow to candidates that are variables and contains u16 in it, effectively select only variables that have type u16; the same for u32 in the demo.

    helm-semantic-or-imenu.gif

RET to visit the the candidate location. The above examples are just demonstration. You can narrow to anything you want with search patterns separated by spaces, i.e. you can use two string, one is "func" and one is part of a function name, and Helm can narrow to it fine.

In the demo, you see things like class u16 and class u32; that is because u16 and u32 are defined by typedef.

Command: helm-man-woman

Key binding:

<prefix> m (prefix is C-x c by default, or C-c h if set).

Description:

With helm-man-woman, you can quickly jump to any man entry using Helm interface, either by typing in Helm prompt or if point is on a symbol, get a man page at point.

Command: helm-find

Key binding:

<prefix> / (prefix is C-x c by default, or C-c h if set).

Description:

Normally, you use find command with arguments in terminal, then press RET and wait for a big list of result, and if the result is not as expected, repeat the whole thing. You can shorten this process by interactively get results from Unix find for every character you enter into Helm prompt.

You can separate search patterns by spaces. However, since Helm is using Unix find utility, you have to enter search patterns according to the search string of find; use helm-man-woman to read find man page.

By default, invoking helm-find only searches current directory. With prefix argument C-u (i.e. C-u C-c h /), a prompt asks for a directory to find. helm-find can be invoked within helm-find-files session, by using C-c /. To open more than one file, mark candidates by C-SPC or mark all with M-a, then RET. You can switch to helm-find-files by C-x C-f.

If you use helm-find on a large directory and feel the update is too sluggish, you can always suspend the live updating with C-! and resume the live updating with C-! later.

Demo:

helm-find.gif

Command: helm-locate

Key binding:

<prefix> l (prefix is C-x c by default, or C-c h if set).

Description:

Similar to helm-find, but use locate command and accepts search patterns according to locate input. Use helm-man-woman to read locate man page.

To use local database, execute helm-locate with prefix argument C-u. You can also customize Helm to use locate with arguments of your choice:

(setq helm-locate-command "locate %s -e -A --regex %s")

If you use helm-locate on a large directory and feel the update is too sluggish, you can always suspend the live updating with C-! and resume the live updating with C-! later.

Demo:

helm-locate.gif

Command: helm-occur

Key binding:

<prefix> M-s o (prefix is C-x c by default, or C-c h if set). Since this is a rather long binding, we should bind a more convenient key sequence:

(global-set-key (kbd "C-c h o") 'helm-occur)

Description:

Similar to occur, but using Helm interface. As you type, matching lines are updated immediately.

Demo:

You can see that candidates kept getting updated when I was typing. The demo starts when you see START in the minibuffer.

helm-occur.gif

Command: helm-apropos

Key binding:

<prefix> a (prefix is C-x c by default, or C-c h if set).

Description:

Pre-configured helm to describe commands, functions, variables and faces - all in one command!. It is similar to C-h a which runs apropos-command, but interactive includes more than just commands.

Command: helm-info-*

Key binding:

<prefix> h <key> (prefix is C-x c by default, or C-c h if set); <key>, by defaults, is one of g, i or r:

Key Binding
<prefix> h g Command: helm-info-gnus
<prefix> h r Command: helm-info-at-point
<prefix> h r Command: helm-info-emacs

Description:

So, the prefix for info commands is <prefix> h. You can think of h as stands for help and <key> is one of the info topic to make it easier to remember and recall.

helm offers a wide ranges of info commands for various topics. M-x helm info to see these commands, i.e. helm-info-as, helm-info-gdb… You can search for info nodes easily with Helm interface and TAB on an entry to view. M-<next> moves to the next page, M-<prior> moves to the previous page in the other buffer.

You can have more helm-info- commands, such as:

  • helm-info-gdb.
  • helm-info-find.
  • helm-info-elisp.

….

Use M-x helm-info to see the list of helm-info- commands using the default info prefix: <prefix> h or key bindings of your choice.

Command: helm-resume

Key binding:

<prefix> b (prefix is C-x c by default, or C-c h if set).

Description:

This command allows you to resume the previous Helm session, along with your previous patterns in the prompt. For example, if your last helm session was helm-ff-run-grep and you entered patterns in Helm prompt, helm-resume resumes that session along with your previous input.

With prefix argument, helm-resume allows you to choose among all existing Helm buffers. helm-mini or helm-buffer-list does not show existing Helm buffers; they ignore it by default; but if you run ibuffer, you will see a list of Helm buffers visible there. Don't kill them or you won't be able to resume.

This is really convenient when you have complex input ,and preparation steps. For example, if you have multiple regexp patterns in your previous Helm session, then you don't have to type it again. Or in your previous Helm session, you have to travel to a deep directory, and helm-resume helps you to reuse your previous session without going through all the troubles again.

Command: helm-all-mark-rings

Key binding:

<prefix> C-c SPC (prefix is C-x c by default, or C-c h if set). This is a rather long key sequence, this command deserves a better binding, for example:

(global-set-key (kbd "C-h SPC") 'helm-all-mark-rings)

Description:

One handy command. It allows you to view the content of the both the local and global mark rings in a friendly interface, so you can always jump back to where you were. Without this command, if you want to view the mark rings, you have to run M-: and enter mark-ring or global-mark-ring to view their contents. And even so, Emacs only displays the bare content of the mark-ring and global-mark-ring lists, which is the line number and its buffer like this:

(#<marker at 23614 in helm.org> #<marker at 2343 in setup-helm.el> #<marker at 4280 in helm.org> #<marker in no buffer> #<marker at 1271 in helm.org> #<marker at 643 in emacs-tutor.org> #<marker in no buffer> #<marker at 1 in setup-applications.el> #<marker at 1 in emacs-tutor3.org>)

With helm-all-mark-rings, you have this nice interface with line content and syntax highlighting:

helm-all-mark-rings.gif

Command: helm-regexp

Key binding: <prefix> r (prefix is C-x c by default, or C-c h if set).

Description:

Pre-configured helm to build regexps. This commands is useful when you want to test out regexp interactively. Following actions are available if C-z:

Key Action
[f1] Kill regexp as sexp
  Saves the regexp as a string in kill-ring
[f2] Query Replace Regexp
  Invoke query-replace with current regexp to be replaced
[f3] Kill regexp
  Saves the regexp as is in the current Helm prompt

Demo:

helm-regexp.gif

Command: helm-register

Key binding:

<prefix> C-x r i (prefix is C-x c by default, or C-c h if set). Let's bind it to something else:

(global-set-key (kbd "C-c h x") 'helm-register)

Pre-configured for viewing of Emacs registers. By simply executing helm-register, you can view what is in registers. RET or TAB inserts content of highlighting register.

Key Action
[f1] Insert Register
  Insert register content into buffer
[f2] Append Region to Register
  Append an active region to current content
  in highlighting register
[f3] Prepend Region to Register
  Prepend an active region to current content
  in highlighting register

Demo:

helm-registers.gif

Command: helm-list-emacs-process

Key binding:

<prefix> p (prefix is C-x c by default, or C-c h if set).

Description:

This command lists processes that Emacs is using. TAB kills the highlighting process.

Command: helm-top

Key binding:

<prefix> t (prefix is C-x c by default, or C-c h if set).

Description:

This command provides Helm interface for top program. You can interact with each process with the following actions:

Key Binding
[f1] kill (SIGTERM)
[f2] kill (SIGKILL)
[f3] kill (SIGINT)
[f4] kill (Choose signal)

helm-top specific commands:

Key Binding
C-c C-u Refresh helm-top
M-C Sort by shell commands
M-P Sort by CPU usage
M-U Sort by user
M-M Sort by memory

user and shell commands are sorted alphabetically.

Demo:

helm-top.gif

Command: helm-surfraw

Key binding:

<prefix> s (prefix is C-x c by default, or C-c h if set).

Description:

surfraw provides a fast UNIX command line interface to a variety of popular WWW search engines and other artifacts of power. It reclaims google, altavista, dejanews, freshmeat, research index, slashdot…

helm-surfraw provides Helm interface to surfraw program that is easy to use. All you have to do is enter a search term, and then Helm provides a number of services, such as Google, Stackoverflow… to use.

Demo:

helm-surfraw.gif

Command: helm-google-suggest

Key binding:

<prefix> C-c g (prefix is C-x c by default, or C-c h if set). Let's bind it to something else:

(global-set-key (kbd "C-c h g") 'helm-google-suggest)

Description:

This command allows you to interactively enter search terms and get results from Google in a Helm buffer. Then, you can open one of the candidates in other services, such as Google, Wikipedia, Youtube, Imbd, Google Maps, Google News. If you are on Windows, don't type too fast or, you will have an error and you have to abandon this Helm session.

Demo:

helm-google-suggest.gif

Command: helm-color

Key binding: n <prefix> c (prefix is C-x c by default, or C-c h if set).

Description:

If you want to quickly view and copy hexadecimal values of colors, helm-color provides such features. But, helm-color is beyond a mere color picker. The real usage for helm-color is for face customization: the command list ALL available faces, with a preview of each face in the same row. This makes theme customization really quick because you can quickly view a face with its color. Because the way Helm work, you can look at a group of faces together to have a global view if the colors work well with each other.

helm-color contains two groups, with actions in each:

  • Colors:
Key Action
[f1] or C-c N Copy Name
  Copy color name into kill-ring
[f2] or C-c R Copy RGB
  Copy hex value into kill-ring
[f3] or C-c n Insert Name
  Insert color name into current buffer
[f4] or C-c r Insert RGB
  Insert hex value into current buffer
  • Customize Face:
Key Action
[f1] Customize
  Open Customization window
[f2] Copy Name
  Copy face name

Demo:

helm-color.gif

Command: helm-eval-expression-with-eldoc

Key binding:

<prefix> C-: (prefix is C-x c by default, or C-c h if set). C-: is a bit difficult to press, it would be better with:

(global-set-key (kbd "C-c h M-:") 'helm-eval-expression-with-eldoc)

Description:

This command allows you to enter Emacs Lisp expressions and get instant result in a Helm buffer for every character you type. The changed key binding above makes it easier to remember, since the stock eval-expression binds to M-:. So, from now on, to eval expression without live update, use M-:, and with live update, use C-c h M-:. This command is useful when you want to try out a command with various inputs, and want to see result as fast as possible.

Demo:

helm-eval-expression.gif

Command: helm-calcul-expression

Key binding:

<prefix> C-, (prefix is C-x c by default, or C-c h if set).

Description:

This commands provides a Helm interface for calc command. What is calc? According to Calc Manual:

Calc is an advanced calculator and mathematical tool that runs as part of the GNU Emacs environment. Very roughly based on the HP-28/48 series of calculators, its many features include:

  • Choice of algebraic or RPN (stack-based) entry of calculations.
  • Arbitrary precision integers and floating-point numbers.
  • Arithmetic on rational numbers, complex numbers (rectangular and polar), error forms with standard deviations, open and closed intervals, vectors and matrices, dates and times, infinities, sets, quantities with units, and algebraic formulas.
  • Mathematical operations such as logarithms and trigonometric functions.
  • Programmer's features (bitwise operations, non-decimal numbers).
  • Financial functions such as future value and internal rate of return.
  • Number theoretical features such as prime factorization and arithmetic modulo m for any m.
  • Algebraic manipulation features, including symbolic calculus.
  • Moving data to and from regular editing buffers.
  • Embedded mode for manipulating Calc formulas and data directly inside any editing buffer.
  • Graphics using GNUPLOT, a versatile (and free) plotting program.
  • Easy programming using keyboard macros, algebraic formulas, algebraic rewrite rules, or extended Emacs Lisp.

You can enter valid calc mathematic expressions such as +, -,*, /, sin,cos,tan, sqrt…. To make the most out of this command, obviously you should carefully study calc itself with Calc Manual.

Demo:

helm-calc.gif

Command: helm-eshell-history

Key binding:

No key binding. Let's bind it to a key to be used in Eshell:

(require 'helm-eshell)

(add-hook 'eshell-mode-hook
          #'(lambda ()
              (define-key eshell-mode-map (kbd "M-l")  'helm-eshell-history)))

Description:

If you usually re-execute an old shell command in Eshell with M-r, then helm-eshell-history provides a easy and efficient way to work with command history. Using stock M-r, you have to actively remember past commands you worked with; otherwise Eshell cannot find the command. If you forget, you will have to type in the command history to refresh your memory. helm-eshell-history combines the two: you can interactively use regexp to select past commands and get live feedback with a list of commands that satisfy. Now you don't have to remember which command exists. Let Helm handles that problem for you.

Demo:

helm-eshell-history.gif

Package: helm-projectile

Author: Bozhidar Batsov, bozhidar@batsov.com

Homepage: Github

Features:

Provide Helm interface for quickly selecting files in a project using Projectile.

helm_projectile.gif

Installation:

M-x list-packages and select helm-projectile package, then install it. After finish installing, you can start using helm-projectile immediately.

Usage:

C-c p h to run helm-projectile and select files in your project.

Package: helm-descbind

Author

  • 2008-2010: Taiki SUGAWARA, buzz.taiki@gmail.com
  • 2012-2013 Michael Markert, markert.michael@googlemail.com
  • 2013-present: Daniel Hackney dan@haxney.org

Homepage: Github

Features: Helm Descbinds provides an interface to emacs’ describe-bindings making the currently active key bindings interactively searchable with helm.

Additionally you have the following actions

  • Execute the command
  • Describe the command
  • Find the command

Installation:

M-x list-packages and select helm-descbind package, then install it. After finish installing, add this code snippet to activate the package:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PACKAGE: helm-descbinds                      ;;
;;                                              ;;
;; GROUP: Convenience -> Helm -> Helm Descbinds ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'helm-descbinds)
(helm-descbinds-mode)

Usage:

Enter a prefix key and C-h after it. You will see a list of bindings using Helm interface for narrowing.

comments powered by Disqus