Change splits orientation
?
#100
Answered
by
mrjones2014
NormTurtle
asked this question in
Q&A
-
change orientation like , split -> vsplit , on key-strokes any keybinds?! or any implementation in plugin |
Beta Was this translation helpful? Give feedback.
Answered by
mrjones2014
Apr 30, 2023
Replies: 2 comments 1 reply
-
It wouldn’t be too hard to do with a little bit of Lua. Just grab the buffer ID, close the vert split, open horizontal split, set original buffer ID in the new window. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Something like this should work: -- convert a horizontal split to a vertical split
local buf = vim.api.nvim_get_current_buf()
vim.cmd.q()
vim.cmd.vsp()
vim.api.nvim_win_set_buf(0, buf) Though that wouldn't be "directional" like the plugin so maybe there is room for a plugin feature here. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
NormTurtle
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this should work:
Though that wouldn't be "directional" like the plugin so maybe there is room for a plugin feature here.