小技巧: 在 Vimperator 中调用外部编辑器
若你使用 Vimperator,那么可以通过调用外部的文本编辑器来输入网页上文本框中的内容。Vimperator 的这项特性和 Firefox 扩展 It's All Text! 挺相似,不过后者不支持调用命令行下的文本编辑器,相较而言,Vimperator 的则更为实用。
设置方法
你只需设置 editor 选项即可,GVim 可设置为:
:set editor=gvim\ -f
如果你要使用 Vim,则可以这样设置:
:set editor=urxvt\ -e\ vim
要是你使用其他的终端,那么需要替换上述设置命令中的 urxvt。
你也可以将设置写入 Vimperator 的配置文件 $HOME/.vimperatorrc。
如何使用
很简单,定位到需要输入内容的文本框,按 Ctrl + i 组合键。一旦在 (G)Vim 中编辑完成,直接保存即可。
Read More:
嗯,是神器
嗯,挺好用的。 不过Vimperator在文本框里也可以用readline(?)的快捷键,比如^H, ^U什么的,所以留言之类的小规模输入原地进行也很方便。
不会用Vimperator
哦,可以不用装 It's All Text! 了。
X下用到鼠标的地方还是很多的,2.0beta的改进还是挺大的,原来牛速般的历史操作终于有所改进,喜欢尝鲜的可以用git版,虽然会有更多的不稳定因素
这样输入不是更麻烦吗?
不麻烦啊,比如你要编辑wiki,这样就相当方便
真是强悍阿!
Very Good!
为什么我总是不能发言?囧 我在文本框中按ctrl+i之后编辑的中文是乱码!
@alexsunmiu: 中文乱码?应该跟你的外部编辑器的编码配置有关。我用的 gVim,默认 utf8 编码,没有什么问题。
以前一直想在terminal下用vim来编辑,这下知道了,必须得加个-e选项,多谢分享! 另外,设置editor那里得用双引号把整句包起来或者\来escape空格吧?!
我在ubuntu 804下设置时如果使用双引号或者\会出现问题,反倒是直接设置 :set editor=gvi -f 没有问题,奇怪
可以的
vimperator 2.0 maybe will release on next weekend.
@ginkgo really? GOOD!
Martin Stubenschrott is the author of vimperator.
in the maillist he said below.
On Thu, Mar 19, 2009 at 5:18 AM, Kris Maglione wrote: > > I can't speak of a time table; I probably would have > > released 2.0 already.
Yeah, I guess it's time now. I wanted to wait for 3.1 (now 3.5) final compatibility, but we'll probably do a 2.1 anyway soon which can have that. I don't have time this weekend, but I will release 2.0 the next weekend (and submit it to AMo then).
@localizations: Yeah, I think we probably just add a "Localized versions" link just like we have a "Other versions" link and provide things like vimperator-2.0-jp.xpi.
The only problem is, that if you use them and use the auto-update, you'll get the english version, but that's ok for me - i'll write a big fat warning about that on the "Localized versions" HTML page. On the other hand, if we continue to do a 8-month release cycle it isn't a real problem anyway ;) (which i hope we don't, new released about every 2 months is what i aim for, but it all depends on the developers, as i really have little time currently).
Kris: Thanks for the mouseup patch, seems a little buggy (and should be mousedown after all), but i think something like that is a good idea probably.
Vimperator mailing list Vimperator@mozdev.org https://www.mozdev.org/mailman/listinfo/vimperator
如何设置在gvim的标签里打开?
老是重新打开一个gvim。。真的很不方便