sponsor Vim development Vim logo Vim Book Ad

intermediate Tip #190: XP > I-Explorer > HTML Editor < REG files

 tip karma   Rating 56/17, Viewed by 4432 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   January 2, 2002 16:09      complexity:   intermediate
author:   Hal Atherton      as of Vim:   6.0

The issue is permitting other programs, besides NOTEPAD,
be the HTML editor under Internet Explorer.
(Adding "Edit" as a New Action in the publicly exposed
Files Types for HTM/L does NOT do the job.)

Given below are two REG files for vim.
Just cut 'em up where indicated.
They have been tested under Windows XP.


-------------------------------------------------------CUT HERE---------------
Windows Registry Editor Version 5.00

; GOAL: Set gvim as HTML editor in Internet Explorer 6.0
; Vim version : 6.0
; Windows version: XP
; EASY USAGE: name this file iex-vim60.reg and double click on it
; Hard Usage: IMPORT this file using REGEDIT.EXE found in c:\WINDOWS
; Last modified date : Dec 16, 2001

; gvim is expected in "C:\Program Files\Vim\vim60\gvim.exe"
; Be sure to also reset Explorer>Tools>Internet Options>Programs

; Microsoft documentation
; http://msdn.microsoft.com/workshop/browser/configuration/clientreg/clientregistrylayout.asp

; Add Vim in the list of supported HTML editors
[HKEY_CLASSES_ROOT\.htm\OpenWithList\Vim]

[HKEY_CLASSES_ROOT\.htm\OpenWithList\Vim\shell]

[HKEY_CLASSES_ROOT\.htm\OpenWithList\Vim\shell\edit]

[HKEY_CLASSES_ROOT\.htm\OpenWithList\Vim\shell\edit\command]
@="\"C:\\Program Files\\Vim\\vim60\\gvim.exe\" \"%1\""

; Do NOT add to .html, registry for .htm type suffices
;[HKEY_CLASSES_ROOT\.html\OpenWithList\Vim]

;[HKEY_CLASSES_ROOT\.html\OpenWithList\Vim\shell]

;[HKEY_CLASSES_ROOT\.html\OpenWithList\Vim\shell\edit]

;[HKEY_CLASSES_ROOT\.html\OpenWithList\Vim\shell\edit\command]
;@="\"C:\\Program Files\\Vim\\vim60\\gvim.exe\" \"%1\""


; OPTIONAL: Within Internet Explorer "View Source" with gvim
; but prefer to use Edit button (got to add this) on Toolbar
;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor]

;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name]
;@="C:\\Program Files\\Vim\\vim60\\gvim.exe"

; ============================================= EOF

-------------------------------------------------------CUT HERE---------------
Windows Registry Editor Version 5.00

; GOAL: UNINSTALL gvim as HTML editor in Internet Explorer 6.0
; Vim version : 6.0
; Windows version: XP
; EASY USAGE: name this file iex-vim60-uninstall.reg and double click on it
; Hard Usage: IMPORT this file using REGEDIT.EXE found in c:\WINDOWS
; Last modified date : Dec 16, 2001

; gvim is expected in "C:\Program Files\Vim\vim60\gvim.exe"
; Be sure to also reset Explorer>Tools>Internet Options>Programs

; Microsoft documentation
; http://msdn.microsoft.com/workshop/browser/configuration/clientreg/clientregistrylayout.asp


[-HKEY_CLASSES_ROOT\.htm\OpenWithList\Vim]

[-HKEY_CLASSES_ROOT\.html\OpenWithList\Vim]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor]


; ============================================= EOF
-------------------------------------------------------CUT HERE---------------

Happy Vimming...

 rate this tip  Life Changing Helpful Unfulfilling 

<< Make Ctrl-Backspace delete previous word (like GTK inputs) | Transposing >>

Additional Notes

Anonymous, January 2, 2002 17:52
When using vim to 'view source' from IE, you need to wrap it.

IE requires an editor that can open files with embedded spaces - see vimtip #118 for a windows scripting solution.
doug@polands.org, July 16, 2002 6:16
Can this be done in the Mozilla as well?
liuch@alum.rpi.edu, September 25, 2002 11:06
I am using opera as my web browser.  You can setup you source viewer program from opera.

www.opera.com
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to vim@vim.org after searching the archive. Help Bram help Uganda.
   
Sponsored by Web Concept Group Inc. SourceForge.net Logo