created August 10, 2006 · complexity basic · author John Little · version 5.7
For Windows users that use file associations to automatically launch files in Vim, a gem I've found is, in a command prompt window:
assoc .=txtfile
Where txtfile has been defined as a file type that is opened with Vim. See VimTip1003, and try ftype /? at the command prompt.
This will cause files with no extension (e.g. "Makefile") to open automatically in Vim.
Comments
This doesn't seem to work for me.
I've set ftype:
C:\>ftype | grep txtfile txtfile="C:\Program Files\Vim\vim71\gvim.exe"
Then I set assoc:
C:\>assoc | grep .=txt .=txtfile
This method does work for file extensions (.abcd) but not for extension-less files, I still get the "Open with ..." dialog.
What does work for me is:
C:\>assoc *=txtfile
I'm not a Windows expert, but AFAIK this is the correct method for associating files without an extension.
Does anyone know how these two are different?
Carpetsmoker 18:00, 13 April 2008 (UTC)