Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make helm-find-files backspace behave like Ido #1524

Closed
wants to merge 1 commit into from

Conversation

tuhdo
Copy link
Contributor

@tuhdo tuhdo commented May 7, 2015

To make it easier for people to switch to helm-find-files from Ido.

Code taken from here. However, the RET command is buggy since it only expands once and the next time you press RET on the same directory, it goes into Dired. The proper solution for RET (as written by Helm maintainer) is this:

(defun helm-find-file-or-expand ()
  (interactive)
  (with-helm-window (if (and (file-directory-p (helm-get-selection))
                             (< (length (helm-marked-candidates)) 2))
                        (helm-execute-persistent-action)
                      (helm-exit-minibuffer))))
(define-key helm-find-files-map (kbd "RET") 'helm-find-file-or-expand)

However, I don't include this since we already have TAB and making RET to go into next directory level is confusing if a user really wants to open a Dired buffer on that directory. Of course, it's possible by simply pressing f2 or switch to action menu but it's not obvious.

To make it easier for people to switch to helm-find-files from Ido.
@syl20bnr
Copy link
Owner

Honestly RET on a directory should not open a Dired buffer, this is a surprising behavior for a majority of users, I still get caught by this. In any software when browsing a file tree, pressing RET on a directory enters the directory. I think we should consider this as a saner default.

Anyway this PR is excellent and already made my life easier in helm-find-file :-)
Thank you 👍 👍
Cherry-picked in develop branch, you can safely delete your branch.

@syl20bnr
Copy link
Owner

@tuhdo we have a regression with this change, see #1583

@CestDiego
Copy link
Contributor

@syl20bnr @tuhdo I think using RET to enter directory is really a better default. And Using Tab to complete names and once it's completed tab opens the dired buffer..without losing focus on the help find files windows would be great.

As for the regression I'd say that the behavior for backspace in help now, is kinda the same as C-l right? then why don't we revert back to the old one. Alternatively we could use backspace and s-backspace or sth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants