vsh


Ⅰ. 插件描述

Store and replay shell sessions -- also output search/modification/undo/redo.

Ⅱ. 基本信息

创建日期:  2016-11-09
使用用户:  1
Github星:  11
插件作者:  Matthew Malcomson

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Vsh -- Run shell commands in a modifiable vim buffer

Neovim plugin for experimental shell sessions -- save a session for
later/others and search/modify output with the power of vim.

In neovim it is different to the :terminal command because it allows modifying
the buffer, it works on a normal file (that you save between sessions and can
then rerun all commands in), and you can run commands anywhere in the file.

It can also be thought of as an interactive version of script(1) -- interactive
because you can go back and modify what's stored while you work -- that
facilitates re-running the same session during reading.

Benefits are mainly around exploratory terminal sessions, where you want to

  1. Keep a clean record of what you did, for reproducability.

    • This often means removing output from intermediate informative commands.
  2. Search through and modify output of commands with the power of vim
  3. Write notes/annotations alongside commands for others to follow the action.
  4. Store and easily retrieve useful commands in other vsh files.

Some demos are provided in the links below.

Requires nvim version 0.2

Motivation video

Vsh motivation

Basic introduction

Vsh basics

Editing output

Editing output

Sending text

Sending text

Editing Files

Editing Files

"Remote editing" -- sort of

"Remote editing" -- sort of

Relative gf anywhere

Relative gf anywhere

添加新评论