Cleanup
This commit is contained in:
parent
48b42f0cb1
commit
7cb2603262
@ -1,12 +1,16 @@
|
||||
-- UnAlign
|
||||
vim.api.nvim_create_user_command(
|
||||
'UnAlign',
|
||||
function(ctx) vim.cmd(ctx.line1 .. ',' .. ctx.line2 .. 's/\\(\\S\\+\\)\\s\\{2,\\}/\\1 /g') end,
|
||||
function(ctx)
|
||||
vim.cmd(ctx.line1 .. ',' .. ctx.line2 .. 's/\\(\\S\\+\\)\\s\\{2,\\}/\\1 /g')
|
||||
end,
|
||||
{range = '%'}
|
||||
)
|
||||
|
||||
-- GitStreak
|
||||
local function git_streak()
|
||||
vim.api.nvim_create_user_command(
|
||||
'GitStreak',
|
||||
function(ctx)
|
||||
local function call(args)
|
||||
output = vim.fn.system(table.concat(args, ' '))
|
||||
return string.gsub(output, '%s+$', '')
|
||||
@ -30,6 +34,6 @@ local function git_streak()
|
||||
for name in string.gmatch(names, '[^\r\n]+') do
|
||||
vim.cmd(string.format('e %s/%s', root_dir, name))
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command('GitStreak', git_streak, {nargs = 0})
|
||||
end,
|
||||
{}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user