commit | author | age
|
76bbd0
|
1 |
;;; helm-help.el --- Help messages for Helm. -*- lexical-binding: t -*- |
C |
2 |
|
|
3 |
;; Copyright (C) 2012 ~ 2018 Thierry Volpiatto <thierry.volpiatto@gmail.com> |
|
4 |
|
|
5 |
;; This program is free software; you can redistribute it and/or modify |
|
6 |
;; it under the terms of the GNU General Public License as published by |
|
7 |
;; the Free Software Foundation, either version 3 of the License, or |
|
8 |
;; (at your option) any later version. |
|
9 |
|
|
10 |
;; This program is distributed in the hope that it will be useful, |
|
11 |
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
;; GNU General Public License for more details. |
|
14 |
|
|
15 |
;; You should have received a copy of the GNU General Public License |
|
16 |
;; along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 |
|
|
18 |
;;; Code: |
|
19 |
(require 'helm) |
|
20 |
|
|
21 |
(defvar helm-org-headings--nofilename) |
|
22 |
(declare-function helm-source-org-headings-for-files "helm-org.el") |
|
23 |
|
|
24 |
|
|
25 |
(defgroup helm-help nil |
|
26 |
"Embedded help for `helm'." |
|
27 |
:group 'helm) |
|
28 |
|
|
29 |
(defface helm-helper |
|
30 |
'((t :inherit helm-header)) |
|
31 |
"Face for Helm help string in minibuffer." |
|
32 |
:group 'helm-help) |
|
33 |
|
|
34 |
(defvar helm-help--string-list '(helm-help-message |
|
35 |
helm-buffer-help-message |
|
36 |
helm-ff-help-message |
|
37 |
helm-read-file-name-help-message |
|
38 |
helm-generic-file-help-message |
|
39 |
helm-grep-help-message |
|
40 |
helm-pdfgrep-help-message |
|
41 |
helm-etags-help-message |
|
42 |
helm-ucs-help-message |
|
43 |
helm-bookmark-help-message |
|
44 |
helm-esh-help-message |
|
45 |
helm-buffers-ido-virtual-help-message |
|
46 |
helm-moccur-help-message |
|
47 |
helm-top-help-message |
|
48 |
helm-el-package-help-message |
|
49 |
helm-M-x-help-message |
|
50 |
helm-imenu-help-message |
|
51 |
helm-colors-help-message |
|
52 |
helm-semantic-help-message |
|
53 |
helm-kmacro-help-message)) |
|
54 |
|
|
55 |
(defvar helm-documentation-buffer-name "*helm documentation*") |
|
56 |
|
|
57 |
;;;###autoload |
|
58 |
(defun helm-documentation () |
|
59 |
"Preconfigured Helm for Helm documentation. |
|
60 |
With a prefix arg refresh the documentation. |
|
61 |
|
|
62 |
Find here the documentation of all documented sources." |
|
63 |
(interactive) |
|
64 |
(require 'helm-org) |
|
65 |
(with-current-buffer (get-buffer-create helm-documentation-buffer-name) |
|
66 |
(let ((inhibit-read-only t)) |
|
67 |
(erase-buffer) |
|
68 |
(cl-loop for elm in helm-help--string-list |
|
69 |
for str = (helm-interpret-value elm) |
|
70 |
do (insert (substitute-command-keys str) "\n\n")) |
|
71 |
(org-mode)) |
|
72 |
(setq buffer-read-only t) |
|
73 |
(view-mode)) |
|
74 |
(let ((helm-org-headings--nofilename t)) |
|
75 |
(helm :sources (helm-source-org-headings-for-files |
|
76 |
(list (get-buffer helm-documentation-buffer-name))) |
|
77 |
:candidate-number-limit 99999 |
|
78 |
:buffer "*helm doc*"))) |
|
79 |
|
|
80 |
;;; Local help messages. |
|
81 |
|
|
82 |
;;; `helm-buffer-list' help |
|
83 |
;; |
|
84 |
;; |
|
85 |
(defvar helm-buffer-help-message |
|
86 |
"* Helm Buffer |
|
87 |
|
|
88 |
** Tips |
|
89 |
|
|
90 |
*** Completion |
|
91 |
|
|
92 |
**** Major-mode |
|
93 |
|
|
94 |
You can enter a partial major-mode name (e.g. lisp, sh) to narrow down buffers. |
|
95 |
To specify the major-mode, prefix it with \"*\" e.g. \"*lisp\". |
|
96 |
|
|
97 |
If you want to match all buffers but the ones with a specific major-mode |
|
98 |
\(negation), prefix the major-mode with \"!\" e.g. \"*!lisp\". |
|
99 |
|
|
100 |
If you want to specify more than one major-mode, separate them with \",\", |
|
101 |
e.g. \"*!lisp,!sh,!fun\" lists all buffers but the ones in lisp-mode, sh-mode |
|
102 |
and fundamental-mode. |
|
103 |
|
|
104 |
Then enter a space followed by a pattern to narrow down to buffers matching this |
|
105 |
pattern. |
|
106 |
|
|
107 |
**** Search inside buffers |
|
108 |
|
|
109 |
If you enter a space and a pattern prefixed by \"@\", Helm searches for text |
|
110 |
matching this pattern \*inside* the buffer (i.e. not in the name of the buffer). |
|
111 |
|
|
112 |
If you enter a pattern prefixed with an escaped \"@\", Helm searches for a |
|
113 |
buffer matching \"@pattern\" but does not search inside. |
|
114 |
|
|
115 |
**** Search by directory name |
|
116 |
|
|
117 |
If you prefix the pattern with \"/\", Helm matches over the directory names |
|
118 |
of the buffers. |
|
119 |
|
|
120 |
This feature can be used to narrow down the search to one directory while |
|
121 |
subsequent strings entered after a space match over the buffer name only. |
|
122 |
|
|
123 |
Note that negation is not supported for matching on buffer filename. |
|
124 |
|
|
125 |
Starting from Helm v1.6.8, you can specify more than one directory. |
|
126 |
|
|
127 |
**** Fuzzy matching |
|
128 |
|
|
129 |
`helm-buffers-fuzzy-matching' turns on fuzzy matching on buffer names, but not |
|
130 |
on directory names or major modes. A pattern starting with \"^\" disables fuzzy |
|
131 |
matching and matches by exact regexp. |
|
132 |
|
|
133 |
**** Examples |
|
134 |
|
|
135 |
With the following pattern |
|
136 |
|
|
137 |
\"*lisp ^helm @moc\" |
|
138 |
|
|
139 |
Helm narrows down the list by selecting only the buffers that are in lisp mode, |
|
140 |
start with \"helm\" and which content matches \"moc\". |
|
141 |
|
|
142 |
Without the \"@\" |
|
143 |
|
|
144 |
\"*lisp ^helm moc\" |
|
145 |
|
|
146 |
Helm looks for lisp mode buffers starting with \"helm\" and containing \"moc\" |
|
147 |
in their name. |
|
148 |
|
|
149 |
With this other pattern |
|
150 |
|
|
151 |
\"*!lisp !helm\" |
|
152 |
|
|
153 |
Helm narrows down to buffers that are not in \"lisp\" mode and that do not match |
|
154 |
\"helm\". |
|
155 |
|
|
156 |
With this last pattern |
|
157 |
|
|
158 |
/helm/ w3 |
|
159 |
|
|
160 |
Helm narrows down to buffers that are in any \"helm\" subdirectory and |
|
161 |
matching \"w3\". |
|
162 |
|
|
163 |
*** Creating buffers |
|
164 |
|
|
165 |
When creating a new buffer, use `\\[universal-argument]' to choose a mode from a |
|
166 |
list. This list is customizable, see `helm-buffers-favorite-modes'. |
|
167 |
|
|
168 |
*** Killing buffers |
|
169 |
|
|
170 |
You can kill buffers either one by one or all the marked buffers at once. |
|
171 |
|
|
172 |
One kill-buffer command leaves Helm while the other is persistent. Run the |
|
173 |
persistent kill-buffer command either with the regular |
|
174 |
`helm-execute-persistent-action' called with a prefix argument (`\\[universal-argument] \\<helm-map>\\[helm-execute-persistent-action]') |
|
175 |
or with its specific command `helm-buffer-run-kill-persistent'. See the |
|
176 |
bindings below. |
|
177 |
|
|
178 |
*** Switching to buffers |
|
179 |
|
|
180 |
To switch to a buffer, press RET, to switch to a buffer in another window, select this buffer |
|
181 |
and press \\<helm-buffer-map>\\[helm-buffer-switch-other-window], when called with a prefix arg |
|
182 |
the buffer will be displayed vertically in other window. |
|
183 |
If you mark more than one buffer, the marked buffers will be displayed in different windows. |
|
184 |
|
|
185 |
*** Meaning of colors and prefixes for buffers |
|
186 |
|
|
187 |
Remote buffers are prefixed with '@'. |
|
188 |
Red => Buffer's file was modified on disk by an external process. |
|
189 |
Indianred2 => Buffer exists but its file has been deleted. |
|
190 |
Orange => Buffer is modified and not saved to disk. |
|
191 |
Italic => A non-file buffer. |
|
192 |
Yellow => Tramp archive buffer. |
|
193 |
|
|
194 |
** Commands |
|
195 |
\\<helm-buffer-map> |
|
196 |
\\[helm-buffer-run-zgrep]\t\tGrep Buffer(s) works as zgrep too (`\\[universal-argument]' to grep all buffers but non-file buffers). |
|
197 |
\\[helm-buffers-run-multi-occur]\t\tMulti-Occur buffer or marked buffers (`\\[universal-argument]' to toggle force-searching current-buffer). |
|
198 |
\\[helm-buffer-switch-other-window]\t\tSwitch to other window. |
|
199 |
\\[helm-buffer-switch-other-frame]\t\tSwitch to other frame. |
|
200 |
\\[helm-buffers-run-browse-project]\t\tBrowse project from buffer. |
|
201 |
\\[helm-buffer-run-query-replace-regexp]\t\tQuery-replace-regexp in marked buffers. |
|
202 |
\\[helm-buffer-run-query-replace]\t\tQuery-replace in marked buffers. |
|
203 |
\\[helm-buffer-run-ediff]\t\tEdiff current buffer with candidate. With two marked buffers, ediff those buffers. |
|
204 |
\\[helm-buffer-run-ediff-merge]\t\tEdiff-merge current buffer with candidate. With two marked buffers, ediff-merge those buffers. |
|
205 |
\\[helm-buffer-diff-persistent]\t\tToggle Diff-buffer with saved file without leaving Helm. |
|
206 |
\\[helm-buffer-revert-persistent]\t\tRevert buffer without leaving Helm. |
|
207 |
\\[helm-buffer-save-persistent]\t\tSave buffer without leaving Helm. |
|
208 |
\\[helm-buffer-run-kill-buffers]\t\tDelete marked buffers and leave Helm. |
|
209 |
\\[helm-buffer-run-kill-persistent]\t\tDelete buffer without leaving Helm. |
|
210 |
\\[helm-buffer-run-rename-buffer]\t\tRename buffer. |
|
211 |
\\[helm-toggle-all-marks]\t\tToggle all marks. |
|
212 |
\\[helm-mark-all]\t\tMark all. |
|
213 |
\\[helm-toggle-buffers-details]\t\tToggle details. |
|
214 |
\\[helm-buffers-toggle-show-hidden-buffers]\t\tShow hidden buffers. |
|
215 |
\\[helm-buffers-mark-similar-buffers]\t\tMark all buffers of the same type (color) as current buffer.") |
|
216 |
|
|
217 |
;;; Find files help (`helm-find-files') |
|
218 |
;; |
|
219 |
;; |
|
220 |
(defvar helm-ff-help-message |
|
221 |
"* Helm Find Files |
|
222 |
|
|
223 |
** Tips |
|
224 |
|
|
225 |
*** Navigation summary |
|
226 |
|
|
227 |
For a better experience you can enable auto completion by setting |
|
228 |
`helm-ff-auto-update-initial-value' to non-nil in your init file. It is not |
|
229 |
enabled by default to not confuse new users. |
|
230 |
|
|
231 |
**** Use `\\<helm-find-files-map>\\[helm-execute-persistent-action]' (persistent action) on a directory to go down one level |
|
232 |
|
|
233 |
On a symlinked directory a prefix argument expands to its true name. |
|
234 |
|
|
235 |
**** Use `\\<helm-find-files-map>\\[helm-find-files-up-one-level]' on a directory to go up one level |
|
236 |
|
|
237 |
**** Use `\\<helm-find-files-map>\\[helm-find-files-down-last-level]' to walk back the resulting tree of all the `\\<helm-map>\\[helm-execute-persistent-action]' you did |
|
238 |
|
|
239 |
The tree is reinitialized each time you browse a new tree with |
|
240 |
`\\<helm-map>\\[helm-execute-persistent-action]' or by entering some pattern in the prompt. |
|
241 |
|
|
242 |
**** `RET' behavior |
|
243 |
|
|
244 |
It behaves differently depending on `helm-selection' (current candidate in helm-buffer): |
|
245 |
|
|
246 |
- candidate basename is \".\" => Open it in dired. |
|
247 |
- candidate is a directory => Expand it. |
|
248 |
- candidate is a file => Open it. |
|
249 |
|
|
250 |
If you have marked candidates and you press RET on a directory, |
|
251 |
helm will navigate to this directory, if you want to exit with |
|
252 |
RET with default action with these marked candidates, press RET |
|
253 |
on a second time while you are on the root of this directory |
|
254 |
e.g. \"/home/you/dir/.\" or press RET on any file which is not a |
|
255 |
directory. You can also exit with default action at any moment |
|
256 |
with `f1'. |
|
257 |
|
|
258 |
Note that when copying, renaming, etc. from `helm-find-files' the |
|
259 |
destination file is selected with `helm-read-file-name'. |
|
260 |
|
|
261 |
To avoid confusion when using `read-file-name' or `read-directory-name', `RET' |
|
262 |
follows its standard Emacs behaviour, i.e. it exits the minibuffer as soon as |
|
263 |
you press `RET'. If you want the same behavior as in `helm-find-files', bind |
|
264 |
`helm-ff-RET' to the `helm-read-file-map': |
|
265 |
|
|
266 |
(define-key helm-read-file-map (kbd \"RET\") 'helm-ff-RET) |
|
267 |
|
|
268 |
*** Find file at point |
|
269 |
|
|
270 |
Helm uses `ffap' partially or completely to find file at point depending on the |
|
271 |
value of `helm-ff-guess-ffap-filenames': if non-nil, support is complete |
|
272 |
\(annoying), if nil, support is partial. |
|
273 |
|
|
274 |
**** Find file at line number |
|
275 |
|
|
276 |
When text at point is in the form of |
|
277 |
|
|
278 |
~/elisp/helm/helm.el:1234 |
|
279 |
|
|
280 |
Helm finds this file at the indicated line number, here 1234. |
|
281 |
|
|
282 |
**** Find URL at point |
|
283 |
|
|
284 |
When a URL is found at point, Helm expands to that URL only. |
|
285 |
Pressing `RET' opens that URL using `browse-url-browser-function'. |
|
286 |
|
|
287 |
**** Find e-mail address at point |
|
288 |
|
|
289 |
When an e-mail address is found at point, Helm expands to this e-mail address |
|
290 |
prefixed with \"mailto:\". Pressing `RET' opens a message buffer with that |
|
291 |
e-mail address. |
|
292 |
|
|
293 |
*** Quick pattern expansion |
|
294 |
|
|
295 |
**** Enter `~/' at end of pattern to quickly reach home directory |
|
296 |
|
|
297 |
**** Enter `/' at end of pattern to quickly reach the file system root |
|
298 |
|
|
299 |
**** Enter `./' at end of pattern to quickly reach `default-directory' |
|
300 |
|
|
301 |
\(As per its value at the beginning of the session.) |
|
302 |
|
|
303 |
If you already are in the `default-directory' this will move the cursor to the top. |
|
304 |
|
|
305 |
**** Enter `../' at end of pattern will reach upper directory, moving cursor to the top |
|
306 |
|
|
307 |
This is different from using `\\<helm-find-files-map>\\[helm-find-files-up-one-level]' in that it moves |
|
308 |
the cursor to the top instead of remaining on the previous subdir name. |
|
309 |
|
|
310 |
**** Enter `..name/' at end of pattern to start a recursive search |
|
311 |
|
|
312 |
It searches directories matching \"name\" under the current directory, see the |
|
313 |
\"Recursive completion on subdirectories\" section below for more details. |
|
314 |
|
|
315 |
**** Any environment variable (e.g. `$HOME') at end of pattern gets expanded |
|
316 |
|
|
317 |
**** Any valid filename yanked after pattern gets expanded |
|
318 |
|
|
319 |
**** Special case: URL at point |
|
320 |
|
|
321 |
The quick expansions do not take effect after end a URL, you must kill the |
|
322 |
pattern first (`\\[helm-delete-minibuffer-contents]'). |
|
323 |
|
|
324 |
*** Helm-find-files supports fuzzy matching |
|
325 |
|
|
326 |
It starts from the third character of the pattern. |
|
327 |
|
|
328 |
For instance \"fob\" or \"fbr\" will complete \"foobar\" but \"fb\" needs a |
|
329 |
third character in order to complete it. |
|
330 |
|
|
331 |
*** Use `\\[universal-argument] \\[helm-execute-persistent-action]' or `\\[helm-follow-action-forward]' to display an image |
|
332 |
|
|
333 |
*** `\\[helm-execute-persistent-action]' on a filename expands to that filename in the Helm buffer |
|
334 |
|
|
335 |
Second hit displays the buffer filename. |
|
336 |
Third hit kills the buffer filename. |
|
337 |
Note: `\\[universal-argument] \\[helm-execute-persistent-action]' displays the buffer directly. |
|
338 |
|
|
339 |
*** Browse images directories with `helm-follow-mode' and navigate up/down |
|
340 |
|
|
341 |
You can also use `helm-follow-action-forward' and `helm-follow-action-backward' with |
|
342 |
`\\[helm-follow-action-forward]' and `\\[helm-follow-action-backward]' respectively. |
|
343 |
|
|
344 |
*** Toggle auto-completion with `\\[helm-ff-run-toggle-auto-update]' |
|
345 |
|
|
346 |
It is useful when trying to create a new file or directory and you don't want |
|
347 |
Helm to complete what you are writing. |
|
348 |
|
|
349 |
Note: On a terminal, the default binding `C-<backspace>' may not work. |
|
350 |
In this case use `C-c <backspace>'. |
|
351 |
|
|
352 |
*** You can create a new directory and a new file at the same time |
|
353 |
|
|
354 |
Simply write the path in the prompt and press `RET', e.g. |
|
355 |
\"~/new/newnew/newnewnew/my_newfile.txt\". |
|
356 |
|
|
357 |
*** To create a new directory, append a \"/\" to the new name and press `RET' |
|
358 |
|
|
359 |
*** To create a new file, enter a filename not ending with \"/\" |
|
360 |
|
|
361 |
Note that when you enter a new name, this one is prefixed with |
|
362 |
\[?] if you are in a writable directory. If you are in a directory |
|
363 |
where you have no write permission the new file name is not |
|
364 |
prefixed and is colored in red. There is not such distinction |
|
365 |
when using tramp, new filename just appear on top of buffer. |
|
366 |
|
|
367 |
*** Recursive search from Helm-find-files |
|
368 |
|
|
369 |
**** You can use Helm-browse-project (see binding below) |
|
370 |
|
|
371 |
- With no prefix argument: |
|
372 |
If the current directory is under version control with either git or hg and |
|
373 |
helm-ls-git and/or helm-ls-hg are installed, it lists all the files under |
|
374 |
version control. Otherwise it falls back to Helm-find-files. See |
|
375 |
https://github.com/emacs-helm/helm-ls-git and |
|
376 |
https://github.com/emacs-helm/helm-ls-hg. |
|
377 |
|
|
378 |
- With one prefix argument: |
|
379 |
List all the files under this directory and other subdirectories |
|
380 |
\(recursion) and this list of files will be cached. |
|
381 |
|
|
382 |
- With two prefix arguments: |
|
383 |
Same but the cache is refreshed. |
|
384 |
|
|
385 |
**** You can start a recursive search with \"locate\" or \"find\" |
|
386 |
|
|
387 |
See \"Note\" in the [[Recusive completion on subdirectories][section on subdirectories]]. |
|
388 |
|
|
389 |
Using \"locate\", you can enable the local database with a prefix argument. If the |
|
390 |
local database doesn't already exists, you will be prompted for its creation. |
|
391 |
If it exists and you want to refresh it, give it two prefix args. |
|
392 |
|
|
393 |
When using locate the helm-buffer remains empty until you type something. |
|
394 |
Regardless Helm uses the basename of the pattern entered in the helm-find-files |
|
395 |
session by default. Hitting `\\[next-history-element]' should just kick in the |
|
396 |
locate search with this pattern. If you want Helm to automatically do this, add |
|
397 |
`helm-source-locate' to `helm-sources-using-default-as-input'. |
|
398 |
|
|
399 |
**** Recursive completion on subdirectories |
|
400 |
|
|
401 |
Starting from the directory you are currently browsing, it is possible to have |
|
402 |
completion of all directories underneath. Say you are at \"/home/you/foo/\" and |
|
403 |
you want to go to \"/home/you/foo/bar/baz/somewhere/else\", simply type |
|
404 |
\"/home/you/foo/..else\" and hit `\\[helm-execute-persistent-action]' or enter |
|
405 |
the final \"/\". Helm will then list all possible directories under \"foo\" |
|
406 |
matching \"else\". |
|
407 |
|
|
408 |
Entering two spaces before \"else\" instead of two dots also works. |
|
409 |
|
|
410 |
Note: Completion on subdirectories uses \"locate\" as backend, you can configure |
|
411 |
the command with `helm-locate-recursive-dirs-command'. Because this completion |
|
412 |
uses an index, the directory tree displayed may be out-of-date and not reflect |
|
413 |
the latest change until you update the index (using \"updatedb\" for \"locate\"). |
|
414 |
|
|
415 |
If for some reason you cannot use an index, the \"find\" command from |
|
416 |
\"findutils\" can be used instead. It will be slower though. You need to pass |
|
417 |
the basedir as first argument of \"find\" and the subdir as the value for |
|
418 |
'-(i)regex' or '-(i)name' with the two format specs that are mandatory in |
|
419 |
`helm-locate-recursive-dirs-command'. |
|
420 |
|
|
421 |
Examples: |
|
422 |
- \"find %s -type d -name '*%s*'\" |
|
423 |
- \"find %s -type d -regex .*%s.*$\" |
|
424 |
|
|
425 |
*** Insert filename at point or complete filename at point |
|
426 |
|
|
427 |
On insertion (not on completion, i.e. there is nothing at point): |
|
428 |
|
|
429 |
- `\\[helm-ff-run-complete-fn-at-point]': insert absolute file name. |
|
430 |
- `\\[universal-argument] \\[helm-ff-run-complete-fn-at-point]': insert abbreviated file name. |
|
431 |
- `\\[universal-argument] \\[universal-argument] \\[helm-ff-run-complete-fn-at-point]': insert relative file name. |
|
432 |
|
|
433 |
On completion: |
|
434 |
|
|
435 |
- Target starts with \"~/\": insert abbreviate file name. |
|
436 |
- target starts with \"/\" or \"[a-z]:/\": insert full path. |
|
437 |
- Otherwise: insert relative file name. |
|
438 |
|
|
439 |
*** Use the wildcard to select multiple files |
|
440 |
|
|
441 |
Use of wilcard is supported to run an action over a set of files. |
|
442 |
|
|
443 |
Example: You can copy all the files with \".el\" extension by using \"*.el\" and |
|
444 |
then run copy action. |
|
445 |
|
|
446 |
Similarly, \"**.el\" (note the two stars) will recursively select all \".el\" |
|
447 |
files under the current directory. |
|
448 |
|
|
449 |
Note that when recursively copying files, you may have files with same name |
|
450 |
dispatched across different subdirectories, so when copying them in the same |
|
451 |
directory they will get overwritten. To avoid this Helm has a special action |
|
452 |
called \"backup files\" that has the same behavior as the command line \"cp -f |
|
453 |
--backup=numbered\": it allows you to copy many files with the same name from |
|
454 |
different subdirectories into one directory. Files with same name are renamed |
|
455 |
as follows: \"foo.txt.~1~\". Like with the --force option of cp, it is possible |
|
456 |
to backup files in current directory. |
|
457 |
|
|
458 |
This command is available only when `dired-async-mode' is active. |
|
459 |
|
|
460 |
When using an action that involves an external backend (e.g. grep), using \"**\" |
|
461 |
is not recommended (even thought it works fine) because it will be slower to |
|
462 |
select all the files. You are better off leaving the backend to do it, it will |
|
463 |
be faster. However, if you know you have not many files it is reasonable to use |
|
464 |
this, also using not recursive wilcard (e.g. \"*.el\") is perfectly fine for |
|
465 |
this. |
|
466 |
|
|
467 |
The \"**\" feature is active by default in the option `helm-file-globstar'. It |
|
468 |
is different from the Bash \"shopt globstar\" feature in that to list files with |
|
469 |
a named extension recursively you would write \"**.el\" whereas in Bash it would |
|
470 |
be \"**/*.el\". Directory selection with \"**/\" like Bash \"shopt globstar\" |
|
471 |
option is not supported yet. |
|
472 |
|
|
473 |
*** Query replace regexp on filenames |
|
474 |
|
|
475 |
Replace different parts of a file basename with something else. |
|
476 |
|
|
477 |
When calling this action you will be prompted twice as with |
|
478 |
`query-replace', first for the matching expression of the text to |
|
479 |
replace and second for the replacement text. Several facilities, |
|
480 |
however, are provided to make the two prompts more powerfull. |
|
481 |
|
|
482 |
**** Syntax of the first prompt |
|
483 |
|
|
484 |
In addition to simple regexps, these shortcuts are available: |
|
485 |
|
|
486 |
- Basename without extension => \"%.\" |
|
487 |
- Only extension => \".%\" |
|
488 |
- Substring => \"%:<from>:<to>\" |
|
489 |
- Whole basename => \"%\" |
|
490 |
|
|
491 |
**** Syntax of the second prompt |
|
492 |
|
|
493 |
In addition to a simple string to use as replacement, here is what you can use: |
|
494 |
|
|
495 |
- A placeholder refering to what you have selected in the first prompt: \"\\@\". |
|
496 |
|
|
497 |
After this placeholder you can use a search-and-replace syntax à-la sed: |
|
498 |
|
|
499 |
\"\\@/<regexp>/<replacement>/ |
|
500 |
|
|
501 |
You can select a substring from the string represented by the placeholder: |
|
502 |
|
|
503 |
\"\\@:<from>:<to>\" |
|
504 |
|
|
505 |
- A special character representing a number which is incremented: \"\\#\". |
|
506 |
|
|
507 |
- Shortcuts for `upcase', `downcase' and `capitalize' |
|
508 |
are available as`%u', `%d' and `%c' respectively. |
|
509 |
|
|
510 |
**** Examples |
|
511 |
|
|
512 |
***** Recursively rename all files with \".JPG\" extension to \".jpg\" |
|
513 |
|
|
514 |
Use the `helm-file-globstar' feature described in [[Using wildcard to select multiple files][recursive globbing]] |
|
515 |
by entering \"**.JPG\" at the end of the Helm-find-files pattern, then hit |
|
516 |
\\<helm-map>\\[helm-ff-query-replace-on-filenames]: First \"JPG\", then \"jpg\" |
|
517 |
and hit `RET'. |
|
518 |
|
|
519 |
Alternatively you can enter \".%\" at the first prompt, then \"jpg\" and hit |
|
520 |
`RET'. Note that when using this instead of using \"JPG\" at the first prompt, |
|
521 |
all extensions will be renamed to \"jpg\" even if the extension of one of the |
|
522 |
files is, say, \"png\". If you want to keep the original extension you can use |
|
523 |
\"%d\" at the second prompt (downcase). |
|
524 |
|
|
525 |
***** Batch-rename files from number 001 to 00x |
|
526 |
|
|
527 |
Use \"\\#\" inside the second prompt. |
|
528 |
|
|
529 |
Example 1: To rename the files |
|
530 |
|
|
531 |
foo.jpg |
|
532 |
bar.jpg |
|
533 |
baz.jpg |
|
534 |
|
|
535 |
to |
|
536 |
|
|
537 |
foo-001.jpg |
|
538 |
foo-002.jpg |
|
539 |
foo-003.jpg |
|
540 |
|
|
541 |
use \"%.\" as matching regexp and \"foo-\\#\" as replacement string. |
|
542 |
|
|
543 |
Example 2: To rename the files |
|
544 |
|
|
545 |
foo.jpg |
|
546 |
bar.jpg |
|
547 |
baz.jpg |
|
548 |
|
|
549 |
to |
|
550 |
|
|
551 |
foo-001.jpg |
|
552 |
bar-002.jpg |
|
553 |
baz-003.jpg |
|
554 |
|
|
555 |
use as matching regexp \"%.\" and as replacement string \"\\@-\\#\". |
|
556 |
|
|
557 |
***** Replace a substring |
|
558 |
|
|
559 |
Use \"%:<from>:<to>\". |
|
560 |
|
|
561 |
Example: To rename files |
|
562 |
|
|
563 |
foo.jpg |
|
564 |
bar.jpg |
|
565 |
baz.jpg |
|
566 |
|
|
567 |
to |
|
568 |
|
|
569 |
fOo.jpg |
|
570 |
bAr.jpg |
|
571 |
bAz.jpg |
|
572 |
|
|
573 |
use as matching regexp \"%:1:2\" and as replacement string \"%u\" (upcase). |
|
574 |
|
|
575 |
Note that you \*cannot* use \"%.\" and \".%\" along with substring replacement. |
|
576 |
|
|
577 |
***** Modify the string from the placeholder (\\@) |
|
578 |
|
|
579 |
- By substring, i.e. only using the substring of the placeholder: \"\\@:<from>:<to>\". |
|
580 |
The length of placeholder is used for <to> when unspecified. |
|
581 |
|
|
582 |
Example 1: \"\\@:0:2\" replaces from the beginning to the second char of the placeholder. |
|
583 |
|
|
584 |
Example 2: \\@:2: replaces from the second char of the placeholder to the end. |
|
585 |
|
|
586 |
- By search-and-replace: \"\\@/<regexp>/<replacement>/\". |
|
587 |
|
|
588 |
Incremental replacement is also handled in <replacement>. |
|
589 |
|
|
590 |
Example 3: \"\\@/foo/bar/\" replaces \"foo\" by \"bar\" in the placeholder. |
|
591 |
|
|
592 |
Example 4: \"\\@/foo/-\\#/\" replaces \"foo\" in the placeholder by 001, 002, etc. |
|
593 |
|
|
594 |
***** Clash in replacements (avoid overwriting files) |
|
595 |
|
|
596 |
When performing any of these replacement operations you may end up with same |
|
597 |
names as replacement. In such cases Helm numbers the file that would otherwise |
|
598 |
overwritten. For instance, should you remove the \"-m<n>\" part from the files |
|
599 |
\"emacs-m1.txt\", \"emacs-m2.txt\" and \"emacs-m3.txt\" you would end up with |
|
600 |
three files named \"emacs.txt\", the second renaming overwriting first file, and |
|
601 |
the third renaming overwriting second file and so on. Instead Helm will |
|
602 |
automatically rename the second and third files as \"emacs(1).txt\" and |
|
603 |
\"emacs(2).txt\" respectively. |
|
604 |
|
|
605 |
***** Query-replace on filenames vs. serial-rename action |
|
606 |
|
|
607 |
Unlike the [[Serial renaming][serial rename]] actions, the files renamed with |
|
608 |
the query-replace action stay in their initial directory and are not moved to |
|
609 |
the current directory. As such, using \"\\#\" to serial-rename files only makes |
|
610 |
sense for files inside the same directory. It even keeps renaming files |
|
611 |
with an incremental number in the next directories. |
|
612 |
|
|
613 |
*** Serial-rename |
|
614 |
|
|
615 |
You can use the serial-rename actions to rename, copy or symlink marked files to |
|
616 |
a specific directory or in the current directory with all the files numbered |
|
617 |
incrementally. |
|
618 |
|
|
619 |
- Serial-rename by renaming: |
|
620 |
Rename all marked files with incremental numbering to a specific directory. |
|
621 |
|
|
622 |
- Serial-rename by copying: |
|
623 |
Copy all marked files with incremental numbering to a specific directory. |
|
624 |
|
|
625 |
- Serial-rename by symlinking: |
|
626 |
Symlink all marked files with incremental numbering to a specific directory. |
|
627 |
|
|
628 |
*** Edit marked files in a dired buffer |
|
629 |
|
|
630 |
You can open a dired buffer containing only marked files with `\\<helm-find-files-map>\\[helm-ff-run-marked-files-in-dired]'. |
|
631 |
With a prefix argument you can open this same dired buffer in wdired mode for |
|
632 |
editing. Note that wildcards are supported as well, so you can use e.g. |
|
633 |
\"*.txt\" to select all \".txt\" files in the current directory or \"**.txt\" to |
|
634 |
select all files recursively from the current directory. |
|
635 |
See [[Use the wildcard to select multiple files]] section above. |
|
636 |
|
|
637 |
*** Defining default target directory for copying, renaming, etc |
|
638 |
|
|
639 |
You can customize `helm-dwim-target' to behave differently depending on the |
|
640 |
windows open in the current frame. Default is to provide completion on all |
|
641 |
directories associated to each window. |
|
642 |
|
|
643 |
*** Copying and renaming asynchronously |
|
644 |
|
|
645 |
If you have the async library installed (if you got Helm from MELPA you do), you |
|
646 |
can use it for copying/renaming files by enabling `dired-async-mode'. |
|
647 |
|
|
648 |
Note that even when async is enabled, running a copy/rename action with a prefix |
|
649 |
argument will execute action synchronously. Moreover it will follow the first |
|
650 |
file of the marked files in its destination directory. |
|
651 |
|
|
652 |
When `dired-async-mode' is enabled, an additional action named \"Backup files\" |
|
653 |
will be available. (Such command is not natively available in Emacs). |
|
654 |
See [[Use the wildcard to select multiple files]] for details. |
|
655 |
|
|
656 |
*** Bookmark the `helm-find-files' session |
|
657 |
|
|
658 |
You can bookmark the `helm-find-files' session with `\\[helm-ff-bookmark-set]'. |
|
659 |
You can later retrieve these bookmarks by calling `helm-filtered-bookmarks' |
|
660 |
or, from the current `helm-find-files' session, by hitting `\\[helm-find-files-toggle-to-bookmark]'. |
|
661 |
|
|
662 |
*** Grep files from `helm-find-files' |
|
663 |
|
|
664 |
You can grep individual files from `helm-find-files' by using |
|
665 |
\`\\<helm-find-files-map>\\[helm-ff-run-grep]'. This same command can also |
|
666 |
recursively grep files from the current directory when called with a prefix |
|
667 |
argument. In this case you will be prompted for the file extensions to use |
|
668 |
\(grep backend) or the types of files to use (ack-grep backend). See the |
|
669 |
`helm-grep-default-command' documentation to set this up. For compressed files |
|
670 |
or archives, use zgrep with \`\\<helm-find-files-map>\\[helm-ff-run-zgrep]'. |
|
671 |
|
|
672 |
Otherwise you can use recursive commands like \`\\<helm-find-files-map>\\[helm-ff-run-grep-ag]' or `\\<helm-find-files-map>\\[helm-ff-run-git-grep]' |
|
673 |
that are much faster than using `\\<helm-find-files-map>\\[helm-ff-run-grep]' with a prefix argument. |
|
674 |
See `helm-grep-ag-command' and `helm-grep-git-grep-command' to set this up. |
|
675 |
|
|
676 |
You can also use \"id-utils\"' GID with \`\\<helm-find-files-map>\\[helm-ff-run-gid]' |
|
677 |
by creating an ID index file with the \"mkid\" shell command. |
|
678 |
|
|
679 |
All those grep commands use the symbol at point as the default pattern. |
|
680 |
Note that default is different from input (nothing is added to the prompt until |
|
681 |
you hit `\\[next-history-element]'). |
|
682 |
|
|
683 |
**** Grepping on remote files |
|
684 |
|
|
685 |
On remote files grep is not well supported by TRAMP unless you suspend updates before |
|
686 |
entering the pattern and re-enable it once your pattern is ready. |
|
687 |
To toggle suspend-update, use `\\<helm-map>\\[helm-toggle-suspend-update]'. |
|
688 |
|
|
689 |
*** Setting up aliases in Eshell allows you to set up powerful customized commands |
|
690 |
|
|
691 |
Adding Eshell aliases to your `eshell-aliases-file' or using the |
|
692 |
`alias' command from Eshell allows you to create personalized |
|
693 |
commands not available in `helm-find-files' actions and use them |
|
694 |
from `\\<helm-find-files-map>\\[helm-ff-run-eshell-command-on-file]'. |
|
695 |
|
|
696 |
Example: You want a command to uncompress some \"*.tar.gz\" files from `helm-find-files': |
|
697 |
|
|
698 |
1) Create an Eshell alias named, say, \"untargz\" with the command |
|
699 |
\"alias untargz tar zxvf $*\". |
|
700 |
|
|
701 |
2) Now from `helm-find-files' select the \"*.tar.gz\" file (you can also |
|
702 |
mark files if needed) and hit `\\<helm-find-files-map>\\[helm-ff-run-eshell-command-on-file]'. |
|
703 |
|
|
704 |
Note: When using marked files with this, the meaning of the prefix argument is |
|
705 |
quite subtle. Say you have \"foo\", \"bar\" and \"baz\" marked; when you run |
|
706 |
the alias command `example' on these files with no prefix argument it will run |
|
707 |
`example' sequentially on each file: |
|
708 |
|
|
709 |
$ example foo |
|
710 |
$ example bar |
|
711 |
$ example baz |
|
712 |
|
|
713 |
With a prefix argument however it will apply `example' on all files at once: |
|
714 |
|
|
715 |
$ example foo bar baz |
|
716 |
|
|
717 |
Of course the alias command should support this. |
|
718 |
|
|
719 |
*** Using TRAMP with `helm-find-files' to read remote directories |
|
720 |
|
|
721 |
`helm-find-files' works fine with TRAMP despite some limitations. |
|
722 |
|
|
723 |
- Grepping files is not very well supported when used incrementally. |
|
724 |
See [[Grepping on remote files]]. |
|
725 |
|
|
726 |
- Locate does not work on remote directories. |
|
727 |
|
|
728 |
**** A TRAMP syntax crash course |
|
729 |
|
|
730 |
Please refer to TRAMP's documentation for more details. |
|
731 |
|
|
732 |
- Connect to host 192.168.0.4 as user \"foo\": |
|
733 |
|
|
734 |
/scp:192.168.0.4@foo: |
|
735 |
|
|
736 |
- Connect to host 192.168.0.4 as user \"foo\" on port 2222: |
|
737 |
|
|
738 |
/scp:192.168.0.4@foo#2222: |
|
739 |
|
|
740 |
- Connect to host 192.168.0.4 as root using multihops syntax: |
|
741 |
|
|
742 |
/ssh:192.168.0.4@foo|sudo:192.168.0.4: |
|
743 |
|
|
744 |
Note: You can also use `tramp-default-proxies-alist' when connecting often to |
|
745 |
the same hosts. |
|
746 |
|
|
747 |
As a rule of thumb, prefer the scp method unless using multihops (which only |
|
748 |
works with the ssh method), especially when copying large files. |
|
749 |
|
|
750 |
You need to hit `C-j' once on top of a directory on the first connection |
|
751 |
to complete the pattern in the minibuffer. |
|
752 |
|
|
753 |
**** Display color for directories, symlinks etc... with tramp |
|
754 |
|
|
755 |
Starting at helm version 2.9.7 it is somewhat possible to |
|
756 |
colorize fnames by listing files without loosing performances with |
|
757 |
external commands (ls and awk) if your system is compatible. |
|
758 |
For this you can use `helm-list-dir-external' as value |
|
759 |
for `helm-list-directory-function'. |
|
760 |
|
|
761 |
See `helm-list-directory-function' documentation for more infos. |
|
762 |
|
|
763 |
**** Completing host |
|
764 |
|
|
765 |
As soon as you enter the first \":\" after method e.g =/scp:= you will |
|
766 |
have some completion about previously used hosts or from your =~/.ssh/config= |
|
767 |
file, hitting `\\[helm-execute-persistent-action]' or `right' on a candidate will insert this host in minibuffer |
|
768 |
without addind the ending \":\", second hit insert the last \":\". |
|
769 |
As soon the last \":\" is entered TRAMP will kick in and you should see the list |
|
770 |
of candidates soon after. |
|
771 |
|
|
772 |
When connection fails, be sure to delete your TRAMP connection with M-x |
|
773 |
`helm-delete-tramp-connection' before retrying. |
|
774 |
|
|
775 |
**** Editing local files as root |
|
776 |
|
|
777 |
Use the sudo method: |
|
778 |
|
|
779 |
\"/sudo:host:\" or simply \"/sudo::\". |
|
780 |
|
|
781 |
*** Attach files to a mail buffer (message-mode) |
|
782 |
|
|
783 |
If you are in a `message-mode' or `mail-mode' buffer, that action will appear |
|
784 |
in action menu, otherwise it is available at any time with \\<helm-find-files-map>\\[helm-ff-run-mail-attach-files]. |
|
785 |
It behaves as follows: |
|
786 |
|
|
787 |
- If you are in a (mail or message) buffer, files are attached there. |
|
788 |
|
|
789 |
- If you are not in a mail buffer but one or more mail buffers exist, you are |
|
790 |
prompted to attach files to one of these mail buffers. |
|
791 |
|
|
792 |
- If you are not in a mail buffer and no mail buffer exists, |
|
793 |
a new mail buffer is created with the attached files in it. |
|
794 |
|
|
795 |
*** Open files in separate windows |
|
796 |
|
|
797 |
When [[Marked candidates][marking]] multiple files or using [[Use the wildcard to select multiple files][wildcard]], helm allow opening all |
|
798 |
this files in separate windows using an horizontal layout or a |
|
799 |
vertical layout if you used a prefix arg, when no more windows can be |
|
800 |
displayed in frame, next files are opened in background without being |
|
801 |
displayed. When using \\<helm-find-files-map>\\[helm-ff-run-switch-other-window] the current |
|
802 |
buffer is kept and files are displayed next to it with same behavior as above. |
|
803 |
When using two prefix args, files are opened in background without beeing displayed. |
|
804 |
|
|
805 |
*** Expand archives as directories in a avfs directory |
|
806 |
|
|
807 |
If you have mounted your filesystem with mountavfs, |
|
808 |
you can expand archives in the \"~/.avfs\" directory with \\<helm-map>\\[helm-execute-persistent-action]. |
|
809 |
|
|
810 |
*** Tramp archive support (emacs-27+ only) |
|
811 |
|
|
812 |
If your emacs have library tramp-archive.el, you can browse the |
|
813 |
content of archives with emacs and BTW helm-find-files. However this beeing |
|
814 |
experimental and not very fast, helm doesn't provide an automatic |
|
815 |
expansion and detection of archives, you will have to add the final / |
|
816 |
manually and may have to force update (\\<helm-map>\\[helm-refresh]) |
|
817 |
or remove and add again the final / until tramp finish decompressing archive. |
|
818 |
|
|
819 |
*** Touch files |
|
820 |
|
|
821 |
In the completion buffer, you can choose the default which is the current-time, it is |
|
822 |
the first candidate or the timestamp of one of the selected files. |
|
823 |
If you need to use something else, use \\<helm-map>\\[next-history-element] and edit |
|
824 |
the date in minibuffer. |
|
825 |
It is also a way to quickly create a new file without opening a buffer, saving it |
|
826 |
and killing it. |
|
827 |
To touch more than one new file, separate you filenames with a comma (\",\"). |
|
828 |
If one wants to create (touch) a new file with comma inside the name use a prefix arg, |
|
829 |
this will prevent splitting the name and create multiple files. |
|
830 |
|
|
831 |
*** Delete files |
|
832 |
|
|
833 |
You can delete files without quitting helm with |
|
834 |
`\\<helm-find-files-map>\\[helm-ff-persistent-delete]' or delete files and quit helm with `\\[helm-ff-run-delete-file]'. |
|
835 |
|
|
836 |
In the second method you can choose to |
|
837 |
make this command asynchronous by customizing |
|
838 |
\`helm-ff-delete-files-function'. |
|
839 |
|
|
840 |
_WARNING_: When deleting files asynchronously you will NOT be |
|
841 |
WARNED if directories are not empty, that's mean non empty directories will |
|
842 |
be deleted in background without asking. |
|
843 |
|
|
844 |
A good compromise is to trash your files |
|
845 |
when using asynchronous method (see [[Trashing files][Trashing files]]). |
|
846 |
|
|
847 |
When choosing synchronous delete, you can allow recursive |
|
848 |
deletion of directories with `helm-ff-allow-recursive-deletes'. |
|
849 |
Note that when trashing (synchronous) you are not asked for recursive deletion. |
|
850 |
|
|
851 |
Note that `helm-ff-allow-recursive-deletes' have no effect when |
|
852 |
deleting asynchronously. |
|
853 |
|
|
854 |
First method (persistent delete) is always synchronous. |
|
855 |
|
|
856 |
Note that when a prefix arg is given, trashing behavior is inversed. |
|
857 |
See [[Trashing files][Trashing files]]. |
|
858 |
|
|
859 |
**** Trashing files |
|
860 |
|
|
861 |
If you want to trash your files instead of deleting them you can |
|
862 |
set `delete-by-moving-to-trash' to non nil, like this your files |
|
863 |
will be moved to trash instead of beeing deleted. |
|
864 |
|
|
865 |
You can reverse at any time the behavior of `delete-by-moving-to-trash' by using |
|
866 |
a prefix arg with any of the delete files command. |
|
867 |
|
|
868 |
On GNULinux distribution, when navigating to a Trash directory you |
|
869 |
can restore any file in ..Trash/files directory with the 'Restore |
|
870 |
from trash' action you will find in action menu (needs the |
|
871 |
trash-cli package installed). |
|
872 |
You can as well delete files from Trash directories with the 'delete files from trash' |
|
873 |
action. |
|
874 |
|
|
875 |
Tip: Navigate to your Trash/files directories with `helm-find-files' and set a bookmark |
|
876 |
there with \\<helm-find-files-map>\\[helm-ff-bookmark-set] for fast access to Trash. |
|
877 |
|
|
878 |
_WARNING:_ |
|
879 |
|
|
880 |
If you have an ENV var XDG_DATA_HOME in your .profile or .bash_profile |
|
881 |
and this var is set to something like $HOME/.local/share (like preconized) |
|
882 |
`move-file-to-trash' may try to create $HOME/.local/share/Trash (literally) |
|
883 |
and its subdirs in the directory where you are actually trying to trash files. |
|
884 |
because `move-file-to-trash' is interpreting XDG_DATA_HOME literally instead |
|
885 |
of evaling its value (with `substitute-in-file-name'). |
|
886 |
|
|
887 |
***** Trashing remote files with tramp |
|
888 |
|
|
889 |
Trashing remote files (or local files with sudo method) is disabled by default |
|
890 |
because tramp is requiring the 'trash' command to be installed, if you want to |
|
891 |
trash your remote files, customize `helm-trash-remote-files'. |
|
892 |
The package on most GNU/Linux based distributions is trash-cli, it is available [[https://github.com/andreafrancia/trash-cli][here]]. |
|
893 |
|
|
894 |
NOTE: |
|
895 |
When deleting your files with sudo method, your trashed files will not be listed |
|
896 |
with trash-list until you log in as root. |
|
897 |
|
|
898 |
** Commands |
|
899 |
\\<helm-find-files-map> |
|
900 |
\\[helm-ff-run-locate]\t\tRun `locate' (`\\[universal-argument]' to specify locate database, `M-n' to insert basename of candidate). |
|
901 |
\\[helm-ff-run-browse-project]\t\tBrowse project (`\\[universal-argument]' to recurse, `\\[universal-argument] \\[universal-argument]' to recurse and refresh database). |
|
902 |
\\[helm-ff-run-find-sh-command]\t\tRun `find' shell command from this directory. |
|
903 |
\\[helm-ff-run-grep]\t\tRun Grep (`\\[universal-argument]' to recurse). |
|
904 |
\\[helm-ff-run-pdfgrep]\t\tRun Pdfgrep on marked files. |
|
905 |
\\[helm-ff-run-zgrep]\t\tRun zgrep (`\\[universal-argument]' to recurse). |
|
906 |
\\[helm-ff-run-grep-ag]\t\tRun AG grep on current directory. |
|
907 |
\\[helm-ff-run-git-grep]\t\tRun git-grep on current directory. |
|
908 |
\\[helm-ff-run-gid]\t\tRun gid (id-utils). |
|
909 |
\\[helm-ff-run-etags]\t\tRun Etags (`\\[universal-argument]' to use thing-at-point, `\\[universal-argument] \\[universal-argument]' to reload cache). |
|
910 |
\\[helm-ff-run-rename-file]\t\tRename Files (`\\[universal-argument]' to follow). |
|
911 |
\\[helm-ff-run-query-replace-fnames-on-marked]\t\tQuery replace on marked files. |
|
912 |
\\[helm-ff-run-copy-file]\t\tCopy Files (`\\[universal-argument]' to follow). |
|
913 |
\\[helm-ff-run-byte-compile-file]\t\tByte Compile Files (`\\[universal-argument]' to load). |
|
914 |
\\[helm-ff-run-load-file]\t\tLoad Files. |
|
915 |
\\[helm-ff-run-symlink-file]\t\tSymlink Files. |
|
916 |
\\[helm-ff-run-hardlink-file]\t\tHardlink files. |
|
917 |
\\[helm-ff-run-relsymlink-file]\t\tRelative symlink Files. |
|
918 |
\\[helm-ff-run-delete-file]\t\tDelete Files. |
|
919 |
\\[helm-ff-run-touch-files]\t\tTouch files. |
|
920 |
\\[helm-ff-run-kill-buffer-persistent]\t\tKill buffer candidate without leaving Helm. |
|
921 |
\\[helm-ff-persistent-delete]\t\tDelete file without leaving Helm. |
|
922 |
\\[helm-ff-run-switch-to-eshell]\t\tSwitch to Eshell. |
|
923 |
\\[helm-ff-run-eshell-command-on-file]\t\tEshell command on file (`\\[universal-argument]' to apply on marked files, otherwise treat them sequentially). |
|
924 |
\\[helm-ff-run-ediff-file]\t\tEdiff file. |
|
925 |
\\[helm-ff-run-ediff-merge-file]\t\tEdiff merge file. |
|
926 |
\\[helm-ff-run-complete-fn-at-point]\t\tComplete file name at point. |
|
927 |
\\[helm-ff-run-switch-other-window]\t\tSwitch to other window. |
|
928 |
\\[helm-ff-run-switch-other-frame]\t\tSwitch to other frame. |
|
929 |
\\[helm-ff-run-open-file-externally]\t\tOpen file with external program (`\\[universal-argument]' to choose). |
|
930 |
\\[helm-ff-run-preview-file-externally]\t\tPreview file with external program. |
|
931 |
\\[helm-ff-run-open-file-with-default-tool]\t\tOpen file externally with default tool. |
|
932 |
\\[helm-ff-rotate-left-persistent]\t\tRotate image left. |
|
933 |
\\[helm-ff-rotate-right-persistent]\t\tRotate image right. |
|
934 |
\\[helm-find-files-up-one-level]\t\tGo to parent directory. |
|
935 |
\\[helm-find-files-history]\t\tSwitch to the visited-directory history. |
|
936 |
\\[helm-ff-file-name-history]\t\tSwitch to file name history. |
|
937 |
\\[helm-ff-properties-persistent]\t\tShow file properties in a tooltip. |
|
938 |
\\[helm-mark-all]\t\tMark all visible candidates. |
|
939 |
\\[helm-ff-run-toggle-auto-update]\t\tToggle auto-expansion of directories. |
|
940 |
\\[helm-unmark-all]\t\tUnmark all candidates, visible and invisible ones. |
|
941 |
\\[helm-ff-run-gnus-attach-files]\t\tGnus' attach files to message buffer. |
|
942 |
\\[helm-ff-run-print-file]\t\tPrint file, (`\\[universal-argument]' to refresh printer list). |
|
943 |
\\[helm-enlarge-window]\t\tEnlarge Helm window. |
|
944 |
\\[helm-narrow-window]\t\tNarrow Helm window. |
|
945 |
\\[helm-ff-run-toggle-basename]\t\tToggle basename/fullpath. |
|
946 |
\\[helm-ff-run-find-file-as-root]\t\tFind file as root. |
|
947 |
\\[helm-ff-run-find-alternate-file]\t\tFind alternate file. |
|
948 |
\\[helm-ff-run-insert-org-link]\t\tInsert org link. |
|
949 |
\\[helm-ff-bookmark-set]\t\tSet bookmark to current directory. |
|
950 |
\\[helm-find-files-toggle-to-bookmark]\t\tJump to bookmark list.") |
|
951 |
|
|
952 |
;;; Help for `helm-read-file-name' |
|
953 |
;; |
|
954 |
;; |
|
955 |
(defun helm-read-file-name-help-message () |
|
956 |
(let ((name (if helm-alive-p |
|
957 |
(assoc-default 'name (helm-get-current-source)) |
|
958 |
"generic"))) |
|
959 |
(format |
|
960 |
"* Helm `%s' read file name completion |
|
961 |
|
|
962 |
This is `%s' read file name completion that have been \"helmized\" |
|
963 |
because you have enabled [[Helm mode][helm-mode]]'. |
|
964 |
Don't confuse this with `helm-find-files' which is a native helm command, |
|
965 |
see [[Helm functions vs helmized emacs functions]]. |
|
966 |
|
|
967 |
** Tips |
|
968 |
|
|
969 |
*** Navigation |
|
970 |
|
|
971 |
**** Enter `~/' at end of pattern to quickly reach home directory |
|
972 |
|
|
973 |
**** Enter `/' at end of pattern to quickly reach the file system root |
|
974 |
|
|
975 |
**** Enter `./' at end of pattern to quickly reach `default-directory' |
|
976 |
|
|
977 |
\(As per its value at the beginning of the session.) |
|
978 |
|
|
979 |
If you already are in the `default-directory' this will move the cursor to the top. |
|
980 |
|
|
981 |
**** Enter `../' at end of pattern will reach upper directory, moving cursor on top |
|
982 |
|
|
983 |
This is different from using `\\[helm-find-files-up-one-level]' in that it moves |
|
984 |
the cursor to the top instead of remaining on the previous subdir name. |
|
985 |
|
|
986 |
**** You can complete with partial basename |
|
987 |
|
|
988 |
It starts from the third character of the pattern. |
|
989 |
|
|
990 |
For instance \"fob\" or \"fbr\" will complete \"foobar\" but \"fb\" needs a |
|
991 |
third character in order to complete it. |
|
992 |
|
|
993 |
*** Persistent actions |
|
994 |
|
|
995 |
By default `helm-read-file-name' uses the persistent actions of `helm-find-files'. |
|
996 |
|
|
997 |
**** Use `\\[universal-argument] \\<helm-map>\\[helm-execute-persistent-action]' to display an image |
|
998 |
|
|
999 |
**** `\\<helm-map>\\[helm-execute-persistent-action]' on a filename will expand to this filename in Helm-buffer |
|
1000 |
|
|
1001 |
Second hit displays the buffer filename. |
|
1002 |
Third hit kills the buffer filename. |
|
1003 |
Note: `\\[universal-argument] \\<helm-map>\\[helm-execute-persistent-action]' displays the buffer directly. |
|
1004 |
|
|
1005 |
**** Browse images directories with `helm-follow-mode' and navigate up/down |
|
1006 |
|
|
1007 |
*** Delete characters backward |
|
1008 |
|
|
1009 |
When you want to delete characters backward, e.g. to create a new file or directory, |
|
1010 |
auto-update may come in the way when it keeps updating to an existent directory. |
|
1011 |
In that case, type `C-<backspace>' and then `<backspace>'. |
|
1012 |
This should not be needed when copying/renaming files because autoupdate is disabled |
|
1013 |
by default in that case. |
|
1014 |
|
|
1015 |
Note: On a terminal, the default binding `C-<backspace>' may not work. |
|
1016 |
In this case use `C-c <backspace>'. |
|
1017 |
|
|
1018 |
*** Create new directories and files |
|
1019 |
|
|
1020 |
**** You can create a new directory and a new file at the same time |
|
1021 |
|
|
1022 |
Simply write the path in prompt and press `RET', e.g. |
|
1023 |
\"~/new/newnew/newnewnew/my_newfile.txt\". |
|
1024 |
|
|
1025 |
**** To create a new directory, append a \"/\" at to the new name and press `RET' |
|
1026 |
|
|
1027 |
**** To create a new file, enter a filename not ending with \"/\" |
|
1028 |
|
|
1029 |
File and directory creation works only with some commands (e.g. `find-file') |
|
1030 |
and it will not work with others where it is not intended to return a file or |
|
1031 |
a directory \(e.g `list-directory'). |
|
1032 |
|
|
1033 |
*** Exiting minibuffer with empty string |
|
1034 |
|
|
1035 |
You can exit minibuffer with empty string with \\<helm-read-file--map>\\[helm-cr-empty-string]. |
|
1036 |
It is useful when some commands are prompting continuously until you enter an empty prompt. |
|
1037 |
|
|
1038 |
** Commands |
|
1039 |
\\<helm-read-file-map> |
|
1040 |
\\[helm-find-files-up-one-level]\t\tGo to parent directory. |
|
1041 |
\\[helm-ff-run-toggle-auto-update]\t\tToggle auto-expansion of directories. |
|
1042 |
\\[helm-ff-run-toggle-basename]\t\tToggle basename. |
|
1043 |
\\[helm-ff-file-name-history]\t\tFile name history. |
|
1044 |
C/\\[helm-cr-empty-string]\t\tReturn empty string unless `must-match' is non-nil. |
|
1045 |
\\[helm-next-source]\t\tGo to next source. |
|
1046 |
\\[helm-previous-source]\t\tGo to previous source." |
|
1047 |
name name))) |
|
1048 |
|
|
1049 |
;;; Generic file help - Used by locate. |
|
1050 |
;; |
|
1051 |
;; |
|
1052 |
(defvar helm-generic-file-help-message |
|
1053 |
"* Helm Generic files |
|
1054 |
|
|
1055 |
** Tips |
|
1056 |
|
|
1057 |
*** Locate |
|
1058 |
|
|
1059 |
You can append to the search pattern any of the locate command line options, |
|
1060 |
e.g. -b, -e, -n <number>, etc. See the locate(1) man page for more details. |
|
1061 |
|
|
1062 |
Some other sources (at the moment \"recentf\" and \"file in current directory\") |
|
1063 |
support the -b flag for compatibility with locate when they are used with it. |
|
1064 |
|
|
1065 |
When you enable fuzzy matching on locate with `helm-locate-fuzzy-match', the |
|
1066 |
search will be performed on basename only for efficiency (so don't add \"-b\" at |
|
1067 |
prompt). As soon as you separate the patterns with spaces, fuzzy matching will |
|
1068 |
be disabled and search will be done on the full filename. Note that in |
|
1069 |
multi-match, fuzzy is completely disabled, which means that each pattern is a |
|
1070 |
match regexp (i.e. \"helm\" will match \"helm\" but \"hlm\" will \*not* match |
|
1071 |
\"helm\"). |
|
1072 |
|
|
1073 |
*** Browse project |
|
1074 |
|
|
1075 |
When the current directory is not under version control, don't forget to refresh |
|
1076 |
the cache when files have been added/removed in the directory. |
|
1077 |
|
|
1078 |
*** Find command |
|
1079 |
|
|
1080 |
Recursively search files using the \"find\" shell command. |
|
1081 |
|
|
1082 |
Candidates are all filenames that match all given globbing patterns. This |
|
1083 |
respects the options `helm-case-fold-search' and |
|
1084 |
`helm-findutils-search-full-path'. |
|
1085 |
|
|
1086 |
You can pass arbitrary \"find\" options directly after a \"*\" separator. |
|
1087 |
For example, this would find all files matching \"book\" that are larger |
|
1088 |
than 1 megabyte: |
|
1089 |
|
|
1090 |
book * -size +1M |
|
1091 |
|
|
1092 |
** Commands |
|
1093 |
\\<helm-generic-files-map> |
|
1094 |
\\[helm-ff-run-toggle-basename]\t\tToggle basename. |
|
1095 |
\\[helm-ff-run-grep]\t\tRun grep (`\\[universal-argument]' to recurse). |
|
1096 |
\\[helm-ff-run-zgrep]\t\tRun zgrep. |
|
1097 |
\\[helm-ff-run-gid]\t\tRun GID (id-utils). |
|
1098 |
\\[helm-ff-run-pdfgrep]\t\tRun PDFgrep on marked files. |
|
1099 |
\\[helm-ff-run-copy-file]\t\tCopy file(s) |
|
1100 |
\\[helm-ff-run-rename-file]\t\tRename file(s). |
|
1101 |
\\[helm-ff-run-symlink-file]\t\tSymlink file(s). |
|
1102 |
\\[helm-ff-run-hardlink-file]\t\tHardlink file(s). |
|
1103 |
\\[helm-ff-run-delete-file]\t\tDelete file(s). |
|
1104 |
\\[helm-ff-run-byte-compile-file]\t\tByte compile Elisp file(s) (`\\[universal-argument]' to load). |
|
1105 |
\\[helm-ff-run-load-file]\t\tLoad Elisp file(s). |
|
1106 |
\\[helm-ff-run-ediff-file]\t\tEdiff file. |
|
1107 |
\\[helm-ff-run-ediff-merge-file]\t\tEdiff-merge file. |
|
1108 |
\\[helm-ff-run-switch-other-window]\t\tSwitch to other window. |
|
1109 |
\\[helm-ff-properties-persistent]\t\tShow file properties. |
|
1110 |
\\[helm-ff-run-etags]\t\tRun etags (`\\[universal-argument]' to use tap, `\\[universal-argument] \\[universal-argument]' to reload the database). |
|
1111 |
\\[helm-yank-text-at-point]\t\tYank text at point. |
|
1112 |
\\[helm-ff-run-open-file-externally]\t\tOpen file with external program (`\\[universal-argument]' to choose). |
|
1113 |
\\[helm-ff-run-open-file-with-default-tool]\t\tOpen file externally with default tool. |
|
1114 |
\\[helm-ff-run-insert-org-link]\t\tInsert org link.") |
|
1115 |
|
|
1116 |
;;; Grep help |
|
1117 |
;; |
|
1118 |
;; |
|
1119 |
(defvar helm-grep-help-message |
|
1120 |
"* Helm Grep |
|
1121 |
|
|
1122 |
** Tips |
|
1123 |
|
|
1124 |
*** Use a prefix argument to grep recursively |
|
1125 |
|
|
1126 |
With Helm supporting git-grep and AG however, you are better off using one of |
|
1127 |
them for recursive searches. |
|
1128 |
|
|
1129 |
*** You can use wild cards when selecting files (e.g. \"*.el\") |
|
1130 |
|
|
1131 |
*** You can grep in many different directories by marking files or using wild cards |
|
1132 |
|
|
1133 |
*** You can save the result in a `helm-grep-mode' buffer |
|
1134 |
|
|
1135 |
See [[Commands][commands]] below. |
|
1136 |
|
|
1137 |
Once in that buffer you can use \"emacs-wgrep\" (external package not bundled with Helm) |
|
1138 |
to edit your changes. |
|
1139 |
|
|
1140 |
*** Helm-grep supports multi-matching |
|
1141 |
|
|
1142 |
\(Starting from version 1.9.4.) |
|
1143 |
|
|
1144 |
Simply add a space between each pattern as for most Helm commands. |
|
1145 |
|
|
1146 |
*** See full path of selected candidate |
|
1147 |
|
|
1148 |
Add (helm-popup-tip-mode 1) in your init file or enable it interactively with |
|
1149 |
M-x helm-popup-tip-mode. |
|
1150 |
|
|
1151 |
*** Open file in other window |
|
1152 |
|
|
1153 |
The command \\<helm-grep-map>\\[helm-grep-run-other-window-action] allow you to open file |
|
1154 |
in other window horizontally or vertically if a prefix arg is supplied. |
|
1155 |
|
|
1156 |
*** Performance over TRAMP |
|
1157 |
|
|
1158 |
Grepping works but it is badly supported as TRAMP doesn't support multiple |
|
1159 |
processes running in a short delay (less than 5s) among other things. |
|
1160 |
|
|
1161 |
Helm uses a special hook to suspend the process automatically while you are |
|
1162 |
typing. Even if Helm handles this automatically by delaying each process by 5s, |
|
1163 |
you are adviced to this manually by hitting `\\<helm-map>\\[helm-toggle-suspend-update]' (suspend process) before |
|
1164 |
typing, and hit again `\\<helm-map>\\[helm-toggle-suspend-update]' when the regexp is ready to send to the remote |
|
1165 |
process. For simple regexps, there should be no need for this. |
|
1166 |
|
|
1167 |
Another solution is to not use TRAMP at all and mount your remote file system via |
|
1168 |
SSHFS. |
|
1169 |
|
|
1170 |
* Helm GID |
|
1171 |
|
|
1172 |
** Tips |
|
1173 |
|
|
1174 |
Helm-GID reads the database created with the `mkid' command from id-utils. |
|
1175 |
The name of the database file can be customized with `helm-gid-db-file-name', it |
|
1176 |
is usually \"ID\". |
|
1177 |
|
|
1178 |
Helm-GID use the symbol at point as default-input. This command is also |
|
1179 |
accessible from `helm-find-files' which allow you to navigate to another |
|
1180 |
directory to consult its database. |
|
1181 |
|
|
1182 |
Note: Helm-GID supports multi-matches but only the last pattern entered will be |
|
1183 |
highlighted since there is no ~--color~-like option in GID itself. |
|
1184 |
|
|
1185 |
* Helm AG |
|
1186 |
|
|
1187 |
** Tips |
|
1188 |
|
|
1189 |
Helm-AG is different from grep or ack-grep in that it works on a directory and |
|
1190 |
not on a list of files. |
|
1191 |
|
|
1192 |
You can ignore files and directories with a \".agignore\" file, local to a |
|
1193 |
directory or global when placed in the home directory. \(See the AG man page for |
|
1194 |
more details.) That file follows the same syntax as `helm-grep-ignored-files' |
|
1195 |
and `helm-grep-ignored-directories'. |
|
1196 |
|
|
1197 |
As always you can access Helm AG from `helm-find-files'. |
|
1198 |
|
|
1199 |
Starting with version 0.30, AG accepts one or more TYPE arguments on its command |
|
1200 |
line. Helm provides completion on these TYPE arguments when available with your |
|
1201 |
AG version. Use a prefix argument when starting a Helm-AG session to enable this |
|
1202 |
completion. |
|
1203 |
|
|
1204 |
Note: You can mark several types to match in the AG query. The first AG |
|
1205 |
versions providing this feature allowed only one type, so in this case only the |
|
1206 |
last mark will be used. |
|
1207 |
|
|
1208 |
* Helm git-grep |
|
1209 |
|
|
1210 |
Helm-git-grep searches the current directory, i.e the default directory or the |
|
1211 |
directory in Helm-find-files. If this current directory is a subdirectory of a |
|
1212 |
project and you want to also match parent directories (i.e the whole project), |
|
1213 |
use a prefix argument. |
|
1214 |
|
|
1215 |
** Commands |
|
1216 |
\\<helm-grep-map> |
|
1217 |
\\[helm-goto-next-file]\t\tNext File. |
|
1218 |
\\[helm-goto-precedent-file]\t\tPrevious File. |
|
1219 |
\\[helm-yank-text-at-point]\t\tYank text at point in minibuffer. |
|
1220 |
\\[helm-grep-run-other-window-action]\t\tJump to other window. |
|
1221 |
\\[helm-grep-run-other-frame-action]\t\tJump to other frame. |
|
1222 |
\\[helm-grep-run-default-action]\t\tRun default action (same as `RET'). |
|
1223 |
\\[helm-grep-run-save-buffer]\t\tSave to a `helm-grep-mode' enabled buffer.") |
|
1224 |
|
|
1225 |
;;; PDF grep help |
|
1226 |
;; |
|
1227 |
;; |
|
1228 |
(defvar helm-pdfgrep-help-message |
|
1229 |
"* Helm PDFgrep Map |
|
1230 |
|
|
1231 |
** Commands |
|
1232 |
\\<helm-pdfgrep-map> |
|
1233 |
\\[helm-goto-next-file]\t\tNext file. |
|
1234 |
\\[helm-goto-precedent-file]\t\tPrevious file. |
|
1235 |
\\[helm-yank-text-at-point]\t\tYank text at point in minibuffer.") |
|
1236 |
|
|
1237 |
;;; Etags help |
|
1238 |
;; |
|
1239 |
;; |
|
1240 |
(defvar helm-etags-help-message |
|
1241 |
"* Helm Etags Map |
|
1242 |
|
|
1243 |
** Commands |
|
1244 |
\\<helm-etags-map> |
|
1245 |
\\[helm-goto-next-file]\t\tNext file. |
|
1246 |
\\[helm-goto-precedent-file]\t\tPrevious file. |
|
1247 |
\\[helm-yank-text-at-point]\t\tYank text at point in minibuffer.") |
|
1248 |
|
|
1249 |
;;; UCS help |
|
1250 |
;; |
|
1251 |
;; |
|
1252 |
(defvar helm-ucs-help-message |
|
1253 |
"* Helm UCS |
|
1254 |
|
|
1255 |
** Tips |
|
1256 |
|
|
1257 |
Use commands below to insert unicode characters in current buffer without |
|
1258 |
leaving Helm. |
|
1259 |
|
|
1260 |
** Commands |
|
1261 |
\\<helm-ucs-map> |
|
1262 |
\\[helm-ucs-persistent-insert]\t\tInsert character. |
|
1263 |
\\[helm-ucs-persistent-forward]\t\tForward character. |
|
1264 |
\\[helm-ucs-persistent-backward]\t\tBackward character. |
|
1265 |
\\[helm-ucs-persistent-delete]\t\tDelete character backward. |
|
1266 |
\\[helm-ucs-persistent-insert-space]\t\tInsert space.") |
|
1267 |
|
|
1268 |
;;; Bookmark help |
|
1269 |
;; |
|
1270 |
;; |
|
1271 |
(defvar helm-bookmark-help-message |
|
1272 |
"* Helm bookmark name |
|
1273 |
|
|
1274 |
** Commands |
|
1275 |
\\<helm-bookmark-map> |
|
1276 |
\\[helm-bookmark-run-jump-other-window]\t\tJump other window. |
|
1277 |
\\[helm-bookmark-run-delete]\t\tDelete bookmark. |
|
1278 |
\\[helm-bookmark-run-edit]\t\tEdit bookmark. |
|
1279 |
\\[helm-bookmark-toggle-filename]\t\tToggle bookmark location visibility.") |
|
1280 |
|
|
1281 |
;;; Eshell command on file help |
|
1282 |
;; |
|
1283 |
;; |
|
1284 |
(defvar helm-esh-help-message |
|
1285 |
"* Helm Eshell on file |
|
1286 |
|
|
1287 |
** Tips |
|
1288 |
|
|
1289 |
*** Pass extra arguments after filename |
|
1290 |
|
|
1291 |
Normally the command or alias will be called with file as argument. For instance |
|
1292 |
|
|
1293 |
<command> candidate_file |
|
1294 |
|
|
1295 |
But you can also pass an argument or more after \"candidate_file\" like this: |
|
1296 |
|
|
1297 |
<command> %s [extra_args] |
|
1298 |
|
|
1299 |
\"candidate_file\" will be added at \"%s\" and the command will look at this: |
|
1300 |
|
|
1301 |
<command> candidate_file [extra_args] |
|
1302 |
|
|
1303 |
*** Specify marked files as arguments |
|
1304 |
|
|
1305 |
Example: |
|
1306 |
|
|
1307 |
<command> file1 file2... |
|
1308 |
|
|
1309 |
Call `helm-find-files-eshell-command-on-file' with one prefix argument. Otherwise |
|
1310 |
you can pass one prefix argument from the command selection buffer. |
|
1311 |
|
|
1312 |
Note: This does not work on remote files. |
|
1313 |
|
|
1314 |
With two prefix-args the output is printed to the `current-buffer'. |
|
1315 |
|
|
1316 |
With no prefix argument or a prefix argument value of '(16) (`\\[universal-argument] \\[universal-argument]') |
|
1317 |
the command is called once for each file like this: |
|
1318 |
|
|
1319 |
<command> file1 |
|
1320 |
<command> file2 |
|
1321 |
... |
|
1322 |
|
|
1323 |
** Commands |
|
1324 |
\\<helm-esh-on-file-map>") |
|
1325 |
|
|
1326 |
;;; Ido virtual buffer help |
|
1327 |
;; |
|
1328 |
;; |
|
1329 |
(defvar helm-buffers-ido-virtual-help-message |
|
1330 |
"* Helm Ido virtual buffers |
|
1331 |
|
|
1332 |
** Commands |
|
1333 |
\\<helm-buffers-ido-virtual-map> |
|
1334 |
\\[helm-ff-run-switch-other-window]\t\tSwitch to other window. |
|
1335 |
\\[helm-ff-run-switch-other-frame]\t\tSwitch to other frame. |
|
1336 |
\\[helm-ff-run-grep]\t\tGrep file. |
|
1337 |
\\[helm-ff-run-zgrep]\t\tZgrep file. |
|
1338 |
\\[helm-ff-run-delete-file]\t\tDelete file. |
|
1339 |
\\[helm-ff-run-open-file-externally]\t\tOpen file externally.") |
|
1340 |
|
|
1341 |
;;; Moccur help |
|
1342 |
;; |
|
1343 |
;; |
|
1344 |
(defvar helm-moccur-help-message |
|
1345 |
"* Helm Moccur |
|
1346 |
|
|
1347 |
** Tips |
|
1348 |
|
|
1349 |
*** Matching |
|
1350 |
|
|
1351 |
Multiple regexp matching is allowed, simply enter a space to separate the regexps. |
|
1352 |
|
|
1353 |
Matching empty lines is supported with the regexp \"^$\", you then get the |
|
1354 |
results displayed as the buffer-name and the line number only. You can |
|
1355 |
save and edit these results, i.e. add text to the empty line. |
|
1356 |
|
|
1357 |
*** Automatically match symbol at point |
|
1358 |
|
|
1359 |
Helm can automatically match the symbol at point while keeping the minibuffer |
|
1360 |
empty, ready to be written to. This behaviour is disabled by default. To |
|
1361 |
enable this you need to add `helm-source-occur' and `helm-source-moccur' to |
|
1362 |
`helm-sources-using-default-as-input'. |
|
1363 |
|
|
1364 |
*** Jump to the corresponding line in the searched buffer |
|
1365 |
|
|
1366 |
You can do this with `\\<helm-map>\\[helm-execute-persistent-action]' (persistent-action), to do it repeatedly |
|
1367 |
you can use `\\<helm-map>\\[helm-follow-action-forward]' and `\\<helm-map>\\[helm-follow-action-backward]' or enable `helm-follow-mode' with `\\<helm-map>\\[helm-follow-mode]'. |
|
1368 |
|
|
1369 |
*** Switch to buffer in other window |
|
1370 |
|
|
1371 |
The command \\<helm-moccur-map>\\[helm-moccur-run-goto-line-ow] allow you to switch to buffer |
|
1372 |
in other window horizontally or vertically if a prefix arg is supplied. |
|
1373 |
|
|
1374 |
*** Save the results |
|
1375 |
|
|
1376 |
Similarly to Helm-grep, you can save the results with `\\<helm-map>\\[helm-moccur-run-save-buffer]'. |
|
1377 |
Once in the saved buffer, you can edit it, see [[Edit a saved buffer][below]]. |
|
1378 |
|
|
1379 |
Of course if you don't save the results, you can resume the Helm session with |
|
1380 |
`helm-resume'. |
|
1381 |
|
|
1382 |
*** Refresh the resumed session |
|
1383 |
|
|
1384 |
When the buffer(s) where you ran helm-(m)occur get(s) modified, the Helm buffer |
|
1385 |
will flash red as a warning. You can refresh the buffer by running `\\<helm-map>\\[helm-refresh]'. |
|
1386 |
This can be done automatically by customizing `helm-moccur-auto-update-on-resume'. |
|
1387 |
|
|
1388 |
*** Refresh a saved buffer |
|
1389 |
|
|
1390 |
Type `g' to update the buffer. |
|
1391 |
|
|
1392 |
*** Edit a saved buffer |
|
1393 |
|
|
1394 |
First, install wgrep (https://github.com/mhayashi1120/Emacs-wgrep) and then: |
|
1395 |
|
|
1396 |
1) `C-c C-p' (`wgrep-change-to-wgrep-mode') to edit the buffer(s). |
|
1397 |
2) `C-x C-s' to save your changes. |
|
1398 |
|
|
1399 |
Tip: Use the excellent iedit (https://github.com/victorhge/iedit) to modify all |
|
1400 |
occurences at once in the buffer. |
|
1401 |
|
|
1402 |
*** Search in region |
|
1403 |
|
|
1404 |
When searching in current-buffer with `helm-occur', if a region |
|
1405 |
is found helm will search in this region only. If you marked |
|
1406 |
this region with `mark-defun' the symbol that was at point before |
|
1407 |
marking defun will be used when `helm-source-occur' is member of |
|
1408 |
`helm-sources-using-default-as-input'. |
|
1409 |
|
|
1410 |
** Commands |
|
1411 |
\\<helm-moccur-map> |
|
1412 |
\\[helm-goto-next-file]\t\tNext buffer. |
|
1413 |
\\[helm-goto-precedent-file]\t\tPrevious buffer. |
|
1414 |
\\[helm-yank-text-at-point]\t\tYank text at point in minibuffer. |
|
1415 |
\\[helm-moccur-run-goto-line-ow]\t\tGo to line in other window. |
|
1416 |
\\[helm-moccur-run-goto-line-of]\t\tGo to line in new frame.") |
|
1417 |
|
|
1418 |
;;; Helm Top |
|
1419 |
;; |
|
1420 |
;; |
|
1421 |
(defvar helm-top-help-message |
|
1422 |
"* Helm Top |
|
1423 |
|
|
1424 |
** Commands |
|
1425 |
\\<helm-top-map> |
|
1426 |
\\[helm-top-run-sort-by-com]\t\tSort by commands. |
|
1427 |
\\[helm-top-run-sort-by-cpu]\t\tSort by CPU usage. |
|
1428 |
\\[helm-top-run-sort-by-user]\t\tSort alphabetically by user. |
|
1429 |
\\[helm-top-run-sort-by-mem]\t\tSort by memory.") |
|
1430 |
|
|
1431 |
;;; Helm Elisp package |
|
1432 |
;; |
|
1433 |
;; |
|
1434 |
(defvar helm-el-package-help-message |
|
1435 |
"* Helm Elisp package |
|
1436 |
|
|
1437 |
** Tips |
|
1438 |
|
|
1439 |
*** Compile all your packages asynchronously |
|
1440 |
|
|
1441 |
If you use async (if you have installed Helm from MELPA you do), only \"helm\", |
|
1442 |
\"helm-core\", and \"magit\" are compiled asynchronously. If you want all your |
|
1443 |
packages compiled asynchronously, add this to your init file: |
|
1444 |
|
|
1445 |
(setq async-bytecomp-allowed-packages '(all)) |
|
1446 |
|
|
1447 |
*** Upgrade Elisp packages |
|
1448 |
|
|
1449 |
On initialization (when Emacs is fetching packages on remote), if Helm finds |
|
1450 |
packages to upgrade, it will start in the upgradable packages view showing the packages |
|
1451 |
available for upgrade. |
|
1452 |
|
|
1453 |
On subsequent runs, you will have to refresh the list with `C-c \\[universal-argument]'. If Helm |
|
1454 |
finds upgrades you can switch to upgrade view (see below) to see what packages |
|
1455 |
are available for upgrade or simply hit `C-c U' to upgrade them all. |
|
1456 |
|
|
1457 |
To see upgradable packages hit `M-U'. |
|
1458 |
|
|
1459 |
Then you can install all upgradable packages with the \"upgrade all\" action |
|
1460 |
\(`C-c \\[universal-argument]'), or upgrade only specific packages by marking them and running the |
|
1461 |
\"upgrade\" action (visible only when there are upgradable packages). Of course |
|
1462 |
you can upgrade a single package by just running the \"upgrade\" action without |
|
1463 |
marking it (`C-c u' or `RET') . |
|
1464 |
|
|
1465 |
\*Warning:* You are strongly advised to \*restart* Emacs after \*upgrading* packages. |
|
1466 |
|
|
1467 |
*** Meaning of flags prefixing packages |
|
1468 |
|
|
1469 |
\(Emacs ≥25) |
|
1470 |
|
|
1471 |
- The flag \"S\" that prefixes package names means that the packages belong to `package-selected-packages'. |
|
1472 |
|
|
1473 |
- The flag \"U\" that prefix package names mean that this package is no more needed. |
|
1474 |
|
|
1475 |
** Commands |
|
1476 |
\\<helm-el-package-map> |
|
1477 |
\\[helm-el-package-show-all]\t\tShow all packages. |
|
1478 |
\\[helm-el-package-show-installed]\t\tShow installed packages only. |
|
1479 |
\\[helm-el-package-show-uninstalled]\t\tShow non-installed packages only. |
|
1480 |
\\[helm-el-package-show-upgrade]\t\tShow upgradable packages only. |
|
1481 |
\\[helm-el-package-show-built-in]\t\tShow built-in packages only. |
|
1482 |
\\[helm-el-run-package-install]\t\tInstall package(s). |
|
1483 |
\\[helm-el-run-package-reinstall]\t\tReinstall package(s). |
|
1484 |
\\[helm-el-run-package-uninstall]\t\tUninstall package(s). |
|
1485 |
\\[helm-el-run-package-upgrade]\t\tUpgrade package(s). |
|
1486 |
\\[helm-el-run-package-upgrade-all]\t\tUpgrade all packages. |
|
1487 |
\\[helm-el-run-visit-homepage]\t\tVisit package homepage.") |
|
1488 |
|
|
1489 |
;;; Helm M-x |
|
1490 |
;; |
|
1491 |
;; |
|
1492 |
(defvar helm-M-x-help-message |
|
1493 |
"* Helm M-x |
|
1494 |
|
|
1495 |
** Tips |
|
1496 |
|
|
1497 |
*** You can get help on any command with persistent action (\\[helm-execute-persistent-action]) |
|
1498 |
|
|
1499 |
*** Prefix arguments |
|
1500 |
|
|
1501 |
You must pass prefix arguments \*after* starting `helm-M-x'. A mode-line |
|
1502 |
counter will display the number of given prefix arguments. |
|
1503 |
|
|
1504 |
If you pass prefix arguments before running `helm-M-x', it will be displayed in the prompt. |
|
1505 |
The first `\\[universal-argument]' after `helm-M-x' clears those prefix arguments.") |
|
1506 |
|
|
1507 |
;;; Helm imenu |
|
1508 |
;; |
|
1509 |
;; |
|
1510 |
(defvar helm-imenu-help-message |
|
1511 |
"* Helm Imenu |
|
1512 |
|
|
1513 |
** Commands |
|
1514 |
\\<helm-imenu-map> |
|
1515 |
\\[helm-imenu-next-section]\t\tGo to next section. |
|
1516 |
\\[helm-imenu-previous-section]\t\tGo to previous section.") |
|
1517 |
|
|
1518 |
;;; Helm colors |
|
1519 |
;; |
|
1520 |
;; |
|
1521 |
(defvar helm-colors-help-message |
|
1522 |
"* Helm colors |
|
1523 |
|
|
1524 |
** Commands |
|
1525 |
\\<helm-color-map> |
|
1526 |
\\[helm-color-run-insert-name]\t\tInsert the entry name. |
|
1527 |
\\[helm-color-run-kill-name]\t\tKill the entry name. |
|
1528 |
\\[helm-color-run-insert-rgb]\t\tInsert entry in RGB format. |
|
1529 |
\\[helm-color-run-kill-rgb]\t\tKill entry in RGB format.") |
|
1530 |
|
|
1531 |
;;; Helm Semantic |
|
1532 |
;; |
|
1533 |
;; |
|
1534 |
(defvar helm-semantic-help-message |
|
1535 |
"* Helm Semantic |
|
1536 |
|
|
1537 |
** Commands |
|
1538 |
\\<helm-semantic-map>") |
|
1539 |
|
|
1540 |
;;; Helm kmacro |
|
1541 |
;; |
|
1542 |
;; |
|
1543 |
(defvar helm-kmacro-help-message |
|
1544 |
"* Helm kmacro |
|
1545 |
|
|
1546 |
** Tips |
|
1547 |
|
|
1548 |
- Start recording a kmacro with `f3'. |
|
1549 |
- End the kmacro recording with `f4'. |
|
1550 |
- Run `helm-execute-kmacro' to list all your kmacros. |
|
1551 |
|
|
1552 |
Use persistent action to run your kmacro as many time as needed. |
|
1553 |
You can browse the kmacros with `helm-next-line' and `helm-previous-line'. |
|
1554 |
|
|
1555 |
Note: You can't record keys running Helm commands except `helm-M-x', under the |
|
1556 |
condition that you don't choose a command using Helm completion. |
|
1557 |
|
|
1558 |
** Commands |
|
1559 |
\\<helm-kmacro-map>") |
|
1560 |
|
|
1561 |
;;; Kill ring |
|
1562 |
;; |
|
1563 |
;; |
|
1564 |
(defvar helm-kill-ring-help-message |
|
1565 |
"* Helm kill ring |
|
1566 |
|
|
1567 |
** Tips |
|
1568 |
|
|
1569 |
Every Helm session lets you save a candidate to the kill-ring / clipboard / |
|
1570 |
primary-selection with `\\<helm-map>\\[helm-kill-selection-and-quit]'. |
|
1571 |
|
|
1572 |
To save space, Helm-kill-ring truncates the candidates longer than |
|
1573 |
`helm-kill-ring-max-offset'. |
|
1574 |
`\\<helm-kill-ring-map>\\[helm-kill-ring-kill-selection]' then saves the whole |
|
1575 |
text and not the truncated value. The view of truncated candidates can be |
|
1576 |
toggled; see the command list below. |
|
1577 |
|
|
1578 |
As opposed to `yank', numeric prefix arguments are ignored with |
|
1579 |
`helm-show-kill-ring': there is no need for them since selection happens within |
|
1580 |
Helm. Moreover Helm has [[Shortcuts for executing Default Action on the nth |
|
1581 |
candidate][Shortcuts for executing Default Action on the nth candidate]]. |
|
1582 |
|
|
1583 |
It is recommended to globally bind `M-y' to `helm-show-kill-ring'. Once in the |
|
1584 |
Helm-kill-ring session you can navigate to next/previous line with `M-y' and |
|
1585 |
`M-u' for convenience. Of course `\\[helm-next-line]' and `\\[helm-previous-line]' are still available. |
|
1586 |
|
|
1587 |
It is possible to delete candidates from the kill ring. |
|
1588 |
|
|
1589 |
You can concatenate marked candidates and yank them in the current |
|
1590 |
buffer, thus creating a new entry in the kill ring. Candidates are |
|
1591 |
concatenated with `helm-kill-ring-separator' as default but you can |
|
1592 |
change interactively the separator while yanking by using two prefix |
|
1593 |
args. When you have something else than \"\\n\" as default value for |
|
1594 |
`helm-kill-ring-separator' and you want to use \"\\n\" from prompt, use |
|
1595 |
`C-q C-j' to enter a newline in prompt. |
|
1596 |
|
|
1597 |
To not push a new entry in the kill ring, use `\\<helm-map>\\[helm-copy-to-buffer]' instead of RET |
|
1598 |
\(note that you can't change separator with this). |
|
1599 |
|
|
1600 |
When inserting candidates with the default action (`RET'), `point' is placed at |
|
1601 |
the end of the candidate and `mark' at the beginning. You can revert this behavior |
|
1602 |
by using a prefix argument, i.e. `C-u RET', like the regular `yank' command does. |
|
1603 |
|
|
1604 |
** Commands |
|
1605 |
\\<helm-kill-ring-map> |
|
1606 |
\\[helm-next-line]\t\tNext line. |
|
1607 |
\\[helm-previous-line]\t\tPrevious line. |
|
1608 |
\\[helm-kill-ring-delete]\t\tDelete entry. |
|
1609 |
\\[helm-kill-ring-toggle-truncated]\t\tToggle truncated view of candidate. |
|
1610 |
\\[helm-kill-ring-kill-selection]\t\tKill non-truncated of selection.") |
|
1611 |
|
|
1612 |
;;; Org headings |
|
1613 |
;; |
|
1614 |
;; |
|
1615 |
(defvar helm-org-headings-help-message |
|
1616 |
"* Helm Org headings |
|
1617 |
|
|
1618 |
** Tips |
|
1619 |
|
|
1620 |
*** Refiling |
|
1621 |
|
|
1622 |
You can refile one or more headings at a time. |
|
1623 |
|
|
1624 |
To refile one heading, move the point to the entry you want to refile and run |
|
1625 |
\\[helm-org-in-buffer-headings]. Then select the heading you want to refile to |
|
1626 |
and press \\<helm-org-headings-map>\\[helm-org-run-refile-heading-to] or select the refile action from the actions menu. |
|
1627 |
|
|
1628 |
To refile multiple headings, run \\[helm-org-in-buffer-headings] and mark the |
|
1629 |
headings you want to refile. Then select the heading you want to refile to |
|
1630 |
\(without marking it) and press \\<helm-org-headings-map>\\[helm-org-run-refile-heading-to] or select the refile action from the |
|
1631 |
actions menu. |
|
1632 |
|
|
1633 |
*** Tags completion |
|
1634 |
|
|
1635 |
Tags completion use `completing-read-multiple', perhaps have a |
|
1636 |
look at its docstring. |
|
1637 |
|
|
1638 |
**** Single tag |
|
1639 |
|
|
1640 |
From an org heading hit C-c C-c which provide a |
|
1641 |
\"Tags\" prompt, then hit TAB and RET if you want to enter an |
|
1642 |
existing tag or write a new tag in prompt. At this point you end |
|
1643 |
up with an entry in your prompt, if you enter RET, the entry is |
|
1644 |
added as tag in your org header. |
|
1645 |
|
|
1646 |
**** Multiple tags |
|
1647 |
|
|
1648 |
If you want to add more tag to your org header, add a separator[1] after |
|
1649 |
your tag and write a new tag or hit TAB to find another existing |
|
1650 |
tag, and so on until you have all the tags you want |
|
1651 |
e.g \"foo,bar,baz\" then press RET to finally add the tags to your |
|
1652 |
org header. |
|
1653 |
Note: [1] A separator can be a comma, a colon i.e. [,:] or a space. |
|
1654 |
|
|
1655 |
** Commands |
|
1656 |
\\<helm-org-headings-map> |
|
1657 |
\\[helm-org-run-open-heading-in-indirect-buffer]\t\tOpen heading in indirect buffer. |
|
1658 |
\\[helm-org-run-refile-heading-to]\t\tRefile current or marked headings to selection. |
|
1659 |
\\[helm-org-run-insert-link-to-heading-at-marker]\t\tInsert link at point to selection." |
|
1660 |
) |
|
1661 |
|
|
1662 |
;;; Completing-read |
|
1663 |
;; |
|
1664 |
(defun helm-comp-read-help-message () |
|
1665 |
(let ((com (assoc-default 'name (helm-get-current-source)))) |
|
1666 |
(format |
|
1667 |
"* Helm completing-read completion for `%s' |
|
1668 |
|
|
1669 |
Command `%s' is using a `completing-read' for completion on your input, |
|
1670 |
this completion have been \"helmized\" because you have enabled [[Helm mode][helm-mode]]'. |
|
1671 |
|
|
1672 |
** Tips |
|
1673 |
|
|
1674 |
*** Disabling or use something else than helm for completion of some commands |
|
1675 |
|
|
1676 |
You can disable helm completion or use something else for specific commands of your choice, |
|
1677 |
for this customize variable `helm-completing-read-handlers-alist'. |
|
1678 |
|
|
1679 |
*** Exiting minibuffer with empty string |
|
1680 |
|
|
1681 |
You can exit minibuffer with empty string with \\<helm-comp-read-map>\\[helm-cr-empty-string]. |
|
1682 |
It is useful when some commands are prompting continuously until you enter an empty prompt. |
|
1683 |
|
|
1684 |
** Commands |
|
1685 |
\\<helm-comp-read-map> |
|
1686 |
\\[helm-cr-empty-string]\t\tExit minibuffer with empty string." |
|
1687 |
com com))) |
|
1688 |
|
|
1689 |
|
|
1690 |
;;; Mode line strings |
|
1691 |
;; |
|
1692 |
;; |
|
1693 |
;;;###autoload |
|
1694 |
(defvar helm-comp-read-mode-line "\ |
|
1695 |
\\<helm-comp-read-map>\ |
|
1696 |
C/\\[helm-cr-empty-string]:Empty \ |
|
1697 |
\\<helm-map>\ |
|
1698 |
\\[helm-help]:Help \ |
|
1699 |
\\[helm-select-action]:Act \ |
|
1700 |
\\[helm-maybe-exit-minibuffer]/\ |
|
1701 |
f1/f2/f-n:NthAct \ |
|
1702 |
\\[helm-toggle-suspend-update]:Tog.suspend") |
|
1703 |
|
|
1704 |
;;;###autoload |
|
1705 |
(defvar helm-read-file-name-mode-line-string "\ |
|
1706 |
\\<helm-read-file-map>\ |
|
1707 |
\\[helm-help]:Help \ |
|
1708 |
C/\\[helm-cr-empty-string]:Empty \ |
|
1709 |
\\<helm-map>\ |
|
1710 |
\\[helm-select-action]:Act \ |
|
1711 |
\\[helm-maybe-exit-minibuffer]/\ |
|
1712 |
f1/f2/f-n:NthAct \ |
|
1713 |
\\[helm-toggle-suspend-update]:Tog.suspend" |
|
1714 |
"String displayed in mode-line in `helm-source-find-files'.") |
|
1715 |
|
|
1716 |
;;;###autoload |
|
1717 |
(defvar helm-top-mode-line "\ |
|
1718 |
\\<helm-top-map>\ |
|
1719 |
\\[helm-help]:Help \ |
|
1720 |
\\<helm-map>\ |
|
1721 |
\\[helm-select-action]:Act \ |
|
1722 |
\\[helm-maybe-exit-minibuffer]/\ |
|
1723 |
f1/f2/f-n:NthAct \ |
|
1724 |
\\[helm-toggle-suspend-update]:Tog.suspend") |
|
1725 |
|
|
1726 |
|
|
1727 |
(provide 'helm-help) |
|
1728 |
|
|
1729 |
;; Local Variables: |
|
1730 |
;; byte-compile-warnings: (not obsolete) |
|
1731 |
;; coding: utf-8 |
|
1732 |
;; indent-tabs-mode: nil |
|
1733 |
;; End: |
|
1734 |
|
|
1735 |
;;; helm-help.el ends here |