vim-redis


Ⅰ. 插件描述

Experimental Redis plugin for Vim

Ⅱ. 基本信息

创建日期:  2013-05-22
使用用户:  2
Github星:  10
插件作者:  Junegunn Choi

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-redis

Redis plugin for Vim. (Why?)

  • Highlights Redis commands in .redis files
  • Allows you to execute Redis commands within Vim
"" Redis connection information
" let g:vim_redis_host = 'localhost'
" let g:vim_redis_port = '6379'
" let g:vim_redis_auth = 'xxx'

"" Output window on bottom (default: right)
" let g:vim_redis_output_position = 'b'

"" Paste command on output window
let g:vim_redis_paste_command = 1
let g:vim_redis_paste_command_prefix = '> '

" Execute Redis command on the current line
noremap <slient> <leader>re :RedisExecute<cr>

" Execute commands on multiple lines at once while in visual mode
vnoremap <slient> <leader>re :RedisExecuteVisual<cr>gv

" Clear output window
noremap <slient> <leader>rw :RedisWipe<cr>

" Close output window
noremap <slient> <leader>rq :RedisQuit<cr>

"" Mappings with connection info (host, port, auth)
" noremap  <slient> <leader>re :RedisExecute localhost 6379 xxx<cr>
" vnoremap <slient> <leader>re :RedisExecute localhost 6379 xxx<cr>gv

添加新评论