Ⅰ. 插件描述
experiments in a vim plugin for personal planningⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'mrtazz/vim-plan'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'mrtazz/vim-plan'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'mrtazz/vim-plan'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/mrtazz/vim-plan
Ⅳ. 文档说明
# vim-plan
VIM plugin that supports my planning workflow.
Overview
I use a planning process that is heavily inspired by the [Ink & Volt
planner][ink_volt] but is implemented with a bunch of markdown files in a git
- This plugin codifies easy access to often used files and the templating
- when opening them for the first time.
My files are stored in a path that is also configured as a vimwiki
and this plugin makes my planning process integrate nicely with vimwiki.
Usage
Default mappings
map <leader>pw :OpenWeekPlan<CR>
map <leader>pm :OpenMonthPlan<CR>
map <leader>py :OpenYearPlan<CR>
map <leader>pd :Today<CR>Plan folder layout:
Plan
├── 2018
│ ├── 01-January.md
│ ├── 02-February.md
│ ├── weeks
│ │ ├── 01.md
│ │ ├── 02.md
│ │ ├── 03.md
│ │ ├── 04.md
│ │ ├── 05.md
│ │ └── 06.md
│ └── year.mdTemplating
When opening a file that doesn't exist yet, vim-plan reads a template folder
to figure out if there is a template set for the file type. This is very
similar to how vim-stencil works. Valid template files areweek, month, or year.
When reading those templates in vim-plan will replace the following template
variables inline:
%%DATE%%with the current date of the format mm/dd/yyyy%%WEEKDAY%%with the name of weekday%%WEEKNUMBER%%with the number of the week%%YEAR%%with the current year yyyy%%MONTH%%with the name of the current month
Configuration
g:PlanPathconfigures location of the plan files (default:~/.plan/)g:PlanTemplatePathconfigures location of plan templates (default:~/.plan/templates/