Wednesday, March 30, 2011

Ctrl-W f when file doesn't exist?

Is there a setting that controls whether Ctrl-W f opens a file that
doesn't exist? I frequently find myself wanting to open a new file that
way.

It wasn't too hard to come up with a mapping:

:nmap <C-w>f :exe ":e ".fnameescape(expand("<cfile>"))<CR>

But I was just wondering whether that was unnecessary or whether there
was an easy way to have my cake and eat it too (where C-w f would both
open a non-existent file, and also search &path).

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: