Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3627782
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:55:55+00:00 2026-05-18T23:55:55+00:00

If you are editing a file in Vim and then you need to open

  • 0

If you are editing a file in Vim and then you need to open an existing buffer (e.g., from your buffer list: :buffers), how can you open it in a vertical split?

I know that you already can open it with a normal split like:

:sbuffer N

Where N is the buffer number you want. However, the above opens that N buffer horizontally, not vertically.

I’m also aware that you can change the window placement after opening and have a vertical split like so:

Ctrl + W, H
Ctrl + W, L

Which will vertically split the window to the right or the left.

It seems to me that if there is a sbuffer there should be a vsbuffer, but that doesn’t exist (not that I am aware of).

Also, please note that I am not looking for a plugin to solve this question. I know about a wealth of plugins that will allow you to do this.

I am sure I might be missing something that is already there.

I have created a simple function with a mapping if someone else stumbles across this issue and do not want to install a plugin:

Function:

" Vertical Split Buffer Function
function VerticalSplitBuffer(buffer)
    execute "vert belowright sb" a:buffer
endfunction

Mapping:

" Vertical Split Buffer Mapping
command -nargs=1 Vbuffer call VerticalSplitBuffer(<f-args>)

This accomplishes the task of opening a buffer in a right split, so for buffer 1, you would call it like:

:Vbuffer 1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:55:56+00:00Added an answer on May 18, 2026 at 11:55 pm

    Try:

    :vert sb N
    

    which will open a left vertical split (by default, unless you have modified some options).

    To open a split to the right, on the other hand:

    :vert belowright sb N
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When VIM refers to a file im editing as a buffer...what exactly does it
I keep on forgetting which file I'm editing. In Vim 7.x, how can I
While I am editing a file in Vim, I need to see other available
I'm editing an XML file in Vim, and then I want to transform it
Background: I was editing a file in vim using putty over ssh. In order
I am editing a file like /path/to/file.txt with vim, hence the current directory is
In a Portable-Executable ,we can change the imported dll name ,by editing PE file
The following is a sample of a file I'm editing in vim cutAct =
I copy stuff from output buffers into C++ code I'm working on in vim.
Using Vim 6.0. Say I'm editing this file: sdfsdg dfgdfg 34 12 2 4

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.