About: Use gvim to view page source in Internet Explorer   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

This method was tested using Vim 6.2 on Win2K and Vim 6.1 on Win98. Also using Vim 7.3 on WinXP. Within the registry, you can specify the source editor to be used by Internet Explorer when View|Source is selected. Unfortunately, you can't specify a quoted filename argument here, i.e. "%1". The editor specified is supposed to handle filenames which contain spaces. This will cause problems for Vim because Vim treats each space as an argument separator. If an unquoted filename contains spaces, Vim treats the filename as multiple arguments and will open multiple files instead of one. To workaround this problem a quoted filename has to be passed to Vim. This can be done by creating the following Visual Basic Script file gVim.vbs:

AttributesValues
rdfs:label
  • Use gvim to view page source in Internet Explorer
rdfs:comment
  • This method was tested using Vim 6.2 on Win2K and Vim 6.1 on Win98. Also using Vim 7.3 on WinXP. Within the registry, you can specify the source editor to be used by Internet Explorer when View|Source is selected. Unfortunately, you can't specify a quoted filename argument here, i.e. "%1". The editor specified is supposed to handle filenames which contain spaces. This will cause problems for Vim because Vim treats each space as an argument separator. If an unquoted filename contains spaces, Vim treats the filename as multiple arguments and will open multiple files instead of one. To workaround this problem a quoted filename has to be passed to Vim. This can be done by creating the following Visual Basic Script file gVim.vbs:
Version
  • 5(xsd:double)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 117(xsd:integer)
Category
  • Windows
Author
  • Freddy Vulto
Complexity
  • basic
Created
  • 2001-09-16(xsd:date)
ID
  • 118(xsd:integer)
NEXT
  • 119(xsd:integer)
Rating
  • 486(xsd:integer)
abstract
  • This method was tested using Vim 6.2 on Win2K and Vim 6.1 on Win98. Also using Vim 7.3 on WinXP. Within the registry, you can specify the source editor to be used by Internet Explorer when View|Source is selected. Unfortunately, you can't specify a quoted filename argument here, i.e. "%1". The editor specified is supposed to handle filenames which contain spaces. This will cause problems for Vim because Vim treats each space as an argument separator. If an unquoted filename contains spaces, Vim treats the filename as multiple arguments and will open multiple files instead of one. To workaround this problem a quoted filename has to be passed to Vim. This can be done by creating the following Visual Basic Script file gVim.vbs: 'gVim.vbs 'function: Start gvim, combining multiple arguments to single file argument. 'changes: 20010905: Quoted 'oWShell.Run' filename argument, allowing spaces. ' 20010518: Created. 'author: Freddy Vulto option explicit dim oWShell, sArg, sFile set oWShell = CreateObject("wscript.shell") ' Loop through arguments for each sArg in wscript.arguments sFile = sFile & sArg & " " next sFile = Trim(sFile) ' Run Vim with file argument and additional arguments: ' -R: View file readonly ' -c "set syntax=html": Use HTML syntax-highlighting oWShell.Run _ """d:\program files\vim\vim60\gvim.exe """ & _ "-R """ & sFile & """ " & _ "-c ""set syntax=html""" & _ "-c ""set filetype=html""" ' Destroy script object set oWShell = NOTHING The source editor now can be specified by adding the following key to the registry: HKEY_LOCAL_MACHINE Software Microsoft Internet Explorer View Source Editor Editor Name (Default) = D:\Programs\Vim\gvim.vbs
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software