Wikia

Vim Tips Wiki

View Source in IE6 using VIM

Talk0
1,610pages on
this wiki
Revision as of 20:13, March 11, 2009 by 69.156.8.25 (Talk)

Duplicate tip

This tip is very similar to the following:

These tips need to be merged – see the merge guidelines.

Tip 134 Printable Monobook Previous Next

created October 12, 2001 · complexity basic · author Eric Lee · version 6.0


View Source

On a Windows system, you can configure Internet Explorer 6.0 to use Vim to "View Source". Add the following to the registry. Change the path to the location where you installed Vim.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name]
@="C:\\vim\\vim60\\gvim.exe"
On Vista 64-bit

On Vista 64-bit, the path to use for the above registry key is slightly different:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name]
@="C:\\vim\\vim72\\gvim.exe"

Thanks to Josh Poley at Microsoft for this information!

HTML Editor

On a Windows system, you can configure Internet Explorer to use Vim as an HTML Editor.

This was originally tip #190 (removed from the Vim Tips wiki).

Following are two reg files, tested under Windows XP.

Microsoft documentation: http://msdn2.microsoft.com/en-us/library/Aa753633.aspx

Windows Registry Editor Version 5.00
; Set gvim as HTML editor in Internet Explorer 6.0.
; Vim version 6.0 on Windows XP.
; Save this file as iex-vim60.reg and double click it.

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

; 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 suffixes
;[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 (have 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"
Windows Registry Editor Version 5.00
; UNINSTALL gvim as HTML editor in Internet Explorer 6.0.
; Vim version 6.0 on Windows XP.
; Save this file as iex-vim60-uninstall.reg and double click it.

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

[-HKEY_CLASSES_ROOT\.htm\OpenWithList\Vim]

[-HKEY_CLASSES_ROOT\.html\OpenWithList\Vim]

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

Comments

IE requires an editor that can open files with embedded spaces. See VimTip118 which deals with defaulting the syntax to html and eating extra spaces.


Advertisement | Your ad here

Around Wikia's network

Random Wiki