trailing whitespace

This commit is contained in:
Christoph J. Scherr 2024-01-20 00:37:13 +01:00
parent 383f7fe4be
commit d9cdc25e2f
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
2 changed files with 13 additions and 4 deletions

View File

@ -284,22 +284,30 @@ M.edit = {
-- split and join lines
-- "J" for join is defaul
["S"] = {
"i<CR>k<END><ESC>",
"i<CR><ESC>l",
"split line",
},
-- do something useful with the arrows
["<Up>"] = { "<cmd> move-2<CR>", "Move line up", opts = { expr = true } },
["<Down>"] = { "<cmd> move+<CR>", "Move line down", opts = { expr = true } },
["<LEFT>"] = { "<<", "Less indentation", opts = { expr = true } },
["<RIGHT>"] = { ">>", "More indentation", opts = { expr = true } },
["<LEFT>"] = { "<cmd> << <CR>", "Less indentation", opts = { expr = true } },
["<RIGHT>"] = { "<cmd> >> <CR>", "More indentation", opts = { expr = true } },
-- format with conform
["<leader>ff"] = {
function()
require("conform").format()
end,
"formatting",
"format buffer",
},
--
-- remove trailing whitespace
["<leader>fw"] = {
function()
require('mini.trailspace').trim()
end,
"remove whitespace",
},
},
v = {

View File

@ -85,6 +85,7 @@ local plugins = {
"folke/which-key.nvim",
keys = { "<leader>", "<localleader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
},
{ "echasnovski/mini.trailspace", lazy = false, event = { "BufReadPost", "BufNewFile" }, opts = {} },
}
return plugins