Vim Tips Wiki
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Vim Tips Wiki
1,649
pages
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
Editing
Associate files with no extension to Vim under Windows
Back to page
Edit
Edit source
View history
Talk (0)
Edit Page
Associate files with no extension to Vim under Windows
We recommend that you
log in
before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your
Watchlist
.
Creating an account
is quick and free.
The edit appears to have already been undone.
Anti-spam check. Do
not
fill this in!
{{TipImported |id=1301 |previous=1300 |next=1302 |created=2006 |complexity=basic |author=John Little |version=5.7 |rating=87/32 |category1=File Handling |category2=Windows }} For Windows users that use [[Windows 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: <pre> assoc .=txtfile </pre> Where txtfile has been defined as a file type that is opened with Vim. See [[VimTip1003]], and try <code>ftype /?</code> 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. {{RegistryWarning}} You can also use the Windows Registry to set up the extensionless file association. For example, by importing the following registry file (adjust for correct Vim version): <pre> Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.] [HKEY_CLASSES_ROOT\.\shell] [HKEY_CLASSES_ROOT\.\shell\open] [HKEY_CLASSES_ROOT\.\shell\open\command] @="\"C:\\Vim\\vim61\\gvim.exe\" \"%1\"" </pre> ==See also== *[[VimTip279]] for automatically launching Vim for files which may have an extension but have no file association. ==Comments==
Summary:
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Navigation
(
view source
)
Template:RegistryWarning
(
view source
)
Template:TipImported
(
view source
)
Follow on IG
TikTok
Join Fan Lab