assets_demo.mov
- nui.nvim: UI Components
- Convert css units with one simple command
- track base font size on save to convert px to rems accurately (Single file support only)
Use your favourite plugin manager
- Lazy:
return {
'cjodo/convert.nvim',
dependencies = {
'MunifTanjim/nui.nvim'
},
keys = {
{ "<leader>cn", "<cmd>ConvertFindNext<CR>", desc = "Find next convertable unit" },
{ "<leader>cc", "<cmd>ConvertFindCurrent<CR>", desc = "Find convertable unit in current line" },
{ "<leader>ca", "<cmd>ConvertAll<CR>", desc = "Convert all of a specified unit" },
},
}
You can choose you're own custom keys for the ui menu
config = function()
local convert = require('convert')
-- defaults
convert.setup({
keymaps = {
focus_next = { "j", "<Down>", "<Tab>" },
focus_prev = { "k", "<Up>", "<S-Tab>" },
close = { "<Esc>", "<C-c>", 'qq' },
submit = { "<CR>", "<Space>" },
}
})
end
Command | Description |
---|---|
:ConvertFindNext | Finds the next convertible unit |
:ConvertFindCurrent | Finds the convertible unit in the current line (starting from cursor) |
:ConvertAll | Converts all instances of a given unit to another |