neovim: Only auto-decide splits for tag jumps
This commit is contained in:
parent
e90e16dafe
commit
a6e8e6a702
1 changed files with 7 additions and 14 deletions
|
|
@ -88,7 +88,13 @@ vim.keymap.set("", ';0', ":close<CR>")
|
|||
|
||||
vim.keymap.set("", '<Leader>w', ":w<CR>")
|
||||
|
||||
vim.keymap.set("n", "<C-w>]", ":rightbelow wincmd ]<CR>")
|
||||
vim.keymap.set("n", "<C-w>]", function()
|
||||
if vim.api.nvim_win_get_width(0) > 2 * 80 then
|
||||
vim.cmd('vertical wincmd ]')
|
||||
else
|
||||
vim.cmd('horizontal wincmd ]')
|
||||
end
|
||||
end)
|
||||
|
||||
-- TODO: Delete these ; fake-leader bindings
|
||||
vim.keymap.set("", ';w', ":w<CR>")
|
||||
|
|
@ -136,17 +142,4 @@ vim.keymap.set("n", "<C-l>", function()
|
|||
vim.cmd.redraw()
|
||||
end)
|
||||
|
||||
-- Split windows vertically if there's enough width for two "full size" panes.
|
||||
-- Otherwise, split horizontally.
|
||||
vim.api.nvim_create_autocmd('WinNew', {
|
||||
callback = function()
|
||||
if vim.fn.win_gettype(0) ~= '' then
|
||||
return
|
||||
end
|
||||
if vim.api.nvim_win_get_width(0) > 2 * 80 then
|
||||
vim.cmd.wincmd(vim.o.splitright and 'L' or 'H')
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
vim.diagnostic.config({ jump = { float = true } })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue