The Asterisk Next to the Filename in Vim’s Netrw

Yesterday I was opening up a file, but since I didn’t quite remember the name of it, I decided to instead open the containing directory in Vim:

:vsp ../dir-name

This worked as expected, opening the file browser, which I learned is called Netrw. However, I noticed that one of the files had an asterisk next to its name:

my-file.php*

I immediately started to wonder what that was about, but a quick search on duckduckgo.com produced no satisfactory results, so I hit F1 in vim, and the help page came up. Then I searched for *

/*

which, of course, started to find a lot of asterisks because it seems vim uses them a lot in the help pages, but at some point I finally came to a section that explains that

“The |getftype()| function is used to append a bit of filigree to indicate filetype to locally listed files:”

Those indicators are as follows:

directory : /
executable : *
fifo : |
links : @
sockets : =

So there you have it; an asterisk next to a filename in Netrw means the file is executable.

The Netrw man page seems to be full of really nice information, so I now owe it to myself to give it a good read. You should too if you are into Vim.