Created
February 27, 2018 17:33
-
-
Save sukovec/7950ee8e564dea27146480b0f567d38a to your computer and use it in GitHub Desktop.
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! SwitchToBufferNum(num) | |
let buffers = map(filter(copy(getbufinfo()), 'v:val.listed'), 'v:val.bufnr') | |
execute "buffer " . buffers[a:num] | |
endfunction | |
map <C-F1> :call SwitchToBufferNum(0)<CR> | |
map <C-F2> :call SwitchToBufferNum(1)<CR> | |
map <C-F3> :call SwitchToBufferNum(2)<CR> | |
map <C-F4> :call SwitchToBufferNum(3)<CR> | |
map <C-F5> :call SwitchToBufferNum(4)<CR> | |
map <C-F6> :call SwitchToBufferNum(5)<CR> | |
map <C-F7> :call SwitchToBufferNum(6)<CR> | |
map <C-F8> :call SwitchToBufferNum(7)<CR> | |
map <C-F9> :call SwitchToBufferNum(8)<CR> | |
map <C-F10> :call SwitchToBufferNum(9)<CR> | |
map <C-F11> :call SwitchToBufferNum(10)<CR> | |
map <C-F12> :call SwitchToBufferNum(11)<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment