Created
October 4, 2014 08:55
-
-
Save carlwoodward/52c3aa95a4ab99f0c495 to your computer and use it in GitHub Desktop.
This file contains hidden or 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! SelectaBuffers() | |
let bufcount = bufnr('$') | |
let buflist = [] | |
for bufnum in range(1, bufcount) | |
let bufname = bufname(bufnum) | |
if !(bufname =~ '^fugitive://') && !(bufname =~ '^/') && !(bufname =~ '^\.') | |
call add(buflist, bufname) | |
endif | |
endfor | |
call system("> .bufferlist") | |
call writefile(buflist, ".bufferlist") | |
call SelectaCommand("cat `pwd`/.bufferlist | grep -v '^$' | sort -u", "", ":e") | |
endfunction | |
nnoremap <leader>b :call SelectaBuffers()<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment