mtth / scratch.vim

Unobtrusive scratch window
MIT License
395 stars 32 forks source link

Add an option to open the scratch in normal mode #21

Closed fvictorio closed 7 years ago

fvictorio commented 7 years ago

I'm using scratch.vim as a buffer for to-do items, so I find myself opening it and going straight to normal mode to navigate the items and mark them as done or move them around.

It would be nice to be able to configure scratch to use normal mode by default instead of insert mode.

I'm willing to send a PR if you think this would be a useful feature.

Thanks!

mtth commented 7 years ago

The :Scratch command opens the scratch buffer and puts you in normal mode, are you looking for something else?

fvictorio commented 7 years ago

Oh, sorry. I just assumed that gs was a map for :Scratch<cr> :disappointed: My bad. Thanks!

dubiousdavid commented 7 years ago

Thought I would leave this here for posterity. My scratch mappings:

let g:scratch_no_mappings = 1
nmap <leader>si <plug>(scratch-insert-reuse)
xmap <leader>si <plug>(scratch-selection-reuse)
nmap <leader>sp :ScratchPreview<CR>
nmap <leader>se :Scratch<CR>

Where si is short for scratch insert, sp is short for scratch preview, and se is short for scratch edit.