Useful for languages that require semicolons at the end of the line.
local m = require("put_at_end")
vim.keymap.set("n", "<C-;>", m.put_semicolon)
-- This keymap will put a semicolon at the end of the current line
vim.keymap.set("n", "<C-.>", m.put_period) --This a period
vim.keymap.set("n", "<C-,>", m.put_comma) --This a commna
vim.keymap.set("n", "<C-/>", m.put_questionmark) --This a question mark
vim.keymap.set("n", "<C-A>", function() m.put("STRING") end) --This 'STRING'
- With lazy
{
"rareitems/put_at_end",
keys = { -- Basic lazy loading
-- Plugin doesn't set any keymaps you have to set your own
{
"<C-;>",
function()
require("put_at_end").put_semicolon()
end,
desc = "Put a semicolon at the end of the line",
},
{
"<C-.>",
function()
require("put_at_end").put_period()
end,
desc = "Put a period at the end of the line",
},
{
"<C-,>",
function()
require("put_at_end").put_comma()
end,
desc = "Put a comma at the end of the line",
},
},
}
- With packer.nvim
use { 'rareitems/put_at_end.nvim' }