help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A package in a league of its own: Helm


From: Tu, Do
Subject: Re: A package in a league of its own: Helm
Date: Tue, 2 Sep 2014 01:21:38 -0700 (PDT)
User-agent: G2/1.0

Vào 00:25:51 UTC+7 Thứ ba, ngày 02 tháng chín năm 2014, Nikolai Weibull đã viết:
> On Mon, Sep 1, 2014 at 6:59 PM, Tu, Do <address@hidden> wrote:
> 
> 
> 
> I seem to prefer ido for exactly the opposite reasons:
> 
> 
> 
> > I think helm-find-files is much better than stock ido-find-file or even 
> > ido-find-file because:
> 
> >
> 
> > - It has fuzzy matching by default. You have to install flx to get fuzzy 
> > matching in ido.
> 
> 
> 
> Ido comes with Emacs, which is a big plus.  Flx can be installed from
> 
> marmalade repo.

Stock Ido is a bit better than stock find-file but not that much. At least with 
stock find-file, you can open a directory or a file. With Ido, you have to 
switch. You also have to improve Ido with packages.

> > - Some people find that Ido horizontal listing is messy, so they create 
> > `ido-vertical-mode` for cleaner looking. With Helm, you get this by default 
> > with its interface. If you worry the Helm buffer is a bit big, you can 
> > always customize its size.


> Configuring ido for vertical output requires one line of code:
> 
> 
> 
> (setq ido-decorations (quote ("\n" "" "\n" "\n…" "[" "]" " [No match]"
> 
> " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")))

Someone already did that so I just used the package. The package also binds 
some more key for more convenient such as C-n/C-p and arrow keys. You also get 
a pointer point to the candidate you are going to select.


> 
> > - It has highlighting on candidates depend on types: directory has a color, 
> > plain file has a color, executable has a color, shell script has a color.
> 
> 
> 
> I don’t select what file I want to open based on what color it has.
> 
> If I know what I’m looking for, I don’t need visual aides to find it.
> 
> If I don’t know what I’m looking for, I’ll open Dired.

If you think so, you should try turning off all colors in Dired and see the 
difference. I don't select files based on what colors have, but it quickly 
helps to filter unrelated items.

> 
> > - Depends on what file type your highlighting candidate is, Helm opens it 
> > appropriately. For example, if you RET on a directory, Helm opens dired; if 
> > you RET on a file, Helm opens that file. You can also customize the 
> > application to open the files. Stock find-file at least can open directory; 
> > Ido simply can't.
> 
> 
> 
> C-d in Ido opens the currently selected directory.

Why should I remember another key binding when it can be done more convenient? 
Even stock find-file can open file or directory depend on the context.

> 
> > - You can open multiple files with helm-find-files by marking with C-SPC 
> > and press RET. If you want to everything at current directory, you can use 
> > M-a to mark all then RET. You can even use wildcard expression like stock 
> > find-file
> 
> 
> 
> If I want to work on multiple files at once, Dired does that for me.

Yes, but you needs extra steps, when you can do it right in your file browsing 
section. And what if you don't want to open a Dired buffers, but just the files?

> 
> > - Helm has a list of actions to apply on your files: checksum file, open 
> > file externally, switch to eshell, grep, diff...
> 
> 
> 
> Again, Dired helps me out here.

Again, you can make it more convenient. Like, you browse to a file and you want 
to diff/patch to another file. You don't have to go to another immediate step, 
that is Dired.

Grep in Helm is interactive, unlike the stock grep/rgrep. Demo: 
http://tuhdo.github.io/static/live_grep.gif

> 
> > - Helm is compatible with both Linux and Windows path. Ido can't; you have 
> > to drop into stock find-file.
> 
> 
> 
> I’m not sure if this is actually true, but you can always use slash as
> 
> a path separator on Windows if Ido can’t handle backslash (which I
> 
> wouldn’t hold against it).

But if you paste Windows path from somewhere, would it work? You have to drop 
back into stock find-file.

> 
> My overall feeling when I looked at Helm when this thread appeared was
> 
> that there’s already packages that do what Helm does that come with
> 
> Emacs: Dired, Ibuffer, and Ido.  Sure, Helm can interface with
> 
> Delicious, my web browser, and so on, and if that’s something you want
> 
> to do, then Helm is great, but for me, Helm is trying to sell me stuff
> 
> that I simply don’t need or want.

No package does any of this:

- Live grep: http://tuhdo.github.io/static/live_grep.gif
- A live outline tree for jumping to function/variable in current file: 

+ Demo 1: http://tuhdo.github.io/static/part3/helm-semantic-or-imenu.gif
+ Demo 2: 
https://cloud.githubusercontent.com/assets/4818719/4102208/cda8f392-311e-11e4-9c83-e68df38ef68e.gif

- Show local/global mark ring with nice highlighting of major modes: 
http://tuhdo.github.io/static/part3/helm-all-mark-rings.gif

- Interactively select color and faces: 
http://tuhdo.github.io/static/part3/helm-color.gif

- Interactive Eshell history, certainly superior to the stock C-c C-l: 
http://tuhdo.github.io/static/part3/helm-eshell-history.gif . I store a large 
amount of eshell/shell history, so I want a quick way to narrow down.

helm-find-files can even find file at point. That is, you don't need to 
remember ffap as well. If you write Emacs lisp, move point over the required 
file and execute helm-find-files, it will prompt the file location and you 
simply RET to enter. All in once nice package.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]