remove linebreaks user fun
This commit is contained in:
parent
d2309ca00a
commit
b019fc12d2
1 changed files with 17 additions and 8 deletions
|
|
@ -42,3 +42,12 @@ vim.api.nvim_create_autocmd('BufReadPost', {
|
|||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command('RemoveLinebreaks',
|
||||
function(opts)
|
||||
local startline = opts.line1
|
||||
local endline = opts.line2
|
||||
local rangespec = startline .. "," .. endline
|
||||
vim.cmd(rangespec .. "s/ \\?\\n \\?/ /g")
|
||||
end,
|
||||
{ range = true })
|
||||
|
|
|
|||
Loading…
Reference in a new issue