🌚

自定义GVIM 8标签栏样式的方法

Posted at — Jun 04, 2017
#vim #linux

GVim 8用的是GTK 3,原来在~/.gtkrc-2.0里加样式的方法不能用了。

GTK 3的样式在~/.config/gtk-3.0/gtk.css里:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * Adapt to the nova colorscheme
 */
@define-color VIM_BG_FIX #3C4C55;

window#vim-main-window {
    background-color: @VIM_BG_FIX;
}

window#vim-main-window notebook header {
    background-color: #1E272C;
    border-bottom-width: 0;
}
window#vim-main-window notebook tab {
    border-bottom-width: 0;
}
window#vim-main-window notebook tab label {
    padding-left:5px;
    padding-right:5px;
    padding-top:1px;
    padding-bottom:2px;
    color: #7CBDC6;
}
window#vim-main-window notebook tab:checked label {
    background-color: #7CBDC6;
    color: #1E272C;
}

查看GTK 3程序的样式结构的方法是用GTK Inspector:

1
GTK_DEBUG=interactive gvim