kana / vim-scratch

Vim plugin: Emacs like scratch buffer

Home Page:http://www.vim.org/scripts/script.php?script_id=2107

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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>'