Ⅰ. 插件描述
Add "wrap terms in google I'm feeling lucky url" à la TextmateⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'mutewinter/gifl-speak-now'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'mutewinter/gifl-speak-now'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'mutewinter/gifl-speak-now'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/mutewinter/gifl
Ⅳ. 文档说明
# Gifl: Google I'm Feeling Lucky URL Grabber
Textmate sure was a swift kick in the ass for a lot of the editors:
bundles, integration, carpal-crucifying key bindings? Yet the old ways
remain seductive and in the expanse between Textmate 1.0 and Textmate
2.0 alpha, many found themselves picking up the tried-and-true editors
and moving them to meet up with features they liked about Textmate.
Lack of this feature was keeping my friend [Daniel
Miessler](http://danielmiessler.com/) from converting to Vim as his
blogging platform -- no more!
This plugin wraps a term set in a URL derived from the term's "I'm
feeling lucky" URL. This is great for blogging or referencing known /
famous URL identities.
Configuration
g:LuckyOutputFormat : set to "markdown" or "html" for link formatting
Examples
Notation
- <Leader> is
\ - * is cursor position
- | | denote visual selection areas
OK, the examples already
*lindsay lohan
\gifl2e
[lindsay lohan](http://www.myspace.com/lindsaylohan*)
alternatively:
*Zooey Deschanel # v2e
|Zooey Deschanel| # \gifl
[Zooey Deschanel](http://en.wikipedia.org/wiki/Zooey_Deschanel*)
If you like angle brackets:
:let g:LuckyOutputFormat='html'
*Bazinga! # \gifl$
<a target="_blank" rel="nofollow" href=http://www.urbandictionary.com/define.php?term=bazinga>Bazinga!</a>
Installation
I'm using this with Janus by Yehuda and Carl so
installation was super-easy:
`cd ~/.janus`
`git submodule add git://github.com/sgharms/GIFL.git gifl`
Restart Janus and you're good to go.
Status
Very, very, very alpha. Report issues here for me to repair.
Author
Thanks
Steve Losh: Author of [Learn Vimscript the
Hard Way](http://learnvimscriptthehardway.stevelosh.com/), which I
cribbed from to get this working.