Easy answer: use tab completion with
:b (there's a space at the end)
- Enter any part of a buffer name.
- Press tab.
If the pattern matches a single buffer you'll be switched to that buffer immediately. Otherwise, you'll see the matches in the standard tab completion way, i.e. all the matching buffers will be shown and you tab through to the one you want to open.
If you want something a bit more sophisticated that allows search with regular expressions and includes a nice menu when there are multiple matches then take a look at this function and command from https://vim.fandom.com/wiki/Easier_buffer_switching
let bufcount = bufnr("$")
let currbufnr = 1
let nummatches = 0
let firstmatchingbufnr = 0
while currbufnr <= bufcount
let currbufname = bufname(currbufnr)
if(match(currbufname, a:pattern) > -1)
echo currbufnr . ": ". bufname(currbufnr)
let nummatches += 1
let firstmatchingbufnr = currbufnr
let currbufnr = currbufnr + 1
if(nummatches == 1)
execute ":buffer ". firstmatchingbufnr
elseif(nummatches > 1)
let desiredbufnr = input("Enter buffer number: ")
if(strlen(desiredbufnr) != 0)
execute ":buffer ". desiredbufnr
echo "No matching buffers"
"Bind the BufSel() function to a user-command
command! -nargs=1 Bs :call BufSel("<args>")
jump to the matching buffer if only one match is found, or if there are many matches it will print a list of the matching buffers in the command-line area, and allow you to select one of the matching buffers by buffer number.