FANDOM


m (comment)
(Move categories to tip template)
Line 8: Line 8:
 
|version=5.7
 
|version=5.7
 
|rating=87/32
 
|rating=87/32
  +
|category1=File Handling
  +
|category2=Windows
 
}}
 
}}
 
For Windows users that use file associations to [[Launch_files_in_new_tabs_under_Windows|automatically launch files in Vim]], a gem I've found is, in a command prompt window:
 
For Windows users that use file associations to [[Launch_files_in_new_tabs_under_Windows|automatically launch files in Vim]], a gem I've found is, in a command prompt window:
Line 45: Line 47:
   
 
: I log out and back in and it does work, pfffft, Windows O.o [[User:Carpetsmoker|Carpetsmoker]] 18:36, 13 April 2008 (UTC)
 
: I log out and back in and it does work, pfffft, Windows O.o [[User:Carpetsmoker|Carpetsmoker]] 18:36, 13 April 2008 (UTC)
 
[[Category:File Handling]]
 
[[Category:Windows]]
 

Revision as of 09:27, April 25, 2008

Tip 1301 Printable Monobook Previous Next

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.

You may need to logout and log back in before this will take effect.

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)


I log out and back in and it does work, pfffft, Windows O.o Carpetsmoker 18:36, 13 April 2008 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.