I have this directory structure for example:


I want rename /a/a1.txt to /a/a1, and hoping this result:


But when I invoke C-c C-r command at the node of /a/a1.txt and input character a1. Ivy will recommend me a1.txt.
After use enter key. neotree will give a warning a1.txt is exist, will you overwrite it? but I want use a1 as its new name.

I'm not test if not install ivy what will happen, after all, ivy as a tool used every day.

how to rename file a1.txt to a1 in neotree? Thanks a lot.


ivy has more than one way of exiting the selection process, not just pressing enter.

In particular ivy-immediate-done which is bound to C-M-j has the following help text

exit with the current action, calling it on the /current input/ instead of the current candidate. This is useful especially when creating new files or directories - often the input will match an existing file, which you don't want to select.

As usual there is help available, type C-h m at the prompt to discover wonders like ivy-occur.

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