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-mode: create directory when name of directory matches filename in current directory #183

Closed
makkus opened this issue Jul 29, 2015 · 8 comments

Comments

@makkus
Copy link

@makkus makkus commented Jul 29, 2015

This is most likely a stupid question, but: in dired, when using ivy-mode, how can I create a new folder using dired-create-directory (say, called 'abc'), when there is a file that would match that new foldername (say, 'file-abc-def.txt)?

All I can do is select the existing file, and of course it doesn't let me create a folder with the same name. Which is not what I want anyway.

@abo-abo abo-abo closed this in 6b57efe Jul 30, 2015
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jul 30, 2015

Added a second binding for this. It's possible to do it with both C-u C-j (old binding), and C-M-j (new binding).

@mthenault
Copy link

@mthenault mthenault commented Jul 20, 2018

Hello,
First of all : awesome plugin !

I stumbled upon this problem now.
Simply using the "+" shortcut in dired doesn't work: the autocomplete forces me to chose the matched name instead of creating a new one.

Both C-u C-j and C-M-j give me "Buffer is read only:" in the status bar without further effect.

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jul 20, 2018

@antismap Please open a new issue if you can reproduce the bug reliably.

@JRigotti
Copy link

@JRigotti JRigotti commented Jun 14, 2019

@antismap did you open an issue about this behavior?

I can reproduce the same and the suggested keybindings from @abo-abo yields in fact the buffer is read-only message.

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jun 25, 2019

@JRigotti Please open a new issue with reproduction steps.

@haoyuan80s
Copy link

@haoyuan80s haoyuan80s commented May 31, 2020

Hello @abo-abo
I am trying to create a file ~/x/y.txt. But, there is already a ~/xx/ folder. If I type "~/x/", it is completed to "~/xx/". Is there a command to create such files inside some new folders?

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jun 1, 2020

@haoyuan80s

You can customize the behavior like this:

(setq ivy-magic-slash-non-match-action 'ivy-magic-slash-non-match-cd-selected)
@haoyuan80s
Copy link

@haoyuan80s haoyuan80s commented Jun 1, 2020

That Works. Thank you for the great package!

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.