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

ivy find-file-at-point [Feature Request] #123

Closed
kaushalmodi opened this issue May 30, 2015 · 1 comment
Closed

ivy find-file-at-point [Feature Request] #123

kaushalmodi opened this issue May 30, 2015 · 1 comment

Comments

@kaushalmodi
Copy link
Contributor

It would be nice for find-file-at-point to work with ivy.

If the point is on a file path and if I do counsel-find-file, it should pick up the path at point (but not open that file/dir directly) and then allow the user to edit the path as needed.

@abo-abo
Copy link
Owner

abo-abo commented May 30, 2015

It would be nice for find-file-at-point to work with ivy.

There was an issue with find-file-at-point and ivy-mode. It's fixed in the trunk.

If the point is on a file path and if I do counsel-find-file, it should pick up the path at point (but not open that file/dir directly) and then allow the user to edit the path as needed.

This can be added via a defcustom.

abo-abo added a commit that referenced this issue Jan 24, 2016
* ivy.el (ivy-ffap-url-functions): New defvar.
(ivy--cd-maybe): When calling a function in `ivy-ffap-url-functions'
results in a string, stop completion and open that string with
`ffap-url-fetcher'.

* counsel.el (counsel-github-url-p): New defun.
(ivy-ffap-url-functions): Add `counsel-github-url-p' to the list.

This feature allows to quickly visit Github issues from either
`magit-commit-mode' or from a version-controlled file. The point has to
be at the "#" char in e.g. "#123", that represents an issue.

It's possible to customize `ivy-ffap-url-functions' to do a similar
thing for places other than Github.

The "C-x C-f M-n" key binding will work better with `counsel-find-file',
for plain `find-file' it will open a `dired' buffer in addition to
opening the URL.
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

No branches or pull requests

2 participants