Adding GBrowse impl

This commit is contained in:
Dimitar Ivanov 2023-11-09 14:50:46 +02:00 committed by Dimitar Ivanov
parent 4f07833887
commit 1ff1e6f963
1 changed files with 10 additions and 0 deletions

View File

@ -332,8 +332,10 @@ vim.wo.wrap = false
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
if vim.fn.has('macunix') then if vim.fn.has('macunix') then
vim.o.clipboard = 'unnamed' vim.o.clipboard = 'unnamed'
OPEN_CMD = 'open'
else else
vim.o.clipboard = 'unnamedplus' vim.o.clipboard = 'unnamedplus'
OPEN_CMD = 'xdg-open'
end end
-- Enable break indent -- Enable break indent
@ -816,5 +818,13 @@ vim.api.nvim_create_autocmd('VimLeave', {
end end
}) })
-- Fugitive config
vim.api.nvim_create_user_command(
'Browse',
function(opts)
vim.fn.system { OPEN_CMD, opts.fargs[1] }
end,
{ nargs = 1 }
)
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et