I would like to set gvim as the default program for opening files which do not have an extension (e.g. no .txt, .php, .js, .css, .html etc...) suffix as part of the file name.


I would like to do this on any version of Windows (although I am currently running Windows 7).

  • 7
    I'm voting to close this question as off-topic because it is about the configuration of the Windows operating system.
    – toro2k
    Mar 6, 2015 at 11:28
  • 3
    superuser.com/a/13947/334516 - apparently someone got the answer from the Vim Wikia. :D
    – muru
    Mar 6, 2015 at 12:44
  • 2
    This is a useful question as such, but I agree with @toro2k that this question belongs on SuperUser.com. It has almost nothing to do with Vim. Mar 6, 2015 at 19:44

1 Answer 1


You must have full Administrator privileges to set the default program to launch when files with no extension are clicked. From a DOS prompt:

Use the assoc command with the extension . (which is used to denote the case where no file extension is present) and specify "No Extension" as the file type to associate with such extension:

assoc .="No Extension"

Now use the ftype command to specify the command to run when a file with no extension is clicked (the following assumes the latest version of Vim is installed in its default location on the C: drive):

ftype "No Extension"="C:\Program Files (x86)\Vim\vim74\gvim.exe" "%1"

Not the answer you're looking for? Browse other questions tagged or ask your own question.