Created
October 4, 2015 22:13
-
-
Save keith/79f2a375767f4bafd7dd to your computer and use it in GitHub Desktop.
Get the list of open buffers (for use with fuzzy opening etc)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:BuffersList() | |
let buffers = range(0, bufnr('$')) | |
let searchBuffers = [] | |
for buffer in buffers | |
if buflisted(buffer) && index(searchBuffers, bufname(buffer)) < 0 | |
call add(searchBuffers, bufname(buffer)) | |
endif | |
endfor | |
return searchBuffers | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment