scratch.vim


Ⅰ. 插件描述

Unobtrusive scratch window

Ⅱ. 基本信息

创建日期:  2013-07-19
使用用户:  379
Github星:  303
插件作者:  Matthieu Monsch

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'mtth/scratch-vim-safe-and-sound'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'mtth/scratch-vim-safe-and-sound'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'mtth/scratch-vim-safe-and-sound'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

.. default-role:: code

Scratch.vim

Unobtrusive scratch window. Inspired by scratch.vim_, enhanced.

.. image:: doc/scratch.png
:align: center

Features

  • Scratch window automatically hides when inactive.
  • Mappings allow easy note taking and selection pasting directly into the
    scratch buffer.
  • Optional persistence across sessions.

Quickstart

  • :Scratch opens a scratch buffer in a new window (by default using the top
    20% of the screen, configurable via g:scratch_height and g:scratch_top).

The window automatically closes when inactive (and its contents will be
available the next time it is opened).

  • gs in normal mode opens the scratch window and enters insert mode. The
    scratch window closes when you leave insert mode. This is especially useful

for quick notes.

  • gs in visual mode pastes the current selection (character-wise, line-wise
    or block-wise) into the scratch buffer.

Both above mappings have a gS variant that clears the scratch buffer before
opening it. Note also that the auto-closing features require hidden to be set
(and can be disabled via the g:scratch_autohide option).

By default the contents of the scratch window are lost when leaving Vim. To
enable cross-session persistence, set the g:scratch_persistence_file option
to a valid file path.

See :help Scratch for the full list of configuration options and more details
on each.

Installation

With Pathogen.vim_:

.. code:: bash

git clone https://github.com/mtth/scratch.vim ~/.vim/bundle/scratch

With Vundle.vim_:

.. code:: viml

Plugin 'mtth/scratch.vim'

With NeoBundle.vim_:

.. code:: viml

NeoBundle 'mtth/scratch.vim'

Otherwise simply copy the folders into your .vim directory.

.. _pathogen.vim: https://github.com/tpope/vim-pathogen
.. _scratch.vim: https://github.com/vim-scripts/scratch.vim
.. _vundle.vim: https://github.com/gmarik/Vundle.vim
.. _neobundle.vim: https://github.com/Shougo/neobundle.vim

添加新评论