From 56ad2f8c242d2e7f5237c42a7fcb547b459d8668 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Mon, 8 Jul 2013 12:50:10 +0100 Subject: [PATCH 1/2] Added replace mode extension --- autoload/airline.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/airline.vim b/autoload/airline.vim index 495bafb..c6bfac4 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -136,6 +136,9 @@ function! airline#update_highlight() if &paste call add(l:mode, 'paste') endif + if l:m ==# "R" + call add(l:mode, 'replace') + endif if &previewwindow call add(l:mode, 'preview') endif From 17b7d187b83167fbb9ae2ab12d2fc52ad3d06abf Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Mon, 8 Jul 2013 12:51:01 +0100 Subject: [PATCH 2/2] Added paste and replace mode colourings to themes --- autoload/airline/themes/badwolf.vim | 8 ++++++++ autoload/airline/themes/dark.vim | 8 ++++++++ autoload/airline/themes/light.vim | 8 ++++++++ autoload/airline/themes/simple.vim | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/autoload/airline/themes/badwolf.vim b/autoload/airline/themes/badwolf.vim index 9438035..028e680 100644 --- a/autoload/airline/themes/badwolf.vim +++ b/autoload/airline/themes/badwolf.vim @@ -32,6 +32,14 @@ let g:airline#themes#badwolf#insert_modified = { \ 'info_separator' : [ '#005fff' , '#45413b' , 27 , 238 , 'bold' ] , \ 'statusline' : [ '#ffa724' , '#45413b' , 214 , 238 , '' ] , \ } +let g:airline#themes#badwolf#insert_paste = { + \ 'mode': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ 'mode_separator': [ '#d78700' , s:I2[1] , 172 , s:I2[3] , '' ] , + \ } +let g:airline#themes#badwolf#insert_replace = { + \ 'mode': [ s:I2[0] , '#ff0000' , s:I2[2] , 196 , '' ] , + \ 'mode_separator': [ '#ff0000' , s:I2[1] , 196 , s:I2[3] , '' ] , + \ } let s:V1 = [ '#141413' , '#ffa724' , 232 , 214 ] let s:V2 = [ '#000000' , '#fade3e' , 16 , 221 ] diff --git a/autoload/airline/themes/dark.vim b/autoload/airline/themes/dark.vim index 68df62a..f7a46d4 100644 --- a/autoload/airline/themes/dark.vim +++ b/autoload/airline/themes/dark.vim @@ -29,6 +29,14 @@ let g:airline#themes#dark#insert_modified = { \ 'info_separator': [ '#005fff' , '#5f005f' , 27 , 53 , '' ] , \ 'statusline': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , \ } +let g:airline#themes#dark#insert_paste = { + \ 'mode': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ 'mode_separator': [ '#d78700' , s:I2[1] , 172 , s:I2[3] , '' ] , + \ } +let g:airline#themes#dark#insert_replace = { + \ 'mode': [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] , + \ 'mode_separator': [ '#af0000' , s:I2[1] , 124 , s:I2[3] , '' ] , + \ } let s:V1 = [ '#000000' , '#ffaf00' , 232 , 214 ] let s:V2 = [ '#000000' , '#ff5f00' , 232 , 202 ] diff --git a/autoload/airline/themes/light.vim b/autoload/airline/themes/light.vim index d0843b2..97d91b8 100644 --- a/autoload/airline/themes/light.vim +++ b/autoload/airline/themes/light.vim @@ -29,6 +29,14 @@ let g:airline#themes#light#insert_modified = { \ 'info_separator': [ '#00df87' , '#ffdfdf' , 42 , 224 , '' ] , \ 'statusline': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , \ } +let g:airline#themes#light#insert_paste = { + \ 'mode': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ 'mode_separator': [ '#d78700' , s:I2[1] , 172 , s:I2[3] , '' ] , + \ } +let g:airline#themes#light#insert_replace = { + \ 'mode': [ s:I2[0] , '#ff0000' , s:I1[2] , 196 , '' ] , + \ 'mode_separator': [ '#ff0000' , s:I2[1] , 196 , s:I2[3] , '' ] , + \ } let s:V1 = [ '#ffffff' , '#ff5f00' , 255 , 202 ] let s:V2 = [ '#5f0000' , '#ffaf00' , 52 , 214 ] diff --git a/autoload/airline/themes/simple.vim b/autoload/airline/themes/simple.vim index 721b88f..068cf2d 100644 --- a/autoload/airline/themes/simple.vim +++ b/autoload/airline/themes/simple.vim @@ -67,6 +67,14 @@ let g:airline#themes#simple#insert = { \ 'statusline': [ s:I3[0] , s:I3[1] , s:I3[2] , s:I3[3] , '' ] , \ } let g:airline#themes#simple#insert_modified = copy(g:airline#themes#simple#normal_modified) +let g:airline#themes#simple#insert_paste = { + \ 'mode': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ 'mode_separator': [ '#d78700' , s:I2[1] , 172 , s:I2[3] , '' ] , + \ } +let g:airline#themes#simple#insert_replace = { + \ 'mode': [ s:I1[0] , '#af0000' , s:I1[2] , 124 , '' ] , + \ 'mode_separator': [ '#af0000' , s:I2[1] , 124 , s:I2[3] , '' ] , + \ } let s:V1 = s:swap ? [ s:guibg, '#dfdf00' , s:termbg , 184 ] : [ '#dfdf00' , s:guibg, 184 , s:termbg ] let s:V2 = [ '#ff5f00' , s:guibg, 202 , s:termbg ]