Toggle Scratch buffer
ashok-arora opened this issue · comments
Is there any way to create a custom mapping to toggle scratch buffer instead of closing it and opening it with separate keys ?
@ashok-arora I had this, to press <F3>
to toggle the buf:
nnoremap <expr> <F3> bufwinnr(bufnr(g:scratch_buffer_name))>0? ':ScratchClose<CR>': ':ScratchOpen<CR>'