vmail 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +19 -14
- data/lib/vmail.rb +1 -1
- data/lib/vmail.vim +308 -77
- data/lib/vmail/version.rb +1 -1
- metadata +48 -12
data/README.markdown
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# Vmail
|
2
2
|
|
3
|
-
Vmail is a Vim interface to Gmail.
|
3
|
+
Vmail is a Vim interface to Gmail.
|
4
4
|
|
5
5
|
[screenshots]
|
6
6
|
|
7
7
|
Why Vmail? Because some people are 1000 times more productive and happy in [Vim][vim]
|
8
|
-
than in any web browser or GUI program.
|
8
|
+
than in any web browser or GUI program.
|
9
9
|
|
10
10
|
[vim]:http://www.vim.org/
|
11
11
|
|
@@ -21,9 +21,9 @@ To install Ruby 1.9.2, I recommend using the [RVM Version Manager][rvm].
|
|
21
21
|
|
22
22
|
[rvm]:http://rvm.beginrescueend.com
|
23
23
|
|
24
|
-
The current version of Vmail assumes a Unix environment.
|
24
|
+
The current version of Vmail assumes a Unix environment.
|
25
25
|
|
26
|
-
Your Gmail account should be [IMAP-enabled][gmailimap].
|
26
|
+
Your Gmail account should be [IMAP-enabled][gmailimap].
|
27
27
|
|
28
28
|
[gmailimap]:http://mail.google.com/support/bin/answer.py?hl=en&answer=77695
|
29
29
|
|
@@ -61,7 +61,7 @@ during execution (see below).
|
|
61
61
|
|
62
62
|
To run Vmail, create a yaml file called `.vmailrc` and save it either in the
|
63
63
|
current directory (the directory from which you launch Vmail) or in your home
|
64
|
-
directory.
|
64
|
+
directory.
|
65
65
|
|
66
66
|
The `.vmailrc` file should look something like this. Substitute your own values.
|
67
67
|
|
@@ -153,7 +153,7 @@ from either window.
|
|
153
153
|
You can also use the standard Vim key sequence `C-w C-w`.
|
154
154
|
|
155
155
|
You can use `<C-j>` or `,j` from either split window to show the next message.
|
156
|
-
You can use `<C-k>` or `,k` to show the previous message.
|
156
|
+
You can use `<C-k>` or `,k` to show the previous message.
|
157
157
|
|
158
158
|
Vmail loads a certain number messages at a time, starting with the most recent.
|
159
159
|
If there are more messages that Vmail hasn't loaded, you'll see a line at the
|
@@ -169,7 +169,7 @@ Unread messages are marked with a `+` symbol.
|
|
169
169
|
|
170
170
|
To view the raw RFC822 version of a message, type `,R` while viewing the message.
|
171
171
|
|
172
|
-
## Starring, deleting, archiving, marking spam
|
172
|
+
## Starring, deleting, archiving, marking spam, marking read/unread
|
173
173
|
|
174
174
|
To star a message, put the cursor on it and type `,*`. (Note that the comma
|
175
175
|
before the * is part of the key sequence.) Starring a message copies it to the
|
@@ -186,10 +186,15 @@ moves it to the `all` mailbox.
|
|
186
186
|
To mark a message spam, put the cursor on it and type `,!`. This moves the
|
187
187
|
message to to the `spam` mailbox.
|
188
188
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
189
|
+
To mark a message as unread, put the cursor on it and type `U`.
|
190
|
+
|
191
|
+
To mark a message as read, put the curson on it and type `I`.
|
192
|
+
|
193
|
+
You can use visual selections in the message list when you star, delete, mark
|
194
|
+
as spam, mark as read, mark as unread or archive. Use `v` to start marking a
|
195
|
+
range of lines (the horizontal position of the cursor doesn't matter). Then
|
196
|
+
type any of the above commands to perform an action on all the messages you
|
197
|
+
selected.
|
193
198
|
|
194
199
|
To save you keystrokes, Vmail provides alternative key mappings for
|
195
200
|
`,*`, `,#`, and `,!`:
|
@@ -246,13 +251,13 @@ create it for you before performing a move or copy.
|
|
246
251
|
To start writing a new a email message, type `,c`. That's a comma followed by
|
247
252
|
the character 'c'.
|
248
253
|
|
249
|
-
To reply to a message, type `,r`.
|
254
|
+
To reply to a message, type `,r`.
|
250
255
|
|
251
|
-
To reply-all to a message, type `,a`.
|
256
|
+
To reply-all to a message, type `,a`.
|
252
257
|
|
253
258
|
To forward a message, type `,f`.
|
254
259
|
|
255
|
-
All these commands open a message composition window. At the top, you will see
|
260
|
+
All these commands open a message composition window. At the top, you will see
|
256
261
|
mail headers like this:
|
257
262
|
|
258
263
|
from: Daniel Choi <dhchoi@gmail.com>
|
data/lib/vmail.rb
CHANGED
@@ -29,7 +29,7 @@ module Vmail
|
|
29
29
|
|
30
30
|
vim = ENV['VMAIL_VIM'] || 'vim'
|
31
31
|
ENV['VMAIL_BROWSER'] ||= if RUBY_PLATFORM.downcase.include?('linux')
|
32
|
-
tools = ['gnome-open', 'kfmclient-exec', 'konqueror']
|
32
|
+
tools = ['gnome-open', 'kfmclient-exec', 'xdg-open', 'konqueror']
|
33
33
|
tool = tools.detect { |tool|
|
34
34
|
`which #{tool}`.size > 0
|
35
35
|
}
|
data/lib/vmail.vim
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
"=================================================
|
2
|
+
" File: vmail.vim
|
3
|
+
" Description: Vmail is a Vim interface to Gmail.
|
4
|
+
" Author: Daniel Choi
|
5
|
+
" ================================================
|
6
|
+
|
7
|
+
if exists("g:loaded_vmail") || &cp
|
8
|
+
finish
|
9
|
+
endif
|
10
|
+
let g:loaded_vmail = 1
|
11
|
+
|
1
12
|
if !exists("g:vmail_flagged_color")
|
2
13
|
let g:vmail_flagged_color = "ctermfg=green guifg=green guibg=grey"
|
3
14
|
endif
|
@@ -32,23 +43,19 @@ let s:show_help_command = s:client_script . "show_help"
|
|
32
43
|
let s:message_bufname = "current_message.txt"
|
33
44
|
|
34
45
|
function! VmailStatusLine()
|
35
|
-
return "%<%f\ " . s:mailbox . " " . s:query . "%r%=%-14.(%l,%c%V%)\ %P"
|
46
|
+
return "%<%f\ " . s:mailbox . " " . s:query . "%r%=%-14.(%l,%c%V%)\ %Y %P"
|
36
47
|
endfunction
|
37
48
|
|
38
49
|
function! s:create_list_window()
|
39
|
-
"setlocal bufhidden=delete
|
40
|
-
"setlocal buftype=nofile
|
41
50
|
setlocal nomodifiable
|
42
51
|
setlocal noswapfile
|
43
|
-
"setlocal nomodifiable
|
44
52
|
setlocal nowrap
|
45
53
|
setlocal nonumber
|
46
54
|
setlocal foldcolumn=0
|
47
55
|
setlocal nospell
|
48
|
-
" setlocal nobuflisted
|
49
56
|
setlocal textwidth=0
|
50
57
|
setlocal noreadonly
|
51
|
-
|
58
|
+
setl ft=mail
|
52
59
|
|
53
60
|
" let user set this
|
54
61
|
" setlocal cursorline
|
@@ -57,6 +64,7 @@ function! s:create_list_window()
|
|
57
64
|
let s:listbufname = bufname('%')
|
58
65
|
setlocal statusline=%!VmailStatusLine()
|
59
66
|
call s:message_list_window_mappings()
|
67
|
+
setlocal filetype=vmail
|
60
68
|
autocmd BufNewFile,BufRead *.txt setlocal modifiable
|
61
69
|
endfunction
|
62
70
|
|
@@ -245,6 +253,37 @@ function! s:update()
|
|
245
253
|
endif
|
246
254
|
endfunction
|
247
255
|
|
256
|
+
" function argument a:read: Represents the next state
|
257
|
+
" 0 means unread, 1 means read.
|
258
|
+
function! s:mark_as_read_unread(read) range
|
259
|
+
let uid_set = s:collect_uids(a:firstline, a:lastline)
|
260
|
+
let nummsgs = len(uid_set)
|
261
|
+
" decide whether to set messages to SEEN or UNSEEN
|
262
|
+
let action = (a:read ? " +" : " -") . "FLAGS"
|
263
|
+
" construct the imap command
|
264
|
+
let command = s:flag_command . shellescape(join(uid_set, ',')) . action . " SEEN"
|
265
|
+
" do the real imap flagging
|
266
|
+
let res = s:system_with_error_handling(command)
|
267
|
+
setlocal modifiable
|
268
|
+
let lnum = a:firstline
|
269
|
+
while lnum <= a:lastline
|
270
|
+
let line = getline(lnum)
|
271
|
+
if action ==# " +FLAGS"
|
272
|
+
let newline = substitute(line, '^*+', '* ', '')
|
273
|
+
let newline = substitute(newline, '^+ ', ' ', '')
|
274
|
+
else
|
275
|
+
let newline = substitute(line, '^ ', '+', '')
|
276
|
+
let newline = substitute(newline, '^\* ', '*+', '')
|
277
|
+
endif
|
278
|
+
call setline(lnum, newline)
|
279
|
+
let lnum += 1
|
280
|
+
endwhile
|
281
|
+
setlocal nomodifiable
|
282
|
+
write
|
283
|
+
redraw
|
284
|
+
echom nummsgs ." conversation(s) have been marked as unread."
|
285
|
+
endfunction
|
286
|
+
|
248
287
|
function! s:toggle_star() range
|
249
288
|
let uid_set = s:collect_uids(a:firstline, a:lastline)
|
250
289
|
let nummsgs = len(uid_set)
|
@@ -751,83 +790,277 @@ endfunc
|
|
751
790
|
" MAPPINGS
|
752
791
|
|
753
792
|
func! s:message_window_mappings()
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
nnoremap <
|
778
|
-
nnoremap <silent> <buffer> <Leader>B :call <SID>focus_list_window()<cr>:call <SID>move_to_mailbox(1)<CR>
|
779
|
-
|
780
|
-
nnoremap <silent> <buffer> <Leader>u :call <SID>focus_list_window()<cr>:call <SID>update()<CR>
|
781
|
-
nnoremap <silent> <buffer> u :call <SID>focus_list_window()<cr>:call <SID>update()<CR>
|
782
|
-
|
783
|
-
nnoremap <silent> <buffer> <Leader>m :call <SID>focus_list_window()<cr>:call <SID>mailbox_window()<CR>
|
784
|
-
nnoremap <silent> <buffer> <Leader>A :call <SID>save_attachments()<cr>
|
785
|
-
nnoremap <silent> <buffer> <Space> :call <SID>toggle_maximize_window()<cr>
|
786
|
-
noremap <silent> <buffer> <leader>vp :call <SID>focus_list_window()<cr>:call <SID>append_messages_to_file()<CR>
|
787
|
-
nnoremap <silent> <buffer> <Leader>s :call <SID>focus_list_window()<cr>:call <SID>search_query()<cr>
|
793
|
+
if !hasmapto('<Plug>VmailMessageWindow_FocusListWindow')
|
794
|
+
nmap <buffer> <CR> <Plug>VmailMessageWindow_FocusListWindow
|
795
|
+
endif
|
796
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_FocusListWindow <C-W>=:call <SID>focus_list_window()<CR>
|
797
|
+
|
798
|
+
if !hasmapto('<Plug>VmailMessageWindow_Reply')
|
799
|
+
nmap <buffer> <leader>r <Plug>VmailMessageWindow_Reply
|
800
|
+
endif
|
801
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_Reply :call <SID>compose_reply(0)<CR>
|
802
|
+
|
803
|
+
if !hasmapto('<Plug>VmailMessageWindow_ReplyToAll')
|
804
|
+
nmap <buffer> <leader>a <Plug>VmailMessageWindow_ReplyToAll
|
805
|
+
endif
|
806
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ReplyToAll :call <SID>compose_reply(1)<CR>
|
807
|
+
|
808
|
+
if !hasmapto('<Plug>VmailMessageWindow_ShowRaw')
|
809
|
+
nmap <buffer> <leader>R <Plug>VmailMessageWindow_ShowRaw
|
810
|
+
endif
|
811
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ShowRaw :call <SID>show_raw()<CR>
|
812
|
+
|
813
|
+
if !hasmapto('<Plug>VmailMessageWindow_Forward')
|
814
|
+
nmap <buffer> <leader>f <Plug>VmailMessageWindow_Forward
|
815
|
+
endif
|
816
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_Forward :call <SID>compose_forward()<CR>
|
788
817
|
|
818
|
+
if !hasmapto('<Plug>VmailMessageWindow_ShowNext')
|
819
|
+
nmap <buffer> <C-j> <Plug>VmailMessageWindow_ShowNext
|
820
|
+
nmap <buffer> <leader>j <Plug>VmailMessageWindow_ShowNext
|
821
|
+
endif
|
822
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ShowNext :call <SID>show_next_message()<CR>
|
823
|
+
|
824
|
+
if !hasmapto('<Plug>VmailMessageWindow_ShowPrev')
|
825
|
+
nmap <buffer> <C-k> <Plug>VmailMessageWindow_ShowPrev
|
826
|
+
nmap <buffer> <leader>k <Plug>VmailMessageWindow_ShowPrev
|
827
|
+
endif
|
828
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ShowPrev :call <SID>show_previous_message()<CR>
|
829
|
+
|
830
|
+
if !hasmapto('<Plug>VmailMessageWindow_ComposeMessage')
|
831
|
+
nmap <buffer> <leader>c <Plug>VmailMessageWindow_ComposeMessage
|
832
|
+
endif
|
833
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ComposeMessage :call <SID>compose_message()<CR>
|
834
|
+
|
835
|
+
if !hasmapto('<Plug>VmailMessageWindow_OpenHTML')
|
836
|
+
nmap <buffer> <leader>h <Plug>VmailMessageWindow_OpenHTML
|
837
|
+
endif
|
838
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_OpenHTML :call <SID>open_html_part()<CR>
|
839
|
+
|
840
|
+
if !hasmapto('<Plug>VmailMessageWindow_CloseWindow')
|
841
|
+
nmap <buffer> <leader>q <Plug>VmailMessageWindow_CloseWindow
|
842
|
+
endif
|
843
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_CloseWindow :call <SID>close_message_window()<CR>
|
844
|
+
|
845
|
+
if !hasmapto('<Plug>VmailMessageWindow_DeleteMessage')
|
846
|
+
nmap <buffer> <leader># <Plug>VmailMessageWindow_DeleteMessage
|
847
|
+
nmap <buffer> <leader>3 <Plug>VmailMessageWindow_DeleteMessage
|
848
|
+
endif
|
849
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_DeleteMessage :close<cr>:call <SID>focus_list_window()<CR>:call <SID>delete_messages("Deleted")<CR>
|
850
|
+
|
851
|
+
if !hasmapto('<Plug>VmailMessageWindow_ToggleStar')
|
852
|
+
nmap <buffer> <leader>* <Plug>VmailMessageWindow_ToggleStar
|
853
|
+
nmap <buffer> <leader>8 <Plug>VmailMessageWindow_ToggleStar
|
854
|
+
endif
|
855
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ToggleStar :call <SID>focus_list_window()<cr>:call <SID>toggle_star()<CR>
|
856
|
+
|
857
|
+
if !hasmapto('<Plug>VmailMessageWindow_MarkAsRead')
|
858
|
+
nmap <buffer> I <Plug>VmailMessageWindow_MarkAsRead
|
859
|
+
endif
|
860
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_MarkAsRead :call <SID>focus_list_window()<cr>:call <SID>mark_as_read_unread(1)<CR>
|
861
|
+
|
862
|
+
if !hasmapto('<Plug>VmailMessageWindow_MarkAsUnread')
|
863
|
+
nmap <buffer> U <Plug>VmailMessageWindow_MarkAsUnread
|
864
|
+
endif
|
865
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_MarkAsUnread :call <SID>focus_list_window()<cr>:call <SID>mark_as_read_unread(0)<CR>
|
866
|
+
|
867
|
+
if !hasmapto('<Plug>VmailMessageWindow_MarkAsSpam')
|
868
|
+
nmap <buffer> <leader>! <Plug>VmailMessageWindow_MarkAsSpam
|
869
|
+
nmap <buffer> <leader>1 <Plug>VmailMessageWindow_MarkAsSpam
|
870
|
+
endif
|
871
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_MarkAsSpam :close<cr>:call <SID>focus_list_window()<cr>:call <SID>delete_messages("spam")<CR>
|
872
|
+
|
873
|
+
if !hasmapto('<Plug>VmailMessageWindow_ArchiveMessage')
|
874
|
+
nmap <buffer> <leader>e <Plug>VmailMessageWindow_ArchiveMessage
|
875
|
+
endif
|
876
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ArchiveMessage :call <SID>focus_list_window()<cr>:call <SID>archive_messages()<CR>
|
877
|
+
|
878
|
+
if !hasmapto('<Plug>VmailMessageWindow_MoveToMailbox')
|
879
|
+
nmap <buffer> <leader>b <Plug>VmailMessageWindow_MoveToMailbox
|
880
|
+
endif
|
881
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_MoveToMailbox :call <SID>focus_list_window()<cr>:call <SID>move_to_mailbox(0)<CR>
|
882
|
+
|
883
|
+
if !hasmapto('<Plug>VmailMessageWindow_CopyToMailbox')
|
884
|
+
nmap <buffer> <leader>B <Plug>VmailMessageWindow_CopyToMailbox
|
885
|
+
endif
|
886
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_CopyToMailbox :call <SID>focus_list_window()<cr>:call <SID>move_to_mailbox(1)<CR>
|
887
|
+
|
888
|
+
if !hasmapto('<Plug>VmailMessageWindow_Update')
|
889
|
+
nmap <buffer> <leader>u <Plug>VmailMessageWindow_Update
|
890
|
+
endif
|
891
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_Update :call <SID>focus_list_window()<cr>:call <SID>update()<CR>
|
892
|
+
|
893
|
+
if !hasmapto('<Plug>VmailMessageWindow_SwitchMailBox')
|
894
|
+
nmap <buffer> <leader>m <Plug>VmailMessageWindow_SwitchMailBox
|
895
|
+
endif
|
896
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_SwitchMailBox :call <SID>focus_list_window()<cr>:call <SID>mailbox_window()<CR>
|
897
|
+
|
898
|
+
if !hasmapto('<Plug>VmailMessageWindow_SaveAttachment')
|
899
|
+
nmap <buffer> <leader>A <Plug>VmailMessageWindow_SaveAttachment
|
900
|
+
endif
|
901
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_SaveAttachment :call <SID>save_attachments()<CR>
|
902
|
+
|
903
|
+
if !hasmapto('<Plug>VmailMessageWindow_ToggleWindow')
|
904
|
+
nmap <buffer> <Space> <Plug>VmailMessageWindow_ToggleWindow
|
905
|
+
endif
|
906
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ToggleWindow :call <SID>toggle_maximize_window()<cr>
|
907
|
+
|
908
|
+
if !hasmapto('<Plug>VmailMessageWindow_AppendMessagesToFile')
|
909
|
+
nmap <buffer> <leader>vp <Plug>VmailMessageWindow_AppendMessagesToFile
|
910
|
+
endif
|
911
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_AppendMessagesToFile :call <SID>focus_list_window()<cr>:call <SID>append_messages_to_file()<CR>
|
912
|
+
|
913
|
+
if !hasmapto('<Plug>VmailMessageWindow_Search')
|
914
|
+
nmap <buffer> <leader>s <Plug>VmailMessageWindow_Search
|
915
|
+
endif
|
916
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_Search :call <SID>focus_list_window()<cr>:call <SID>search_query()<cr>
|
789
917
|
endfunc
|
790
918
|
|
791
919
|
func! s:message_list_window_mappings()
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
920
|
+
if !hasmapto('<Plug>VmailOpenMessage')
|
921
|
+
nmap <buffer> <CR> <Plug>VmailOpenMessage
|
922
|
+
nmap <buffer> <LeftMouse> <Plug>VmailOpenMessage
|
923
|
+
endif
|
924
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailOpenMessage :call <SID>show_message(0)<CR>
|
925
|
+
|
926
|
+
if !hasmapto('<Plug>VmailPreviewMessage')
|
927
|
+
nmap <buffer> l <Plug>VmailPreviewMessage
|
928
|
+
endif
|
929
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailPreviewMessage :call <SID>show_message(1)<CR>
|
930
|
+
|
931
|
+
if !hasmapto('<Plug>VmailExit')
|
932
|
+
nmap <buffer> <leader>q <Plug>VmailExit
|
933
|
+
endif
|
934
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailExit :qall!<CR>
|
935
|
+
|
936
|
+
if !hasmapto('<Plug>VmailToggleStar')
|
937
|
+
nmap <buffer> <leader>* <Plug>VmailToggleStar
|
938
|
+
xmap <buffer> <leader>* <Plug>VmailToggleStar
|
939
|
+
nmap <buffer> <leader>8 <Plug>VmailToggleStar
|
940
|
+
xmap <buffer> <leader>8 <Plug>VmailToggleStar
|
941
|
+
endif
|
942
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailToggleStar :call <SID>toggle_star()<CR>
|
943
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailToggleStar :call <SID>toggle_star()<CR>
|
944
|
+
|
945
|
+
if !hasmapto('<Plug>VmailMarkAsUnread')
|
946
|
+
nmap <buffer> U <Plug>VmailMarkAsUnread
|
947
|
+
xmap <buffer> U <Plug>VmailMarkAsUnread
|
948
|
+
endif
|
949
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMarkAsUnread :call <SID>mark_as_read_unread(0)<CR>
|
950
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailMarkAsUnread :call <SID>mark_as_read_unread(0)<CR>
|
951
|
+
|
952
|
+
if !hasmapto('<Plug>VmailMarkAsRead')
|
953
|
+
nmap <buffer> I <Plug>VmailMarkAsRead
|
954
|
+
xmap <buffer> I <Plug>VmailMarkAsRead
|
955
|
+
endif
|
956
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMarkAsRead :call <SID>mark_as_read_unread(1)<CR>
|
957
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailMarkAsRead :call <SID>mark_as_read_unread(1)<CR>
|
958
|
+
|
959
|
+
if !hasmapto('<Plug>VmailDelete')
|
960
|
+
nmap <buffer> <leader># <Plug>VmailDelete
|
961
|
+
xmap <buffer> <leader># <Plug>VmailDelete
|
962
|
+
nmap <buffer> <leader>3 <Plug>VmailDelete
|
963
|
+
xmap <buffer> <leader>3 <Plug>VmailDelete
|
964
|
+
endif
|
965
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailDelete :call <SID>delete_messages("Deleted")<CR>
|
966
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailDelete :call <SID>delete_messages("Deleted")<CR>
|
967
|
+
|
968
|
+
if !hasmapto('<Plug>VmailMarkAsSpam')
|
969
|
+
nmap <buffer> <leader>! <Plug>VmailMarkAsSpam
|
970
|
+
xmap <buffer> <leader>! <Plug>VmailMarkAsSpam
|
971
|
+
nmap <buffer> <leader>1 <Plug>VmailMarkAsSpam
|
972
|
+
xmap <buffer> <leader>1 <Plug>VmailMarkAsSpam
|
973
|
+
endif
|
974
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMarkAsSpam :call <SID>delete_messages("spam")<CR>
|
975
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailMarkAsSpam :call <SID>delete_messages("spam")<CR>
|
976
|
+
|
977
|
+
if !hasmapto('<Plug>VmailArchiveMessage')
|
978
|
+
nmap <buffer> <leader>e <Plug>VmailArchiveMessage
|
979
|
+
xmap <buffer> <leader>e <Plug>VmailArchiveMessage
|
980
|
+
endif
|
981
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailArchiveMessage :call <SID>archive_messages()<CR>
|
982
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailArchiveMessage :call <SID>archive_messages()<CR>
|
983
|
+
|
984
|
+
if !hasmapto('<Plug>VmailAppendMessagesToFile')
|
985
|
+
nmap <buffer> <leader>vp <Plug>VmailAppendMessagesToFile
|
986
|
+
xmap <buffer> <leader>vp <Plug>VmailAppendMessagesToFile
|
987
|
+
endif
|
988
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailAppendMessagesToFile :call <SID>append_messages_to_file()<CR>
|
989
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailAppendMessagesToFile :call <SID>append_messages_to_file()<CR>
|
990
|
+
|
991
|
+
if !hasmapto('<Plug>VmailUpdate')
|
992
|
+
nmap <buffer> u <Plug>VmailUpdate
|
993
|
+
endif
|
994
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailUpdate :call <SID>update()<CR>
|
995
|
+
|
996
|
+
if !hasmapto('<Plug>VmailSearch')
|
997
|
+
nmap <buffer> <leader>s <Plug>VmailSearch
|
998
|
+
endif
|
999
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailSearch :call <SID>search_query()<CR>
|
1000
|
+
|
1001
|
+
if !hasmapto('<Plug>VmailSwitchMailbox')
|
1002
|
+
nmap <buffer> <leader>m <Plug>VmailSwitchMailbox
|
1003
|
+
endif
|
1004
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailSwitchMailbox :call <SID>mailbox_window()<CR>
|
1005
|
+
|
1006
|
+
if !hasmapto('<Plug>VmailMoveToMailbox')
|
1007
|
+
nmap <buffer> <leader>b <Plug>VmailMoveToMailbox
|
1008
|
+
xmap <buffer> <leader>b <Plug>VmailMoveToMailbox
|
1009
|
+
endif
|
1010
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailMoveToMailbox :call <SID>move_to_mailbox(0)<CR>
|
1011
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailMoveToMailbox :call <SID>move_to_mailbox(0)<CR>
|
1012
|
+
|
1013
|
+
if !hasmapto('<Plug>VmailCopyToMailbox')
|
1014
|
+
nmap <buffer> <leader>B <Plug>VmailCopyToMailbox
|
1015
|
+
xmap <buffer> <leader>B <Plug>VmailCopyToMailbox
|
1016
|
+
endif
|
1017
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailCopyToMailbox :call <SID>move_to_mailbox(1)<CR>
|
1018
|
+
xnoremap <buffer> <unique> <script> <Plug>VmailCopyToMailbox :call <SID>move_to_mailbox(1)<CR>
|
1019
|
+
|
1020
|
+
if !hasmapto('<Plug>VmailComposeNew')
|
1021
|
+
nmap <buffer> <leader>c <Plug>VmailComposeNew
|
1022
|
+
endif
|
1023
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailComposeNew :call <SID>compose_message()<CR>
|
1024
|
+
|
1025
|
+
if !hasmapto('<Plug>VmailComposeReply')
|
1026
|
+
nmap <buffer> <Leader>r <Plug>VmailComposeReply
|
1027
|
+
endif
|
1028
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailComposeReply :call <SID>show_message(0)<CR>:call <SID>compose_reply(0)<CR>
|
1029
|
+
|
1030
|
+
if !hasmapto('<Plug>VmailComposeReplyAll')
|
1031
|
+
nmap <buffer> <Leader>a <Plug>VmailComposeReplyAll
|
1032
|
+
endif
|
1033
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailComposeReplyAll :call <SID>show_message(0)<CR>:call <SID>compose_reply(1)<CR>
|
1034
|
+
|
1035
|
+
if !hasmapto('<Plug>VmailForward')
|
1036
|
+
nmap <buffer> <Leader>f <Plug>VmailForward
|
1037
|
+
endif
|
1038
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailForward :call <SID>show_message(0)<CR>:call <SID>compose_forward()<CR>
|
1039
|
+
|
1040
|
+
if !hasmapto('<Plug>VmailShowNextMessage')
|
1041
|
+
nmap <buffer> <C-j> <Plug>VmailShowNextMessage
|
1042
|
+
endif
|
1043
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailShowNextMessage :call <SID>show_next_message_in_list()<CR>
|
1044
|
+
|
1045
|
+
if !hasmapto('<Plug>VmailShowPrevMessage')
|
1046
|
+
nmap <buffer> <C-k> <Plug>VmailShowPrevMessage
|
1047
|
+
endif
|
1048
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailShowPrevMessage :call <SID>show_previous_message_in_list()<CR>
|
1049
|
+
|
1050
|
+
if !hasmapto('<Plug>VmailToggleWindow')
|
1051
|
+
nmap <buffer> <Space> <Plug>VmailToggleWindow
|
1052
|
+
endif
|
1053
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailToggleWindow :call <SID>toggle_maximize_window()<cr>
|
1054
|
+
|
825
1055
|
autocmd CursorMoved <buffer> :redraw
|
826
|
-
autocmd
|
1056
|
+
autocmd FileType vmail :call <SID>set_list_colors()
|
827
1057
|
endfunc
|
828
1058
|
|
829
1059
|
func! s:compose_window_mappings()
|
830
|
-
|
1060
|
+
if !hasmapto('<Plug>VmailComposeWinClose')
|
1061
|
+
nmap <buffer> <leader>q <Plug>VmailComposeWinClose
|
1062
|
+
endif
|
1063
|
+
nnoremap <buffer> <unique> <script> <Plug>VmailComposeWinClose :call <SID>close_and_focus_list_window()<CR>
|
831
1064
|
setlocal ai
|
832
1065
|
command! -bar -nargs=1 -complete=file VMAttach call s:attach_file(<f-args>)
|
833
1066
|
endfunc
|
@@ -894,8 +1127,6 @@ call s:focus_list_window() " to go list window
|
|
894
1127
|
" send window width
|
895
1128
|
call s:system_with_error_handling(s:set_window_width_command . winwidth(1))
|
896
1129
|
|
897
|
-
"autocmd VimResized <buffer> call s:system_with_error_handling(s:set_window_width_command . winwidth(1))
|
898
|
-
|
899
1130
|
autocmd bufreadpost *.txt call <SID>turn_into_compose_window()
|
900
1131
|
normal G
|
901
1132
|
call s:system_with_error_handling(s:select_mailbox_command . shellescape(s:mailbox))
|
data/lib/vmail/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mail
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: 2.2.12
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.2.12
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: highline
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: 1.6.1
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.6.1
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: sequel
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: 3.24.1
|
44
54
|
type: :runtime
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.24.1
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: sqlite3
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ! '>='
|
@@ -54,7 +69,12 @@ dependencies:
|
|
54
69
|
version: 1.3.3
|
55
70
|
type: :runtime
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.3.3
|
58
78
|
description: Manage your email with Vim
|
59
79
|
email:
|
60
80
|
- dhchoi@gmail.com
|
@@ -133,8 +153,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
153
|
version: '0'
|
134
154
|
requirements: []
|
135
155
|
rubyforge_project: vmail
|
136
|
-
rubygems_version: 1.8.
|
156
|
+
rubygems_version: 1.8.23
|
137
157
|
signing_key:
|
138
158
|
specification_version: 3
|
139
159
|
summary: A Vim interface to Gmail
|
140
|
-
test_files:
|
160
|
+
test_files:
|
161
|
+
- test/address_quoter_test.rb
|
162
|
+
- test/base64_test.rb
|
163
|
+
- test/fixtures/euc-kr-header.eml
|
164
|
+
- test/fixtures/euc-kr-html.eml
|
165
|
+
- test/fixtures/google-affiliate.eml
|
166
|
+
- test/fixtures/htmlbody.eml
|
167
|
+
- test/fixtures/moleskine-html.eml
|
168
|
+
- test/fixtures/reply-template-encoding-test.eml
|
169
|
+
- test/fixtures/reply_all.eml
|
170
|
+
- test/fixtures/rfc_part.eml
|
171
|
+
- test/fixtures/textbody-nocontenttype.eml
|
172
|
+
- test/fixtures/with-attachments.eml
|
173
|
+
- test/message_formatter_test.rb
|
174
|
+
- test/reply_template_test.rb
|
175
|
+
- test/test_helper.rb
|
176
|
+
- test/time_format_test.rb
|