vmail 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/NOTES CHANGED
@@ -42,7 +42,6 @@ Flag new messages. And position cursor correctly on a refresh.
42
42
 
43
43
 
44
44
 
45
-
46
45
  inputlist()
47
46
 
48
47
 
@@ -464,16 +463,12 @@ DONE
464
463
  - search for from kr
465
464
  - can't rely on mail.encoding to be non-nil
466
465
  - if html version, command to open
467
-
468
-
469
- next:
470
- - create another bin wrapper to start both daemon and client from same
466
+ - create wrapper exec to start both daemon and client from same
471
467
  window. redirect streams from daemon to a log file
472
- - can alter dep on command line opts
473
468
  - package gem
474
- - vmail-server
475
469
  - vmail (client)
476
- - try running as one wrapper process
470
+
471
+ next:
477
472
  - sending an attachment
478
473
  - can specify a directory, then all the items in the directory get
479
474
  attached and sent
@@ -2,6 +2,85 @@
2
2
 
3
3
  This project (soon to be documented) provides a Vim interface to Gmail.
4
4
 
5
+ This is an alpha version. To run it, you need vim or macvim.
6
+
7
+ To use this alpha version, you need to put a gmail.yml file in your home
8
+ directory.
9
+
10
+ The format of the yaml file is as follows:
11
+
12
+ username: dhchoi@gmail.com
13
+ password: mypassword
14
+ name: Daniel Choi
15
+ signature: |
16
+ --
17
+ Sent via vmail. http://danielchoi.com
18
+
19
+ vmail use the normal vim on your system by default. To use Macvim, invoke it as follows:
20
+
21
+ VMAIL_VIM=mvim vmail
22
+
23
+ There is no real documentation as of yet, but here are the raw vimscript mappings
24
+
25
+ ## From Message List Window:
26
+
27
+ inoremap <silent> <buffer> <cr> <Esc>:call <SID>complete_move_to_mailbox()<CR>
28
+ inoremap <silent> <buffer> <esc> <Esc>:q<cr>
29
+ inoremap <silent> <buffer> <cr> <Esc>:call <SID>select_mailbox()<CR>
30
+ inoremap <silent> <buffer> <esc> <Esc>:q<cr>
31
+ noremap! <silent> <buffer> <cr> <Esc>:call <SID>do_search()<CR>
32
+ noremap <silent> <buffer> <cr> :call <SID>show_message()<CR>
33
+ noremap <silent> <buffer> q :qal!<cr>
34
+ noremap <silent> <buffer> s :call <SID>toggle_star()<CR>
35
+ noremap <silent> <buffer> <leader>d :call <SID>delete_messages("Deleted")<CR>
36
+ noremap <silent> <buffer> <leader>! :call <SID>delete_messages("[Gmail]/Spam")<CR>
37
+ noremap <silent> <buffer> u :call <SID>update()<CR>
38
+ noremap <silent> <buffer> <Leader>s :call <SID>search_window()<CR>
39
+ noremap <silent> <buffer> <Leader>m :call <SID>mailbox_window()<CR>
40
+ noremap <silent> <buffer> <Leader>v :call <SID>move_to_mailbox()<CR>
41
+ noremap <silent> <buffer> <Leader>c :call <SID>compose_message()<CR>
42
+ noremap <silent> <buffer> <Leader>r :call <SID>show_message()<cr>:call <SID>compose_reply(0)<CR>
43
+ " reply all
44
+ noremap <silent> <buffer> <Leader>a :call <SID>show_message()<cr>:call <SID>compose_reply(1)<CR>
45
+
46
+
47
+ ## From Message Window:
48
+
49
+ noremap <silent> <buffer> <cr> :call <SID>focus_list_window()<CR>
50
+ noremap <silent> <buffer> <Leader>q :call <SID>focus_list_window()<CR>
51
+ noremap <silent> <buffer> q <Leader>q
52
+ noremap <silent> <buffer> <Leader>r :call <SID>compose_reply(0)<CR>
53
+ noremap <silent> <buffer> <Leader>a :call <SID>compose_reply(1)<CR>
54
+ noremap <silent> <buffer> <Leader>R :call <SID>show_raw()<cr>
55
+ noremap <silent> <buffer> <Leader>R :call <SID>show_raw()<cr>
56
+ noremap <silent> <buffer> <Leader>f :call <SID>compose_forward()<CR><cr>
57
+ noremap <silent> <buffer> <Leader>o yE :!open '<C-R>"'<CR><CR>
58
+ noremap <silent> <buffer> <leader>j :call <SID>show_next_message()<CR>
59
+ noremap <silent> <buffer> <leader>k :call <SID>show_previous_message()<CR>
60
+ noremap <silent> <buffer> <Leader>c :call <SID>compose_message()<CR>
61
+ noremap <silent> <buffer> <Leader>h :call <SID>open_html_part()<CR><cr>
62
+ nnoremap <silent> <buffer> q :close<cr>
63
+ nnoremap <silent> <buffer> <leader>d :call <SID>focus_list_window()<cr>:call <SID>delete_messages("Deleted")<cr>
64
+ nnoremap <silent> <buffer> s :call <SID>focus_list_window()<cr>:call <SID>toggle_star()<cr>
65
+ nnoremap <silent> <buffer> <Leader>m :call <SID>focus_list_window()<cr>:call <SID>mailbox_window()<CR>
66
+ nnoremap <silent> <buffer> <Leader>A :call <SID>save_attachments()<cr>
67
+
68
+
69
+ ## From Message Compose Window
70
+
71
+ noremap <silent> <buffer> <Leader>d :call <SID>deliver_message()<CR>
72
+ nnoremap <silent> <buffer> q :call <SID>cancel_compose()<cr>
73
+ nnoremap <silent> <buffer> <leader>q :call <SID>cancel_compose()<cr>
74
+ nnoremap <silent> <buffer> <Leader>s :call <SID>save_draft()<CR>
75
+
76
+ Other:
77
+
78
+ nnoremap <silent> <buffer> <Space> :call <SID>toggle_fullscreen()<cr>
79
+
80
+
81
+
82
+
83
+
5
84
  ## Open Source License
6
85
 
7
86
  The source code for vmail is governed by the MIT License, which reads as
@@ -17,7 +17,9 @@ module Vmail
17
17
 
18
18
  query = ARGV.empty? ? [100, 'ALL'] : nil
19
19
 
20
+
20
21
  buffer_file = "vmail-buffer.txt"
22
+ puts "using buffer file: #{buffer_file}"
21
23
  File.open(buffer_file, "w") do |file|
22
24
  file.puts server.search(*query)
23
25
  end
@@ -26,8 +28,15 @@ module Vmail
26
28
  # TODO
27
29
  # - mvim; move viewer.vim to new file
28
30
 
29
- vimscript = "viewer.vim"
30
- system("DRB_URI='#{drb_uri}' vim -S #{vimscript} #{buffer_file}")
31
+ vim = ENV['VMAIL_VIM'] || 'vim'
32
+ vimscript = File.expand_path("../vmail.vim", __FILE__)
33
+ vim_command = "DRB_URI='#{drb_uri}' #{vim} -S #{vimscript} #{buffer_file}"
34
+ puts vim_command
35
+ system(vim_command)
36
+
37
+ if vim == 'mvim'
38
+ DRb.thread.join
39
+ end
31
40
 
32
41
  File.delete(buffer_file)
33
42
 
@@ -43,3 +52,4 @@ module Vmail
43
52
  exit
44
53
  end
45
54
  end
55
+
File without changes
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi
@@ -53,6 +53,7 @@ files:
53
53
  - lib/contacts_extractor.rb
54
54
  - lib/gmail.rb
55
55
  - lib/vmail.rb
56
+ - lib/vmail.vim
56
57
  - lib/vmail/imap_client.rb
57
58
  - lib/vmail/message_formatter.rb
58
59
  - lib/vmail/string_ext.rb
@@ -68,7 +69,6 @@ files:
68
69
  - test/message_formatter_test.rb
69
70
  - test/test_helper.rb
70
71
  - test/time_format_test.rb
71
- - viewer.vim
72
72
  - vmail.gemspec
73
73
  - wrapper.rb
74
74
  has_rdoc: true