I'm using ivy-mode and when I try and make a directory and it has the same sort of name as an autocomplete then the directory will not be made.

eg: if I have webapp.pdf and I want to create a directory called webapp then autocomplete kicks in and thinks I want to call it webapp.pdf and then doesn't create the directory as it has the same name as a file. Is there a way around this?

2 Answers 2


You can try using C-M-j, as explained here

Q: How do I enter an input that matches one of the candidates instead of this candidate? Example: create a file bar when a file barricade exists in the current directory.

A: Press C-M-j. Alternatively, you can make the prompt line selectable with (setq ivy-use-selectable-prompt t).


Yes, there is. If you append a forward slash (/) after your directory name, ivy-mode will be forced to treat it as a directory path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.