diff --git a/powerline/bindings/vim/powerline.vim b/powerline/bindings/vim/powerline.vim index a180e520..c030596b 100644 --- a/powerline/bindings/vim/powerline.vim +++ b/powerline/bindings/vim/powerline.vim @@ -35,5 +35,5 @@ endfunction augroup Powerline autocmd! - autocmd BufEnter,BufWinEnter,WinEnter * call s:UpdateWindows() + autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter * call s:UpdateWindows() augroup END diff --git a/powerline/config_files/config.json b/powerline/config_files/config.json index fca81b15..c6a6d35b 100644 --- a/powerline/config_files/config.json +++ b/powerline/config_files/config.json @@ -33,6 +33,7 @@ "colorscheme": "default", "theme": "default", "local_themes": { + "cmdwin": "cmdwin", "help": "help" } } diff --git a/powerline/config_files/themes/vim/cmdwin.json b/powerline/config_files/themes/vim/cmdwin.json new file mode 100644 index 00000000..fb0d1dff --- /dev/null +++ b/powerline/config_files/themes/vim/cmdwin.json @@ -0,0 +1,15 @@ +{ + "segments": { + "left": [ + { + "type": "string", + "contents": "Command Line", + "highlight_group": ["file_name"] + }, + { + "type": "filler", + "highlight_group": ["background"] + } + ] + } +} diff --git a/powerline/matchers/vim.py b/powerline/matchers/vim.py index fbaee480..ee13de8f 100644 --- a/powerline/matchers/vim.py +++ b/powerline/matchers/vim.py @@ -7,3 +7,7 @@ import vim def help(): return bool(int(vim.eval('&buftype is# "help"'))) + + +def cmdwin(): + return bool(int(vim.eval('bufname("%") == "[Command Line]"')))