I want do something like this:
- check if a split named
__Potion_Bytecode__
exists - if exists, switch to the split with name
- if not, new a split named
__Potion_Bytecode__
Here is code I am now doing:
function! PotionShowBytecode()
" Here I need to check if split exists
" open a new split and set it up
vsplit __Potion_Bytecode__
normal! ggdG
endfunction
In lh-vim-lib, I have
lh#buffer#jump()
that does exactly that. It relies on another function to find a window where the buffer could be.Which uses another function to work around the extremely annoying E36:
If you want to work with tabs, you'll have to use tab* functions instead.