vimongous


Ⅰ. 插件描述

A Vim plugin for viewing MongoDB data

Ⅱ. 基本信息

创建日期:  2013-04-09
使用用户:  8
Github星:  6
插件作者:  Robert Mitchell

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Vimongous

Query your MongoDB data inside Vim

Vimongous is a Vim plugin for querying a MongoDB database from inside Vim. It relies on Venode for query execution.

Why?

  1. MongoDB lacks a decent multi-line query tool with the ability have multiple query windows open (think SQL Server Management Studio)
  2. Vim rocks and therefore constructing queries with it also rocks

Usage

Vimongous relies on a C #pragma-like syntax for setting the DSN for queries run in the current buffer.

After setting the //#dsn pragma, use Visual Mode to select the chunk of query text you want to run, and use <leader>mq (_M_ongo _Q_uery) to execute it.

I may potentially add additional options using the same syntax in the future (or feel free to add your own!).

Example

See the example query buffer below:

//#dsn mongodb://localhost/products

db.widgets.find({
    Name: /Widget/
})
.sort({
    Cdate: -1
})

添加新评论