Improve lightline colorscheme

diff --git a/dot.vimrc b/dot.vimrc
index 45e2038..c1afba8 100644
--- a/dot.vimrc
+++ b/dot.vimrc
@@ -1522,15 +1522,44 @@ let g:syntastic_json_checkers = ['jsonlint']

 " lightline  "{{{2
+let s:base04 = [ '#fdf6e3', 230 ]
+let s:base03 = [ '#002b36', 234 ]
+let s:base02 = [ '#073642', 235 ]
+let s:base01 = [ '#586e75', 240 ]
+let s:base00 = [ '#657b83', 245  ]
+let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
+let s:p.normal.left = [ [ s:base04, s:base01 ], [ s:base03, s:base00 ] ]
+let s:p.inactive.left =  [ [ s:base00, s:base02 ], [ s:base00, s:base02 ] ]
+let s:p.normal.right = [ [ s:base00, s:base02 ], [ s:base00, s:base01 ] ]
+let s:p.inactive.right = [ [ s:base02, s:base02 ], [ s:base02, s:base02 ] ]
+let s:p.normal.middle = [ [ s:base02, s:base00 ] ]
+let s:p.inactive.middle = [ [ s:base00, s:base02 ] ]
+
+function! s:flatten(p)
+  for k in values(a:p)
+    for l in values(k)
+      for m in range(len(l))
+        let l[m] = [l[m][0][0], l[m][1][0], l[m][0][1], l[m][1][1]]
+      endfor
+    endfor
+  endfor
+  return a:p
+endfunction
+let g:lightline#colorscheme#hogehoge#palette = s:flatten(s:p)
+
 let g:lightline = {
-      \ 'colorscheme': 'solarized',
+      \ 'colorscheme': 'hogehoge',
       \ 'active': {
-      \   'left': [ [ 'mode', 'paste' ],
-      \             [ 'readonly', 'modified', 'filename' ] ],
-      \   'right': [ [ 'lineinfo' ],
-      \              [ 'percent' ],
+      \   'left': [ [ 'paste', 'readonly', 'modified' ],
+      \             [ 'filename' ] ],
+      \   'right': [ [ 'percent' ],
+      \              [ 'lineinfo' ],
       \              [ 'fugitive', 'fileformat', 'fileencoding', 'filetype' ] ]
       \ },
+      \ 'inactive': {
+      \   'left': [ [ 'readonly', 'modified', 'filename' ] ],
+      \   'right': [ ]
+      \ },
       \ 'component': {
       \   'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
       \   'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'

[from now] 2013/09/10 02:13:54

diff --git a/dot.vimrc b/dot.vimrc
index c1afba8..8c25d70 100644
--- a/dot.vimrc
+++ b/dot.vimrc
@@ -1527,14 +1527,19 @@ let s:base03 = [ '#002b36', 234 ]
 let s:base02 = [ '#073642', 235 ]
 let s:base01 = [ '#586e75', 240 ]
 let s:base00 = [ '#657b83', 245  ]
+let s:green = [ '#859900', 64 ]
+let s:red = [ '#dc322f', 160 ]
+let s:orange = [ '#cb4b16', 166 ]
 let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
 let s:p.normal.left = [ [ s:base04, s:base01 ], [ s:base03, s:base00 ] ]
 let s:p.inactive.left =  [ [ s:base00, s:base02 ], [ s:base00, s:base02 ] ]
+let s:p.insert.left = [ [ s:base04, s:green ], [ s:base03, s:base00 ] ]
+let s:p.replace.left = [ [ s:base04, s:red ], [ s:base03, s:base00 ] ]
+let s:p.visual.left = [ [ s:base04, s:orange ], [ s:base03, s:base00 ] ]
 let s:p.normal.right = [ [ s:base00, s:base02 ], [ s:base00, s:base01 ] ]
 let s:p.inactive.right = [ [ s:base02, s:base02 ], [ s:base02, s:base02 ] ]
-let s:p.normal.middle = [ [ s:base02, s:base00 ] ]
+let s:p.normal.middle = [ [ s:base03, s:base00 ] ]
 let s:p.inactive.middle = [ [ s:base00, s:base02 ] ]
-
 function! s:flatten(p)
   for k in values(a:p)
     for l in values(k)
@@ -1554,7 +1559,7 @@ let g:lightline = {
       \             [ 'filename' ] ],
       \   'right': [ [ 'percent' ],
       \              [ 'lineinfo' ],
-      \              [ 'fugitive', 'fileformat', 'fileencoding', 'filetype' ] ]
+      \              [ 'fugitive', 'fileencoding', 'fileformat', 'filetype' ] ]
       \ },
       \ 'inactive': {
       \   'left': [ [ 'readonly', 'modified', 'filename' ] ],