Ⅰ. 插件描述
vim task pluginⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'samsonw/vim-task'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'samsonw/vim-task'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'samsonw/vim-task'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/samsonw/vim-task
Ⅳ. 文档说明
## Overview
Basically, this is the TextMate Tasks Bundle port for Vim.
ScreenShot
Vim-Task in Action
Vim-Task with Monaco font
Vim-Task with Consolas font (which support bold & italic)
Installation
Normal installation steps follow the vim tradition: download the zip/tar archive then copy all the directories/files to ~/.vim directory. You can download vim-task zip/tar archive by clicking the “Download Source” button in github.
You can also check out the latest code if you have git installed:
$ git clone git://github.com/samsonw/vim-task.git
$ cd vim-task
$ rm README.mkd
$ cp -rv * ~/.vim
For those guys who use pathogen, the installation should be as simple as a git clone:
$ cd ~/.vim/bundle
$ git clone git://github.com/samsonw/vim-task.git
Shortcut Key, Key Binding & Customization
By default, I mapped Ctrl+Command+Enter for toggling task status, you can simply remap to what’s the most comfortable for you:
inoremap <silent> <buffer> <C-D-CR> <ESC>:call Toggle_task_status()<CR>i
noremap <silent> <buffer> <C-D-CR> :call Toggle_task_status()<CR>
Note, if you find the key binding doesn’t work as expect, please make sure your vim instance was compiled with the +ruby feature.
Compiled with +ruby is not required any more, following +ruby check is optional since this plugin has already been ported to native vim script.
$ vim --version | grep +ruby
-python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent
File Format & Syntax
The Tasks grammar and commands by default apply to file todo.txt and files with the .task and .tasks extensions. You can customize this by editing ftdetect/task.vim:
autocmd BufNewFile,BufRead todo.txt,*.task,*.tasks setfiletype task
All the formats and syntax is similar with the TextMate Tasks bundle, I just quoted below for your references:
Headers end with a colon (“:”). Pending (uncompleted) tasks start with a hyphen (“-”). Completed tasks start with a checkmark (“✓”). Headers and tasks can be indented for grouping/hierarchy, as seen in the screenshot above.
Bug & Feedback
Please report bugs and issues to github: http://github.com/samsonw/vim-task/issues, any feedback and suggestion is welcome and appreciated.


