vimblog


Ⅰ. 插件描述

A Vim plugin for managing a Wordpress blog.

Ⅱ. 基本信息

创建日期:  2011-03-18
使用用户:  9
Github星:  39
插件作者:  Daniel Miessler

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# About

This is a fork of the VimRepress project, located at http://www.vim.org/scripts/script.php?script_id=3510.

VimBlog is a plugin for managing a Wordpress blog using Vim. There are many similar plugins, but most are no longer being developed.

Requirements

  • Vim 7.3+ with python 2.6/2.7 support
  • Python Environment matched wtih Vim's support
  • python-markdown/python-markdown2 installed
  • Wordpress 3.0.0 +

Installation

  1. Clone ths repository into your Vim environment's plugin directory
  2. Create a ~/.vimrepressrc file, and put the following in it

blog_url = http://yoursite.com/

username = you

password = goodpassword

Command Examples

Some commands list above contain special usage, example below may clearify them for you.

:BlogList             -  List 30 recent posts. 
:BlogList page        -  List 30 recent pages. 
:BlogList post 100    -  List 100 recent posts. 

:BlogNew post         -  Write an new post. 
:BlogNew page         -  Write an new page. 

:BlogSave             -  Save (defautely published.) 
:BlogSave draft       -  Save as draft. 

:BlogPreview local    -  Preview page/post locally in your browser. 
:BlogPreview publish  -  Same as `:BlogSave publish' with brower opened. 

:BlogOpen 679 
:BlogOpen http://your-first-blog.com/archives/679 
:BlogOpen http://your-second-blog.com/?p=679 
:BlogOpen http://your-third-blog.com/with-your-custom-permalink 

Modifications

I have made a number of changes (hence the name change) to make it more functional for me, including the following:

  • I removed the prompt for editing or deleting posts, and am using a command to skip those steps during blogging workflow (see below)
  • I moved the post type from Markdown to HTML because I have Wordpress doing Markdown conversion on the server side

Commands

I set up a few shortcuts that I use during day-to-day blogging:

Starting workflow

From the shell I launch these two character shortcuts to begin blogging immediately.

  • alias nb="vim +BlogNew
  • alias eb="vim +BlogList

Inside Vim

Once inside Vim I can run these.

  • nnoremap <leader>b :BlogSave publish<CR>
  • nnoremap <leader>h :set ft=HTML<CR><CR>

Credits

All credit to Pentie for creating VimRepress, which this is based on.

添加新评论