Difference between revisions of "Helm"

From WikEmacs
Jump to navigation Jump to search
(minor grammar fix)
 
(15 intermediate revisions by 5 users not shown)
Line 7: Line 7:
 
}}
 
}}
  
'''Helm''' is an 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 an incremental completion and selection narrowing framework for Emacs. It can be seen as a set of tools with an interactive interface that 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''' originaly written by Tamas Patrovics 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.
+
Helm is a fork of '''anything.el''' originally written by Tamas Patrovics 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.
  
= Basic setup =
+
== Basic setup ==
 +
 
 +
Most [[Starter_Kits]] like [[Prelude]] come bundled with helm.
 +
 
 +
=== Install with MELPA ===
 +
 
 +
Helm is packaged in [[MELPA]], so: {{Command|package-install RET helm RET}}
 +
 
 +
and you're ready to try every helm command you like. You don't know where to start ? Run <code>helm-swoop</code> or <code>helm-buffers-list</code> now !
 +
 
 +
=== Manual install ===
  
 
<source lang="lisp">
 
<source lang="lisp">
Line 19: Line 29:
 
</source>
 
</source>
  
= Helpful keybindings =
+
== Usage ==
 +
 
 +
=== Useful Keybindings ===
 +
 
 +
; {{Keys|C-p}}, {{Keys|C-n}}, <up> and <down>
 +
: Move to previous/next helm suggestion.
 +
 
 +
; {{Keys|M-v}} {{Keys|M-p}}
 +
: move to next/previous pages
 +
 
 +
; {{Keys|C-space}}
 +
: mark candidates. This is useful when you need to perform an action on many candidates of your choice. '''M-a''' to select all.
 +
 
 +
; {{Keys|C-c C-i}}
 +
: insert candidates in the current buffer.
 +
 
 +
; {{Keys|TAB}}
 +
: '''access to the actions menu'''. An action is a command to run on marked candidates (one or more) and quit current Helm session; an action menu is a text-based menu that lists actions you can take. For example, Find File (open file), Find File in Dired, Grep File, etc.
 +
 
 +
; {{Keys|C-z}}
 +
: executes '''helm-execute-persistent-action'''. A persistent action is an action that you use in a Helm session without quitting the session.
 +
 
 +
; {{Keys|C-t}}
 +
: toggle the horizontal and vertical view.
 +
 
 +
; {{Keys|C-c ?}}
 +
: show help
 +
 
 +
In some Helm session, such as helm-find-files or helm-mini, you can select more than one candidates and execute actions on them, such as grep or open.
 +
 
 +
=== Use regular expressions ===
 +
 
 +
The matching mecanism uses regular expressions.
 +
 
 +
For example, in {{Command|helm-M-x}}, typing <code>pack ^li</code> will suggest
 +
 
 +
    list-packages
 +
 
 +
at first.
 +
 
 +
=== 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:
 +
 
 +
; {{Keys|C-w}}
 +
: yanks word at point, starting from point to the end of the word, into the Helm prompt (the minibuffer).
 +
 
 +
; {{Keys|M-n}}
 +
: yanks symbol at point
 +
 
 +
== Example commands ==
 +
 
 +
The extensive list of available commands is listed on [https://github.com/emacs-helm/helm/wiki their wiki]. Some common ones are:
 +
 
 +
=== helm-find-file: navigate in your file hierarchy ===
 +
 
 +
Many actions are available with the TAB key (open, find file in Dired, grep selected files, open as root, copy files, etc). You can also view the full list of action keys with '''C-c ?'''.
 +
 
 +
You can view images with '''C-u C-z''' on an image file, and start ''follow mode'' with '''C-c C-f'''. It uses [[image-dired]] in the background.
 +
 
 +
=== helm-M-x ===
 +
 
 +
A concurrent to the builtin '''M-x''' and [[smex]].
 +
 
 +
== Extensions ==
 +
 
 +
=== helm-ext ===
  
; {{Keys|C-n}}
+
[https://github.com/cute-jumper/helm-ext helm-ext] has some extensions, unlikely to make it to helm, like different and even more fuzzy file path completions.
: Move to next helm suggestion.
 
  
; {{Keys|C-p}}
+
== How to write elisp extensions with Helm ==
: Move to previous helm suggestion.
 
  
= Common Customization =
+
There is no such documentation on Helm's wiki. You'll find some on this page: [[how to write helm extensions]].
  
= See Also =
+
== See Also ==
  
[[Ido]]
+
* [[Ido]]
  
= Project Pages =
+
== Project Pages ==
 
* [https://github.com/emacs-helm/helm GitHub Repo]
 
* [https://github.com/emacs-helm/helm GitHub Repo]
* [https://github.com/emacs-helm/helm/raw/master/doc/helm.pdf User's Guide]
+
* [https://github.com/emacs-helm/helm/wiki Wiki]
  
= Tutorial Pages =
+
== Tutorial Pages ==
  
 +
* [http://tuhdo.github.io/helm-intro.html helm-intro]
 
* [http://bc.tech.coop/blog/070711.html QuickSilver for Emacs: anything.el]
 
* [http://bc.tech.coop/blog/070711.html QuickSilver for Emacs: anything.el]
* [http://metasandwich.com/2010/07/30/what-can-i-get-for-10-dolla-anything-el/ What can I get for 10 dolla? Anything.el.]
 
  
[[Category:Completion]][[Category:Convenience]][[Category:Third Party Package]]
+
[[Category:Intermediate]]
 +
[[Category:Completion]]
 +
[[Category:Convenience]]
 +
[[Category:Search]]
 +
[[Category:Third Party Package]]

Latest revision as of 21:46, 9 April 2017

Helm
Description incremental completion and selection narrowing framework
Author Thierry Volpiatto
Maintainer Thierry Volpiatto
Source https://github.com/emacs-helm/helm

Helm is an incremental completion and selection narrowing framework for Emacs. It can be seen as a set of tools with an interactive interface that 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 Patrovics 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.

Basic setup

Most Starter_Kits like Prelude come bundled with helm.

Install with MELPA

Helm is packaged in MELPA, so: M-x package-install RET helm RET

and you're ready to try every helm command you like. You don't know where to start ? Run helm-swoop or helm-buffers-list now !

Manual install

(add-to-list 'load-path "/path/to/helm/directory")
(require 'helm-config)
(global-set-key (kbd "C-c h") 'helm-mini)

Usage

Useful Keybindings

[C-p], [C-n], <up> and <down>
Move to previous/next helm suggestion.
[M-v] [M-p]
 move to next/previous pages
[C-space]
mark candidates. This is useful when you need to perform an action on many candidates of your choice. M-a to select all.
[C-c C-i]
insert candidates in the current buffer.
[TAB]
access to the actions menu. An action is a command to run on marked candidates (one or more) and quit current Helm session; an action menu is a text-based menu that lists actions you can take. For example, Find File (open file), Find File in Dired, Grep File, etc.
[C-z]
executes helm-execute-persistent-action. A persistent action is an action that you use in a Helm session without quitting the session.
[C-t]
toggle the horizontal and vertical view.
[C-c ?]
show help

In some Helm session, such as helm-find-files or helm-mini, you can select more than one candidates and execute actions on them, such as grep or open.

Use regular expressions

The matching mecanism uses regular expressions.

For example, in M-x helm-M-x, typing pack ^li will suggest

   list-packages

at first.

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

Example commands

The extensive list of available commands is listed on their wiki. Some common ones are:

helm-find-file: navigate in your file hierarchy

Many actions are available with the TAB key (open, find file in Dired, grep selected files, open as root, copy files, etc). You can also view the full list of action keys with C-c ?.

You can view images with C-u C-z on an image file, and start follow mode with C-c C-f. It uses image-dired in the background.

helm-M-x

A concurrent to the builtin M-x and smex.

Extensions

helm-ext

helm-ext has some extensions, unlikely to make it to helm, like different and even more fuzzy file path completions.

How to write elisp extensions with Helm

There is no such documentation on Helm's wiki. You'll find some on this page: how to write helm extensions.

See Also

Project Pages

Tutorial Pages