Skip to content

Instantly share code, notes, and snippets.

@wridgers
Created January 23, 2013 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wridgers/4608606 to your computer and use it in GitHub Desktop.
Save wridgers/4608606 to your computer and use it in GitHub Desktop.
@echo off
setlocal EnableDelayedExpansion
set EXT_LIST=(c cpp css h hs js pl py sh xml log markdown md text txt conf json)
ftype txtfile="C:\Program Files (x86)\Vim\vim73\gvim.exe" --remote-silent "%%1"
for %%e in %EXT_LIST% do (
assoc .%%e=txtfile
REG ADD "HKEY_CLASSES_ROOT\.%%e" /f /ve /d "txtfile"
REG ADD "HKEY_CLASSES_ROOT\.%%e" /f /v "Content Type" /d "text/plain"
REG ADD "HKEY_CLASSES_ROOT\.%%e" /f /v "PerceivedType" /d "text"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment