diff --git a/powerline/config_files/colorschemes/vim/default.json b/powerline/config_files/colorschemes/vim/default.json index b4f1b483..3f2afb31 100644 --- a/powerline/config_files/colorschemes/vim/default.json +++ b/powerline/config_files/colorschemes/vim/default.json @@ -51,6 +51,44 @@ "dark_green_gray": "gray5" } }, + "tab_nc": { + "colors": { + "brightyellow": "darkorange", + "brightestred": "darkred", + "gray0": "gray0", + "gray1": "gray0", + "gray2": "gray0", + "gray3": "gray1", + "gray4": "gray1", + "gray5": "gray1", + "gray6": "gray1", + "gray7": "gray4", + "gray8": "gray4", + "gray9": "gray4", + "gray10": "gray5", + "white": "gray6", + "dark_green_gray": "gray5" + } + }, + "buf_nc": { + "colors": { + "brightyellow": "darkorange", + "brightestred": "darkred", + "gray0": "gray0", + "gray1": "gray0", + "gray2": "gray0", + "gray3": "gray1", + "gray4": "gray1", + "gray5": "gray1", + "gray6": "gray1", + "gray7": "gray4", + "gray8": "gray4", + "gray9": "gray4", + "gray10": "gray5", + "white": "gray6", + "dark_green_gray": "gray5" + } + }, "i": { "colors": { "gray0": "darkestblue", diff --git a/powerline/config_files/colorschemes/vim/solarized.json b/powerline/config_files/colorschemes/vim/solarized.json index a3703d74..f7f393fe 100644 --- a/powerline/config_files/colorschemes/vim/solarized.json +++ b/powerline/config_files/colorschemes/vim/solarized.json @@ -43,6 +43,26 @@ "oldlace": "gray61" } }, + "tab_nc": { + "colors": { + "darkgreencopper": "royalblue5", + "lightskyblue4": "royalblue5", + "azure4": "darkgreencopper", + "gray61": "lightskyblue4", + "lightyellow": "azure4", + "oldlace": "gray61" + } + }, + "buf_nc": { + "colors": { + "darkgreencopper": "royalblue5", + "lightskyblue4": "royalblue5", + "azure4": "darkgreencopper", + "gray61": "lightskyblue4", + "lightyellow": "azure4", + "oldlace": "gray61" + } + }, "i": { "groups": { "background": { "fg": "oldlace", "bg": "darkgreencopper", "attr": [] }, diff --git a/powerline/config_files/colorschemes/vim/solarizedlight.json b/powerline/config_files/colorschemes/vim/solarizedlight.json index cd86a7a8..cab94968 100644 --- a/powerline/config_files/colorschemes/vim/solarizedlight.json +++ b/powerline/config_files/colorschemes/vim/solarizedlight.json @@ -43,6 +43,26 @@ "gray13": "gray61" } }, + "tab_nc": { + "colors": { + "lightyellow": "darkgreencopper", + "azure4": "darkgreencopper", + "lightskyblue4": "lightyellow", + "gray61": "azure4", + "royalblue5": "lightskyblue4", + "gray13": "gray61" + } + }, + "buf_nc": { + "colors": { + "lightyellow": "darkgreencopper", + "azure4": "darkgreencopper", + "lightskyblue4": "lightyellow", + "gray61": "azure4", + "royalblue5": "lightskyblue4", + "gray13": "gray61" + } + }, "i": { "groups": { "background": { "fg": "gray13", "bg": "lightyellow", "attr": [] }, diff --git a/powerline/config_files/themes/vim/tabline.json b/powerline/config_files/themes/vim/tabline.json index d252b073..c51d66fa 100644 --- a/powerline/config_files/themes/vim/tabline.json +++ b/powerline/config_files/themes/vim/tabline.json @@ -11,7 +11,7 @@ "name": "tabnr", "after": " ", "draw_soft_divider": false, - "exclude_modes": ["tab", "buf"], + "exclude_modes": ["tab", "buf", "buf_nc"], "priority": 5 }, { diff --git a/powerline/lint/__init__.py b/powerline/lint/__init__.py index 995bc1f6..d9eb1112 100644 --- a/powerline/lint/__init__.py +++ b/powerline/lint/__init__.py @@ -733,7 +733,7 @@ top_colorscheme_spec = (Spec( mode_translations_value_spec(), ).optional().context_message('Error while loading mode translations (key {key})').optional(), ).context_message('Error while loading top-level coloscheme')) -vim_mode_spec = Spec().oneof(set(list(vim_modes) + ['nc'])).copy +vim_mode_spec = Spec().oneof(set(list(vim_modes) + ['nc', 'tab_nc', 'buf_nc'])).copy vim_colorscheme_spec = (Spec( name=name_spec(), groups=groups_spec(), diff --git a/powerline/listers/vim.py b/powerline/listers/vim.py index aa7449bd..b8d38ecb 100644 --- a/powerline/listers/vim.py +++ b/powerline/listers/vim.py @@ -36,7 +36,7 @@ def tablister(pl, segment_info, **kwargs): ``winnr``, ``window_id``, ``buffer`` and ``bufnr`` keys set to tab-local ones and additional ``tabpage`` and ``tabnr`` keys. - Sets segment ``mode`` to either ``tab`` (for current tab page) or ``nc`` + Sets segment ``mode`` to either ``tab`` (for current tab page) or ``tab_nc`` (for all other tab pages). Works best with vim-7.4 or later: earlier versions miss tabpage object and @@ -53,7 +53,7 @@ def tablister(pl, segment_info, **kwargs): (lambda tabpage, mode: ( tabpage_updated_segment_info(segment_info, tabpage, mode), add_multiplier(tabpage, {'mode': mode}) - ))(tabpage, 'tab' if tabpage == cur_tabpage else 'nc') + ))(tabpage, 'tab' if tabpage == cur_tabpage else 'tab_nc') for tabpage in list_tabpages() ) @@ -79,7 +79,7 @@ def bufferlister(pl, segment_info, show_unlisted=False, **kwargs): and ``bufnr`` keys set to buffer-specific ones, ``window``, ``winnr`` and ``window_id`` keys set to None. - Sets segment ``mode`` to either ``buf`` (for current buffer) or ``nc`` + Sets segment ``mode`` to either ``buf`` (for current buffer) or ``buf_nc`` (for all other buffers). :param bool show_unlisted: @@ -102,7 +102,7 @@ def bufferlister(pl, segment_info, show_unlisted=False, **kwargs): buffer_updated_segment_info( segment_info, buffer, - ('buf' if buffer is cur_buffer else 'nc') + ('buf' if buffer is cur_buffer else 'buf_nc') ) for buffer in vim.buffers ) if (