2025-08-09.20-05-22.mp4
configurable window separtor
Currently in Neovim, we can not make the active window distinguishable via the window separator. This plugin will color the border of active window, like what tmux does for its different panes.
- Neovim 0.11.3+
- Nerd Fonts
Using vim-plug:
Plug 'nvim-zh/colorful-winsep.nvim'
Using Packer.nvim:
use {
"nvim-zh/colorful-winsep.nvim",
config = function ()
require('colorful-winsep').setup()
end
}
Using lazy.nvim
{
"nvim-zh/colorful-winsep.nvim",
config = true,
event = { "WinLeave" },
}
The following is the default configuration (read the comments carefully if you want to change it):
require("colorful-winsep").setup({
-- choose between "single", "rounded", "bold" and "double".
-- Or pass a table like this: { "─", "│", "┌", "┐", "└", "┘" },
border = "bold",
excluded_ft = { "packer", "TelescopePrompt", "mason" },
highlight = nil, -- nil|string|function. See the docs's Highlights section
animate = {
enabled = "shift", -- false to disable, or choose a option below (e.g. "shift") and set option for it if needed
shift = {
delta_time = 0.1,
smooth_speed = 1,
delay = 3,
},
progressive = {
-- animation's speed for different direction
vertical_delay = 20,
horizontal_delay = 2,
},
},
indicator_for_2wins = {
-- only work when the total of windows is two
position = "center", -- false to disable or choose between "center", "start", "end" and "both"
symbols = {
-- the meaning of left, down ,up, right is the position of separator
start_left = "",
end_left = "",
start_down = "",
end_down = "",
start_up = "",
end_up = "",
start_right = "",
end_right = "",
},
},
})
By default, we use the shift
animation. If you want to disable it, set the animate.enabled
to false.
Have a look at the top of this README
2025-08-10.14-53-42.mp4
When using the plugin with two windows only, it becomes difficult to discern which window is currently active. With this feature we can identify the active window more easily. To disable it, set the indicator_for_2wins.position
to false. Here come the showcases of default center
option:
The user command of the plugin is Winsep
, and here comes the subcommands of it:
subcommand | function |
---|---|
enable | enable the plugin |
disable | disable the plugin |
toggle | toggle the plugin |
The highlight's name is ColorfulWinSep
. You can change it using nvim's builtin function or changing the plugin's configuration
If you want to change it through plugin's setup function, you can pass a string or function to the highlight
field. When you pass a string, it will work as the fg, and the bg will be set up the same as "Normal" highlight group's bg automatically (see :h hl-Normal
). When you pass a function, the function will be called when the plugin runs and every time the colorscheme is changed.
By default, the configuration's highlight
field is nil
. This means the plugin will do nothing if you set the highlight group before it loads. Otherwise, the highlight is set to #957CC6
. This is useful if you use your colorscheme plugin (like catppuccin) to control highlights.
This plugin is released under the MIT License.