justinmk / vim-sneak

The missing motion for Vim :athletic_shoe:
http://www.vim.org/scripts/script.php?script_id=4809
MIT License
3.24k stars 88 forks source link

label mode not working with f #302

Closed maxigit closed 1 year ago

maxigit commented 1 year ago

I set label mode and map f to sneak_f. Unfortunately, pressing f doesn't show the label but expect me te press ; to go the next (as would with normal f). It would be nice if labels would work.

justinmk commented 1 year ago

<Plug>Sneak_f intentionally doesn't work like that. :help sneak#wrap() provides an example that answers your question:

    Example: Configure "f" to trigger label-mode: >
      nnoremap <silent> f :<C-U>call sneak#wrap('',           1, 0, 1, 1)<CR>
      nnoremap <silent> F :<C-U>call sneak#wrap('',           1, 1, 1, 1)<CR>
      xnoremap <silent> f :<C-U>call sneak#wrap(visualmode(), 1, 0, 1, 1)<CR>
      xnoremap <silent> F :<C-U>call sneak#wrap(visualmode(), 1, 1, 1, 1)<CR>
      onoremap <silent> f :<C-U>call sneak#wrap(v:operator,   1, 0, 1, 1)<CR>
      onoremap <silent> F :<C-U>call sneak#wrap(v:operator,   1, 1, 1, 1)<CR>

related https://github.com/justinmk/vim-sneak/issues/297

maxigit commented 1 year ago

Thanks

On Sun, 5 Mar 2023 at 15:03, Justin M. Keyes @.***> wrote:

Sneak_f intentionally doesn't work like that. :help sneak#wrap() provides an example that answers your question: Example: Configure "f" to trigger label-mode: > nnoremap f :call sneak#wrap('', 1, 0, 1, 1) nnoremap F :call sneak#wrap('', 1, 1, 1, 1) xnoremap f :call sneak#wrap(visualmode(), 1, 0, 1, 1) xnoremap F :call sneak#wrap(visualmode(), 1, 1, 1, 1) onoremap f :call sneak#wrap(v:operator, 1, 0, 1, 1) onoremap F :call sneak#wrap(v:operator, 1, 1, 1, 1) — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread.Message ID: ***@***.***>