Ⅰ. 插件描述
A vim plugin to take notes easilyⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'fmount/vim-notes-who-speaks'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'fmount/vim-notes-who-speaks'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'fmount/vim-notes-who-speaks'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/fmount/vim-notes
Ⅳ. 文档说明
Vim-Notes
Yet another note plugin for VIM
Working in progress...
__
Commands
| Command | Description |
|---|---|
| :Note _filename_ | This command creates a new Note buffer. This is saved in a new file inside the folder g:notes_folder (set to ~/.notes by default). If no extension is specified the new file will be created with '.note' and it will be processed in the editor using the markdown syntax highlighting. |
| :NoteList | Shows all the notes available inside the folder g:notes_folder |
| :NoteDelete _filename_ | Delete a note |
| :NoteAutoSaveToggle | Activate/Deactivate automatic save for the current .note buffer |
__
Parameters
| Parameter | Default Value | Description |
|---|---|---|
| g:notes_folder | ~/.notes | Folder containing the notes |
| g:notes_autosave | 0 | Enable/Disable the autosave of the notes |
| g:notes_autosave_time | 30 | Defines the minimum interval between 2 successive automatic saves |
| g:notes_compiler | markdown | Defines the compiler for note files |
| g:notes_export_folder | ~/.notes/md2html | Folder containing the exported notes |
| g:default_keymap | 1 | Load the default plugin keymap |
__
Editing key mapping
| Combination | Modes | Name function | Description |
|---|---|---|---|
| <_leader_> + [i | I / N | note-new-cbox-inline | Create a new checkbox inline |
| <_leader_> + [o | I / N | note-new-cbox-below | Create a new checkbox in the line below the current one |
| <_leader_> + [O | I / N | note-new-cbox-above | Create a new checkbox in the line above the current one |
| <_leader_> + [x | N | notes#toggle_checkbox | Toggle the state of the checkbox between done and undone ([x]/[ ]) |
__
Fast Export key mapping
| Combination | Modes | Name function | Description |
|---|---|---|---|
| <_leader_> + [e | N | notes#export | Export the current note buffer in a specified folder |
Key mapping override
The plugin sets by default all the described key mappings, but this can be easily disabled.
For instance, if you want your set of customized keybindings, you can just edit the vimrc as follows:
"Disable the default key mapping
let g:default_keymap = 0
"Apply your own key mapping
nmap <Leader>ni (note-new-cbox-inline)
nmap <Leader>ni (note-new-cbox-inline)
imap <Leader>ni (note-new-cbox-inline)
nmap <Leader>no (note-new-cbox-below)
imap <Leader>no (note-new-cbox-below)
nmap <Leader>nO (note-new-cbox-above)
imap <Leader>nO (note-new-cbox-above)
nmap <Leader>nx :call notes#toggle_checkbox(line('.'))<cr>
" Fast Export function
nmap <leader>ne :call notes#export() <cr>