Last active
February 23, 2018 10:37
-
-
Save dre-hh/bda01bf58aea3c175cc228ccfb74551e 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
fun! TerminalRepeat() | |
let buffers = map(filter(copy(getbufinfo()), 'v:val.listed'), 'v:val.name') | |
for buffer in buffers | |
if buffer =~ "term://.*/" | |
let windowNr = bufwinnr(buffer) | |
if windowNr > 0 | |
execute windowNr 'wincmd w' | |
else | |
execute "b " . buffer | |
endif | |
startinsert | |
call feedkeys("\<UP>") | |
endif | |
endfor | |
endfun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment