2005年2月11日星期五

Vim Tip #118: Configure gVim as Internet Explorer 'View Source' editor

http://vim.sourceforge.net/tips/tip.php?tip_id=118

The reason:
- Hated it when the file was "Too big for notepad" :)
- syntax highlighting

Key point:
1. How to make gvim the IE's 'View source' editor
2. How to let it auto syntax higlighting, as the temporary file might has no extension.

Answers:
1.
REGEDIT4 [HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerView
Source EditorEditor Name]
@="c:Program Filesvimgvim.vbs"
Here's
another problem: "Unfortunately, you can't specify a quoted filename
argument here, i.e. "%1". The editor specified is supposed to handle
filenames which contain spaces(which come from 'Temporary Internet
Files') ."(seems that IE6 doesn't have this limitation). Thus we
need a vbs wrapper (or a shortcut with arguments specified) to quote
the argument.

2. gvim -c syntax=html

Powered by ScribeFire.

没有评论: