I use :vs
to open a window. If I want this window to be the leftmost window, no matter what the currently active window is, how can I do it?
You can use a couple of methods to achieve the same end result as your request.
You can just open a vertical split and then move it to leftmost position using Controlw + ShiftH (note that the "h" is uppercase.) See
:help CTRL-W_H
for more information.You can use
:topleft
to modify your:vs
command to open the window in the leftmost position. You can use the following command for that::topleft vs
:vs
to do what you want. I myself just do<C-w>v<C-w>H
. But more single-minded way would be:vert topleft split
– klaus Aug 24 '19 at 11:32:topleft :vsplit
, no need to switch to:vert
. Also<C-w>H
on its own after:vs
, no need to switch to<C-w>v
for that to work either. But it's still an answer, please post it as such. – filbranden♦ Aug 24 '19 at 15:44:topleft
was a{cmd}
modifier, maybe cause it is only and specifically useful for splitting windows; and I personally do that with keybindings, not commands. That's why I suggested<C-w>v
instead of:vs
: it wasn't an answer and I was talking about my personal workflow. Anyway, thanks for the suggestions, and please, if you have time, check if the answer is correct. – klaus Aug 24 '19 at 16:26:vert
(that's not really relevant here), rephrased it a little bit and added links to the help pages. Let me know if you disagree with any of the edits. Thanks for answering! – filbranden♦ Aug 24 '19 at 16:53