vmail 2.3.3 → 2.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/vmail.vim +35 -10
  2. data/lib/vmail/version.rb +1 -1
  3. metadata +11 -11
@@ -174,7 +174,7 @@ function! s:show_raw()
174
174
  endfunction
175
175
 
176
176
  function! s:focus_list_window()
177
- if bufwinnr(s:listbufnr) == winnr() && exists("s:syntax_coloring_set")
177
+ if bufwinnr(s:listbufnr) == winnr()
178
178
  return
179
179
  end
180
180
  let winnr = bufwinnr(s:listbufnr)
@@ -185,15 +185,6 @@ function! s:focus_list_window()
185
185
  else
186
186
  exec winnr . "wincmd w"
187
187
  endif
188
- " set up syntax highlighting
189
- if has("syntax")
190
- syn clear
191
- " colorize whole line
192
- syn match VmailBufferFlagged /^*.*/hs=s
193
- exec "hi def VmailBufferFlagged " . g:vmail_flagged_color
194
- let s:syntax_coloring_set = 1
195
- endif
196
- "
197
188
  " call feedkeys("\<c-l>") " prevents screen artifacts when user presses return too fast
198
189
  " turn this off though, because it causes an annoying flash
199
190
  endfunction
@@ -830,6 +821,7 @@ func! s:message_list_window_mappings()
830
821
  noremap <silent> <buffer> <c-k> :call <SID>show_previous_message_in_list()<cr>
831
822
  nnoremap <silent> <buffer> <Space> :call <SID>toggle_maximize_window()<cr>
832
823
  autocmd CursorMoved <buffer> :redraw
824
+ autocmd BufEnter,BufWinEnter <buffer> :call <SID>set_list_colors()
833
825
  endfunc
834
826
 
835
827
  func! s:compose_window_mappings()
@@ -850,6 +842,39 @@ func! s:global_mappings()
850
842
  noremap <silent> <leader>qq :qal!<cr>
851
843
  endfunc
852
844
 
845
+ func! s:set_list_colors()
846
+ syn clear
847
+ syn match vmailSizeCol /|\s\+\(< 1k\|\d*\(b\|k\|M\|G\)\)\s\+|/ contains=vmailSeperator contained
848
+ syn match vmailFirstCol /^.\{-}|/ nextgroup=vmailDateCol
849
+ syn match vmailFirstColAnswered /An/ contained containedin=vmailFirstCol
850
+ syn match vmailFirstColForward /\$F/ contained containedin=vmailFirstCol
851
+ syn match vmailFirstColNotJunk /No/ contained containedin=vmailFirstCol
852
+ syn match vmailDateCol /\s\+... \d\d \(\(\d\d:\d\d..\)\|\(\d\{4}\)\)\s\+|/ nextgroup=vmailFromCol contains=vmailSeperator
853
+ syn match vmailFromCol /\s.\{-}|\@=/ contained nextgroup=vmailFromSeperator
854
+ syn match vmailFromColEmail /<[^ ]*/ contained containedin=vmailFromCol
855
+ syn match vmailFromSeperator /|/ contained nextgroup=vmailSubject
856
+ syn match vmailSubject /.*\s\+/ contained contains=vmailSizeCol
857
+ syn match vmailSubjectRe /\cre:\|fwd\?:/ contained containedin=vmailSubject
858
+ syn match vmailSeperator /|/ contained
859
+ syn match vmailNewMessage /^\s*+.*/
860
+ syn match vmailStarredMessage /^\s*\*.*/
861
+ hi def link vmailFirstCol Comment
862
+ hi def link vmailDateCol Statement
863
+ hi def link vmailFromCol Identifier
864
+ hi def link vmailSizeCol Constant
865
+ hi def link vmailSeperator Comment
866
+ hi def link vmailFromSeperator vmailSeperator
867
+ hi def link vmailFromColEmail Comment
868
+ hi def link vmailSubjectRe Type
869
+ hi def link vmailFirstColSpec Number
870
+ hi def link vmailFirstColAnswered vmailFirstColSpec
871
+ hi def link vmailFirstColForward vmailFirstColSpec
872
+ hi def link vmailFirstColNotJunk vmailFirstColSpec
873
+ hi def link vmailSpecialMsg Special
874
+ hi def link vmailNewMessage vmailSpecialMsg
875
+ hi def link vmailStarredMessage vmailSpecialMsg
876
+ endfunc
877
+
853
878
  "TODO see if using LocalLeader and maplocalleader makes more sense
854
879
  let mapleader = ","
855
880
 
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '2.3.3'
2
+ VERSION = '2.3.4'
3
3
  end
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.3.3
4
+ version: 2.3.4
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: 2011-11-15 00:00:00.000000000Z
12
+ date: 2011-11-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mail
16
- requirement: &14362440 !ruby/object:Gem::Requirement
16
+ requirement: &83491330 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.2.12
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *14362440
24
+ version_requirements: *83491330
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: highline
27
- requirement: &14361720 !ruby/object:Gem::Requirement
27
+ requirement: &83491050 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.6.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *14361720
35
+ version_requirements: *83491050
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sequel
38
- requirement: &14361260 !ruby/object:Gem::Requirement
38
+ requirement: &83490580 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.24.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *14361260
46
+ version_requirements: *83490580
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sqlite3
49
- requirement: &14360800 !ruby/object:Gem::Requirement
49
+ requirement: &83490250 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 1.3.3
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *14360800
57
+ version_requirements: *83490250
58
58
  description: Manage your email with Vim
59
59
  email:
60
60
  - dhchoi@gmail.com
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project: vmail
135
- rubygems_version: 1.8.10
135
+ rubygems_version: 1.8.11
136
136
  signing_key:
137
137
  specification_version: 3
138
138
  summary: A Vim interface to Gmail