vim icon indicating copy to clipboard operation
vim copied to clipboard

Change tab close background

Open maharjanaman opened this issue 6 years ago • 5 comments

Hi, is there a way to change tab close background to something like this; Screen Shot 2019-12-24 at 15 21 55 Right now, its like this; Screen Shot 2019-12-24 at 15 25 11 Sorry for the trouble.

maharjanaman avatar Dec 24 '19 09:12 maharjanaman

Unfortunately the default style of Vim is hardcoded to always draw a X character. Vim itself does not support a simple customization of the tabline other than overriding the function that renders it which is a bad idea to do so.

Vim's default tabline style with Nord colors.

To learn how to configure the tabline, the :help setting-tabline documents the tabline option which specifies what the line with tab pages labels looks like.

Looking on your screenshots I guess you're using the lightline-vim or vim-airline plugin that both support Vim's tabline option like both project descriptions also state:

[...] statusline/tabline plugin for Vim [...]

Both plugins also provide documentations like e.g. :help g:lightline.tabline that describes how to configure lightline.vim for the tabline component. This way you can customize the content and ordering of the tabline:

set showtabline=2
let g:lightline.tabline = {
            \ 'left': [ [ 'tabs' ] ],
            \ 'right': [ [ 'close'] ] }

Tabline style provided by the lightline.vim plugin using the Nord color theme.

In order to style the close button like on your first screenshot, the tabline.right map of Nord's bundled lightline.vim color theme must be adjusted, e.g. to use the same style like for the active tab:

-let s:p.tabline.right = [ [ s:nord5, s:nord3 ] ]
+let s:p.tabline.right = [ [ s:nord1, s:nord8 ] ]

Adjusted Nord lightline.vim color theme.

One way to do this is to refactor Nord's lightline.vim color theme to allow users to customize and override the default styles like already proposed in #124 for the vim-airline plugin.

arcticicestudio avatar Dec 25 '19 08:12 arcticicestudio

Thanks for the infos 🙂

maharjanaman avatar Dec 25 '19 08:12 maharjanaman

Should we expect this in release?

maharjanaman avatar Dec 26 '19 03:12 maharjanaman

Unlikely, since this is related to airline/lightline, and not to nord.

jvoisin avatar Apr 16 '22 17:04 jvoisin

Thank you for your patience! 🙏🏼 It‘s been a while since I had free time to focus more on Nord, and my open source projects in general, and invest time in this issue due to work-life balance.

I recently published the first “Northern Post — The state and roadmap of Nord“ announcement which includes all details about the plans and future of the Nord project, including the goal of catching up with the backlog. This issue is part of the backlog and therefore I want to triage and process it to get one step closer to a “clean state“. Read the announcement about reaching the “clean“ contribution triage state in Nord‘s discussions for more details about the goal.

Therefore it has been added with blocked status to the central and single-source-of-truth project board that is also described in more detail in the roadmap announcement. As soon as #124 is completed the implementation for a configurable style switch can be started.

@maharjanaman In the meantime you can use the configuration from my previous post to use the style.

svengreb avatar May 30 '23 21:05 svengreb