I wonder how to open a file from a directory under the cursor.
I have managed to do it for simple directories, but it requires they are one single word and are located in the current working directory: In commandline mode, with :e and then <ctrl+r> <ctrl+w> for pasting the word under cursor, and then using tab for example for autocompletion, or <Enter> for opening the :Explore view of it.
However I have no idea for more complex directories.
Is there a solution ?
<c-r><c-a>will expand the WORD (where<c-r><c-w>expands a 'word'). Also,gfwill open netrw if the file under the cursor is a directory. Of course, that only works if the file is in thepath(:h path). – Biggybi May 28 '20 at 12:35<c-r><c-a>is great. Andgfis just exactly what I was searching for. – Stephane Rolland May 28 '20 at 12:56