vim-simple-todo


Ⅰ. 插件描述

Mappings to manage GitHub-like task lists

Ⅱ. 基本信息

创建日期:  2012-11-25
使用用户:  89
Github星:  124
插件作者:  Vital Kudzelka

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Simple todo in Vim

Maybe this is the smallest Vim plugin in the world. It adds some useful
mappings for manage simple todo lists (example below) and nothing more.

[x] Create plugin
[x] Add helpful documentation
[x] Publish to GitHub
[ ] Spread the word

Features

  • Support GitHub-like task lists:

    • [x] Works well with different markdown list markers, e.g. -, +, *.
    • [ ] So it’s easy to create tasks in issues or pull requests on GitHub
  • Visually selected tasks can be processed at once.
  • Each mapping is repeatable via . (require tpope/repeat).
  • Tick symbol is configurable, e.g.

    [y] Water
    [y] Bread
    [ ] Milk

Installation

Use your favorite installation method:

  • Tim Pope’s pathogen:

    cd ~/.vim/bundle
    git clone https://github.com/vitalk/vim-simple-todo
  • Junegunn Choi’s Plug (recommend):

    Plug 'vitalk/vim-simple-todo'
vim +PlugInstall +qall

Usage

All this mappings use the <leader> key and they work the same on NORMAL,
VISUAL and INSERT modes. The default <leader> is backslash (\), but I prefer to use the comma
as the <leader> key but feel free to set your own.

KeyHelp
<leader>iCreate a new todo under cursor
<leader>ICreate a new todo for current line
<leader>oCreate a new todo below current line
<leader>OCreate a new todo above current line
<leader>xMark todo under cursor as done
<leader>XMark todo as undone
<leader>sSwitch todo status for current line

Or even remap them to somethings more comfortable for you:

# Disable default key bindings
let g:simple_todo_map_keys = 0

# Map your keys
nmap <c-i> <Plug>(simple-todo-new)
imap <c-i> <Plug>(simple-todo-new)
# ...etc.

See :help simple-todo-maps for list of available <Plug> mappings.

You can also change the tick symbol to something else. Default is x.

let g:simple_todo_tick_symbol = 'y'

Issues

Don’t hesitate to open GitHub Issues for any bug or suggestions.

Copyright

Copyright © 2012 Vital Kudzelka. Use it for Good not Evil.

Distributed under the MIT license.

添加新评论