Ⅰ. 插件描述
Fast, lightweight and super awesome Gist support from...The Fist of Vim™!Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ajh17/fist-of-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ajh17/fist-of-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ajh17/fist-of-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ajh17/vim-fist
Ⅳ. 文档说明
# Fist of Vim
Fast, simple and super awesome Gist-ing for Vim.
If there were any more superlatives, I would be charging for this!
Dependencies
- gist - "Potentially the best command
line gister"
Install and configure it by running:
[sudo] gem install gist && gist --login
Install
If you use Vim 8 or better, simply copy and paste:
git clone git://github.com/ajh17/vim-fist.git ~/.vim/pack/vendor/start/vim-fist
Once the helptags have been generated (:helptags ALL), see :h vim-fist
for usage.
Usage
Only breathing is easier than using Fist of Vim.
Fist of Vim defines these super simple mappings by default:
<leader>p - Create a new Gist
<leader>u - Update an existing Gist
<leader>l - List your public Gists
You can use create or update a Gist with a visual selection, or in normal mode,
in which case, it is motion based.
For example, in normal mode, <leader>pG will create a new Gist from the
cursor to the end of file. In visual mode, you can simply select and then hit<leader>p to create a new Gist.
Fist of Vim also sets the filetype and syntax completely automatically without
you having to set it!
As the philosopher, Staples Inc., once said, "That was easy!"
Custom Maps
Fist of Vim allows you to choose the Fist to hold the gavel with. In other
words, you can assign your own maps for these:
<plug>fov_new - Create a new Gist (normal mode)
<plug>fov_update - Update a Gist (normal mode)
<plug>fov_visual_new - Create a new Gist (visual mode)
<plug>fov_visual_update - Update a Gist (visual mode)
<plug>fov_list - List your Gists.
Example: nmap <leader>f <plug>fov_new.
Configuration
Fist of Vim offers these hilariously named variables so it can be configured to
your exacting standards:
g:fist_opens_browser - Open the new/updated Gist in the browser.
g:fist_in_private - Create a secret Gist
g:fist_no_maps - Don't define any mappings automatically.
g:fist_dispatch - When listing Gists, do it asynchronously.
FAQ
What is the deal with the name "Fist"?
Taken from "Fast Gist for Vim that is simply the bee's
knees". Or because "gisty" was too good and was already taken. Or because
the Author racked his brain and couldn't think of anything else. You get to
decide! Either way, Fist of Vim was born!
License
Copyright (c) Akshay Hegde. Distributed under the same terms as Vim itself. See:help license