-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.md
83 lines (67 loc) · 2.57 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Introduction
==============
> use you ~~gmail~~ mailbox as your note place.
> when you use this plugin, your can send the current text to your mailbox(~~gmail~~), within the default inbox named "gnote",
the subject of your note will be your filename without suffix by default, so same filename(without suffix) will be in same dialogue. Just have a try, you'll get the effect.
Why I write this plugin
=======================
> I'd like to write note in my vim. I cannot imagine there is no vim when I am noting.
> So I write this.
Requirements
===============
* vim python2 support: vim-gnote is based on python2, so your vim should be builded with python2 support.
* markdown module of python
* mail account
> ~~gmail account~~~
> mail account which supports imap protocol
Configuration
===============
* account settings
> ~~let g:gnote_gmail_username="your gmail username"~~
> ~~let g:gnote_gmail_password="your gmail password"~~
```
let g:gnote_mail_host="imap host of your mail" (default is imap.google.com)
let g:gnote_mail_port="imap port of your mail" (default is 993)
let g:gnote_mail_username="your mail username"
let g:gnote_mail_password="your mail password"
let g:gnote_auto_convert_markdown=<1 or 0> (default is 0)
```
* change the default mailbox name (default is 'gnote')
> ~~let g:gnote_gmail_mailbox="NOTES"~~
```
let g:gnote_mail_mailbox="NOTES"
```
* keybord (you can also set the short cuts in your vim config), for example:
> ```
> map <leader>gn <esc>: call Gnote() <cr>
> ```
Config Example
==============
* assume you'd like to use google mail
```
let g:gnote_mail_username = "[email protected]"
let g:gnote_mail_password = "your google mail password"
let g:gnote_mail_mailbox = "mailbox name you prefer"
```
* assume you'd like to use qq mail
```
let g:gnote_mail_host = "imap.exmail.qq.com"
let g:gnote_mail_username = "[email protected]"
let g:gnote_mail_password = "your qq mail password"
let g:gnote_mail_mailbox = "mailbox name you prefer"
```
* if you want to auto convert the markdown to html format, please:
```
let g:gnote_auto_convert_markdown = 1
```
* other email
```just take above examples as reference, the imap settings can be found at the related official website```
Issue
=======
> cannot be used when using two-step verification for your google email.
> please set a special password for this plugin, here are the [step](https://support.google.com/accounts/answer/185833)
TODO
=======
> * [√] markdown support
> * attchment support
vim:tw=78:ts=8:ft=help:norl:noet:fen:fdl=0