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。