size matters.nvim
1.0.0
☕大豆插件系列。
LUA插件可为Neovide或Goneovim等现代Neovim GUI客户添加动态字体缩放。
| keymaps | 命令 | |
|---|---|---|
| 增加字体尺寸 | ctrl + + / ctrl +滚动 | FontSizeUp <num> |
| 降低字体尺寸 | ctrl + - / ctrl + scrolldown | FontSizeDown <num> |
| 将字体重置为默认 | Ctrl + Alt + = | FontReset |
安装插件的一种简单方法是通过插件管理器。例如,Packer.nvim
use " tenxsoydev/size-matters.nvim "然后像大多数其他插件一样加载它。此外,您可以在使用GUI客户端时只能加载它的条件。例如,
if vim . g . neovide or vim . g . goneovim or vim . g . nvui or vim . g . gnvim then
require ( " size-matters " )
end如果要更改某些配置,那就是默认
require ( " size-matters " ). setup ({
default_mappings = true ,
-- font resize step size
step_size = 1 ,
notifications = {
enable = true ,
-- ms how long a notification should be displayed (only applies if notify is used)
timeout = 150 ,
-- the notifications position may be affected by the time it takes for the client to re-render
-- to address this, it can be displayed with a delay.
delay = 300 ,
}
-- the font loaded when using the reset cmd / shortcut
reset_font = vim . api . nvim_get_option ( " guifont " ),
})NVIM> = V0.7-使用v0.7引入的API。