vim-checklist


Ⅰ. 插件描述

Easily create and manipulate plain-text checklists

Ⅱ. 基本信息

创建日期:  2016-04-16
使用用户:  8
Github星:  21
插件作者:  Evan Salter

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'esalter-va/vim-checklist-today-cannot-touch'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'esalter-va/vim-checklist-today-cannot-touch'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'esalter-va/vim-checklist-today-cannot-touch'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-checklist

Easly create and manipulate plain-text checklists

screencast

Installation

Vim-Plug

Plug 'evansalter/vim-checklist'

You can adapt this to whichever plugin manager you use.

Usage

Creating a Checklist

You can create a checklist using any string for the checkbox, as long as it contains [ ] or [x]. For example, to start a GitHub Markdown checklist, type the following in a buffer:

- [ ] <OPTION 1 TEXT>

When you hit return, a new blank option will be created below:

- [ ] <OPTION 1 TEXT>
- [ ] 

You can either type the title of the next option, or if the list is complete, hit return again and the checkbox will be deleted.

Manipulating Checkboxes

You can toggle, enable, or disable a single checkbox:

  1. Put your cursor on a line containing a checkbox
  2. Execute one of the following commands, or if you have mappings for the commands (see Configuration), you can use those
:ChecklistToggleCheckbox
:ChecklistEnableCheckbox
:ChecklistDisableCheckbox

You can also toggle, enable, or disable a range of checkboxes by selecting a range of lines containing checkboxes using visual mode, then executing one of the above commands.

Configuration

Set up your mappings to toggle, enable, and disable checkboxes. Add the following lines to your .vimrc,
replacing the mappings with your own:

nnoremap <leader>ct :ChecklistToggleCheckbox<cr>
nnoremap <leader>ce :ChecklistEnableCheckbox<cr>
nnoremap <leader>cd :ChecklistDisableCheckbox<cr>
vnoremap <leader>ct :ChecklistToggleCheckbox<cr>
vnoremap <leader>ce :ChecklistEnableCheckbox<cr>
vnoremap <leader>cd :ChecklistDisableCheckbox<cr>

Ensure to create mappings for normal and visual modes. This allows you to manipulate either a single checkbox, or a range of checkboxes.

The default filetypes this plugin is enabled for are text and markdown. To set your own list of filetypes, add this line to your .vimrc:

let g:checklist_filetypes = ['filetype1', 'filetype2', ...]

Bugs/Requests

Feel free to create an issue if you come across something that doesn't work right, or if it breaks any of your other plugins. You may also create an issue if you would like to request a new feature for the plugin.

添加新评论