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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Jun 15, 2015

Owner

Another good idea, thanks.

Owner

abo-abo commented Jun 15, 2015

Another good idea, thanks.

@hpdeifel

This comment has been minimized.

Show comment
Hide comment
@hpdeifel

hpdeifel 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 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

This comment has been minimized.

Show comment
Hide comment
@hpdeifel

hpdeifel Jun 19, 2015

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

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

"M-i" should not switch directories
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