jekyll.vim


Ⅰ. 插件描述

Automate common Jekyll tasks from Vim

Ⅱ. 基本信息

创建日期:  2010-01-12
使用用户:  28
Github星:  83
插件作者:  Christopher Sexton

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'csexton/jekyll-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'csexton/jekyll-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'csexton/jekyll-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/csexton/jekyll.vim

Ⅳ. 文档说明

Jekyll.vim

jekyll.vim: Blogging from the command line should not be tedious.

This script is intended to automate the process of creating and editing Jekyll blog posts from within vim.

Introduction

Install in ~/.vim, you can use the rake task to do this quickly:

rake install

Set the path to your Jekyll Blog in your vimrc:

let g:jekyll_path = "/path/to/jekyll/blog"

The default post suffix is "markdown" and the post status is published. You
can override these if you like.

Example:

let g:jekyll_post_suffix = "textile"
let g:jekyll_post_published = "false"

You may also want to ad a few mappings to stream line the behavior:

map <Leader>jb  :JekyllBuild<CR>
map <Leader>jn  :JekyllPost<CR>
map <Leader>jl  :JekyllList<CR>

By default all posts are created as drafts (published: false in the YAML), to publish that post simply delete that line.

Commands

Build Jekyll site:

:JekyllBuild

List Jekyll posts:

:JekyllList

Create a new Jekyll Post:

:JekyllPost

If you are using git to store your blog, consider installing Tim Pope's vim-fugitive plugin. It allows you to use the following commands to speed things up.

Add and commit the current post:

:Gwrite
:Gcommit

Push the changes to the remote origin:

:Git push

LICENSE

License: Same terms as Vim itself (see license)

:-)

添加新评论