{"action":"created","issue":{"url":"https://api.github.com/repos/justinmk/vim-sneak/issues/145","labels_url":"https://api.github.com/repos/justinmk/vim-sneak/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/justinmk/vim-sneak/issues/145/comments","events_url":"https://api.github.com/repos/justinmk/vim-sneak/issues/145/events","html_url":"https://github.com/justinmk/vim-sneak/issues/145","id":91137888,"number":145,"title":"Streak function with input string","user":{"login":"NigoroJr","id":1430364,"avatar_url":"https://avatars.githubusercontent.com/u/1430364?v=3","gravatar_id":"","url":"https://api.github.com/users/NigoroJr","html_url":"https://github.com/NigoroJr","followers_url":"https://api.github.com/users/NigoroJr/followers","following_url":"https://api.github.com/users/NigoroJr/following{/other_user}","gists_url":"https://api.github.com/users/NigoroJr/gists{/gist_id}","starred_url":"https://api.github.com/users/NigoroJr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NigoroJr/subscriptions","organizations_url":"https://api.github.com/users/NigoroJr/orgs","repos_url":"https://api.github.com/users/NigoroJr/repos","events_url":"https://api.github.com/users/NigoroJr/events{/privacy}","received_events_url":"https://api.github.com/users/NigoroJr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/justinmk/vim-sneak/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-26T03:07:46Z","updated_at":"2015-07-01T06:15:38Z","closed_at":null,"body":"Hello, thanks for the awesome plugin. I've been using vim-seek for a while and switched to vim-sneak, and I'm really loving it!\r\n\r\nI tried out the streak mode and thought it's pretty neat, too. However, I was wondering if there's any way I can manually start streak mode while sneaking. Here's an example to demonstrate my scenario (it also shows my current settings).\r\n\r\n```vim\r\n\" [C]ursor here\r\nlet g:sneak#s_next = 1\r\nlet g:sneak#reset = 1\r\nlet g:sneak#streak = 1\r\n\" let g:sneak#target_labels = '1234567890'\r\n```\r\n\r\nTyping `ssn` will start streak mode since there is no `sn` on the current line. However, since I like the clever-s behavior, I would like to be able to hit `s` if it's only a several times rather than typing the target character that streak shows me. On the other hand, if it's _not_ just a several times, like:\r\n\r\n```\r\n[C]ursor here\r\nsneak sneak sneak sneak sneak sneak...\r\nsneak...\r\nsn...\r\n...\r\n```\r\n\r\n, it would be nicer to have streak take me to the target in just one keystroke. Using a hypothetical function `sneak#streak()` that takes a search string as an argument, I came up with this (hypothetical) mapping that you can start streak mode with `<Space>` while sneaking:\r\n\r\n```vim\r\nnmap <silent> <expr> <Space> sneak#is_sneaking() ?\r\n    \\ ':<C-u>call sneak#streak(sneak#state().input)<CR>' : '<Space>'\r\n```\r\n\r\nDo you think this doable in some (other) way?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/justinmk/vim-sneak/issues/comments/117446094","html_url":"https://github.com/justinmk/vim-sneak/issues/145#issuecomment-117446094","issue_url":"https://api.github.com/repos/justinmk/vim-sneak/issues/145","id":117446094,"user":{"login":"justinmk","id":1359421,"avatar_url":"https://avatars.githubusercontent.com/u/1359421?v=3","gravatar_id":"","url":"https://api.github.com/users/justinmk","html_url":"https://github.com/justinmk","followers_url":"https://api.github.com/users/justinmk/followers","following_url":"https://api.github.com/users/justinmk/following{/other_user}","gists_url":"https://api.github.com/users/justinmk/gists{/gist_id}","starred_url":"https://api.github.com/users/justinmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinmk/subscriptions","organizations_url":"https://api.github.com/users/justinmk/orgs","repos_url":"https://api.github.com/users/justinmk/repos","events_url":"https://api.github.com/users/justinmk/events{/privacy}","received_events_url":"https://api.github.com/users/justinmk/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T06:15:38Z","updated_at":"2015-07-01T06:15:38Z","body":"Sorry, I don't understand the request. Does https://github.com/justinmk/vim-sneak/issues/119 help?"}}