Adding GBrowse impl
This commit is contained in:
parent
4f07833887
commit
1ff1e6f963
10
init.lua
10
init.lua
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue