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

Add command to replace input with current candidate #141

Closed
hpdeifel opened this issue Jun 15, 2015 · 3 comments
Closed

Add command to replace input with current candidate #141

hpdeifel opened this issue Jun 15, 2015 · 3 comments

Comments

@hpdeifel
Copy link

@hpdeifel hpdeifel commented Jun 15, 2015

Especially when renaming things or creating new things with similar names to old things, it would be useful to have a binding like RET that selects the current candidate, but instead of immediately returning, replaces the input with the candidate.

That would allow to first select the candidate and then modify it slightly to produce a new one.

@abo-abo abo-abo closed this in 02cedb7 Jun 15, 2015
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jun 15, 2015

Another good idea, thanks.

@hpdeifel
Copy link
Author

@hpdeifel hpdeifel commented Jun 19, 2015

This works nicely for files and other type of input, but I just tried it the first time on directories.

Unfortunately, since the directory ends with a slash, ivy immediately changes into that directory making it impossible to edit its name.

@hpdeifel
Copy link
Author

@hpdeifel hpdeifel commented Jun 19, 2015

Uh, and it seems broken in master: It currently always changes the directory to ~ and only then inserts the current candidate.

abo-abo added a commit that referenced this issue Jun 19, 2015
ivy.el (ivy-insert-current): When the current candidate is a directory,
just insert its name without the last "/". The user can insert "/" to
switch to that directory if necessary.

Re #141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants