Say in my C head file I wanna include another file which has not being created yet:
#include "AnotherFile.h" /*not being created yet*/
Now, I select the file in Visual Mode,
#include “AnotherFile.h“
How to create a new file with the name of what I’ve selected? I mean,
:e {something that refers to what I selected}
The closest I can think of is to create a function:
You can then select the word and type
:call W()+ enter, which should open the new buffer.EDIT The function above does not work without errors if the buffer containing the
#includeis modified. In such case, the following function is suited better:EDIT 2 You can also try to type
:e <cfile>(see:help <cfile>).EDIT 3 Finally, under
:help gfyou find hidden