Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs create new file with ido enabled

I reciently switched to emacs starter kit which includes the ido package.

ido has a nice feature that suggests paths when find-file which is usually very handy except when trying to create a new file. When the new file name matches a suggestion in another path ido automatically switches to that path assuming that's what I wanted, but usually its not and I find it annoying.

To workaround the issue I either touch newfile from shell, create a new buffer and save as, or M-x find-file to get the original behavior. I could of course rebind C-x C-f to find-file again but must of the time I like ido-find-file, I just want it to stop automatically switching paths when I type the path explicitly.

I figure there is probably some simple key I can press during ido-find-file to tell it that the file I'm looking for does not exist and to stop making suggestions, or some var I can set to get more desirable behavior?

like image 933
Kurt Harriger Avatar asked Feb 28 '11 04:02

Kurt Harriger


People also ask

What is IDO mode Emacs?

Ido adds flex matching. It's a particular type of matching that wildcard matches characters even though they're not next to one another in the list of candidates.

What is Ido package?

The Ido package lets you switch between buffers and visit files and directories with a minimum of keystrokes.


2 Answers

Try:

C-x C-f C-f

It should kick you out of ido mode into "normal" find file mode

like image 113
Steve Lianoglou Avatar answered Sep 27 '22 19:09

Steve Lianoglou


C-j is the key combination you are seeking.

like image 27
I GIVE CRAP ANSWERS Avatar answered Sep 27 '22 20:09

I GIVE CRAP ANSWERS