trailing whitespace
This commit is contained in:
parent
383f7fe4be
commit
d9cdc25e2f
|
@ -284,22 +284,30 @@ M.edit = {
|
||||||
-- split and join lines
|
-- split and join lines
|
||||||
-- "J" for join is defaul
|
-- "J" for join is defaul
|
||||||
["S"] = {
|
["S"] = {
|
||||||
"i<CR>k<END><ESC>",
|
"i<CR><ESC>l",
|
||||||
"split line",
|
"split line",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- do something useful with the arrows
|
-- do something useful with the arrows
|
||||||
["<Up>"] = { "<cmd> move-2<CR>", "Move line up", opts = { expr = true } },
|
["<Up>"] = { "<cmd> move-2<CR>", "Move line up", opts = { expr = true } },
|
||||||
["<Down>"] = { "<cmd> move+<CR>", "Move line down", opts = { expr = true } },
|
["<Down>"] = { "<cmd> move+<CR>", "Move line down", opts = { expr = true } },
|
||||||
["<LEFT>"] = { "<<", "Less indentation", opts = { expr = true } },
|
["<LEFT>"] = { "<cmd> << <CR>", "Less indentation", opts = { expr = true } },
|
||||||
["<RIGHT>"] = { ">>", "More indentation", opts = { expr = true } },
|
["<RIGHT>"] = { "<cmd> >> <CR>", "More indentation", opts = { expr = true } },
|
||||||
|
|
||||||
-- format with conform
|
-- format with conform
|
||||||
["<leader>ff"] = {
|
["<leader>ff"] = {
|
||||||
function()
|
function()
|
||||||
require("conform").format()
|
require("conform").format()
|
||||||
end,
|
end,
|
||||||
"formatting",
|
"format buffer",
|
||||||
|
},
|
||||||
|
--
|
||||||
|
-- remove trailing whitespace
|
||||||
|
["<leader>fw"] = {
|
||||||
|
function()
|
||||||
|
require('mini.trailspace').trim()
|
||||||
|
end,
|
||||||
|
"remove whitespace",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
v = {
|
v = {
|
||||||
|
|
|
@ -85,6 +85,7 @@ local plugins = {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
keys = { "<leader>", "<localleader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
|
keys = { "<leader>", "<localleader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
|
||||||
},
|
},
|
||||||
|
{ "echasnovski/mini.trailspace", lazy = false, event = { "BufReadPost", "BufNewFile" }, opts = {} },
|
||||||
}
|
}
|
||||||
|
|
||||||
return plugins
|
return plugins
|
||||||
|
|
Loading…
Reference in New Issue