Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the streak-mode coexist with the default mode #40

Closed
bohrshaw opened this issue Dec 26, 2013 · 11 comments
Closed

Make the streak-mode coexist with the default mode #40

bohrshaw opened this issue Dec 26, 2013 · 11 comments

Comments

@bohrshaw
Copy link
Contributor

Instead of overriding the default mode with let g:sneak#streak = 1, I prefer to be able to use the streak-mode along with the normal mode. I would like to use mappings starting with <leader>s in the streak-mode.

@justinmk
Copy link
Owner

Try this (with g:sneak#streak = 0):

nmap <leader>s <Plug>SneakStreak

I haven't tested this and it isn't documented yet, so I'll use this issue as a reminder to do so.

Also, what particular annoyances did you find with the "overriding" behavior? The goal is to remove as many of those annoyances as possible.

Thanks for the report!

@bohrshaw
Copy link
Contributor Author

I haven't found any annoyance and I'm quite thankful for such a beautiful work.
Once I was inspired by "vim-seek", but didn't have the time to improve it further. But now with this sneak plugin, I find motions in Vim is almost complete.
However the stock fFtT motions are now less attractive to me. So I'm wondering if these motions will also be improved in future versions of 'vim-sneak'. I suppose these motions will be just like sS except that they are inline and accept only one character.

@bohrshaw
Copy link
Contributor Author

I notice sc<CR> move the cursor to a single character c. I think this is f's job, which is currently not done perfectly(alternative characters should better be highlighted). So I urge to improve fFtT and let sc<CR> jump to the c at the end of a line. Similarly, s<CR>c can also jump to c at the beginning of a line, while s<CR> to repeat the previous jump can be replaced by s<BS>.
In the meanwhile, I see that <CR> is a non-printable character, so I have doubts if this is possible.

@justinmk
Copy link
Owner

@bohrshaw Thanks for the kind words!

fFtT motions are now less attractive to me. So I'm wondering if these motions will also be improved in future versions of 'vim-sneak'. I suppose these motions will be just like sS except that they are inline and accept only one character.

issue #24, right? That's the next thing on my list, stay tuned.

let sc jump to the c at the end of a line

I thought about that, I suppose people would also want <tab>, right? I think when issue #24 is addressed, maybe 2-character sneak should change its behavior...

@justinmk
Copy link
Owner

justinmk commented Jan 3, 2014

@bohrshaw For fFtT try these new commands:

    nnoremap f :Sneak!         1<cr>
    nnoremap F :SneakBackward! 1<cr>
    xnoremap f :<c-u>SneakV!         1<cr>
    xnoremap F :<c-u>SneakVBackward! 1<cr>

I'm going to close this issue, since I assume all your questions have been answered, except the one I moved here: #43

@justinmk justinmk closed this as completed Jan 3, 2014
@bohrshaw
Copy link
Contributor Author

bohrshaw commented Jan 3, 2014

If there's an option setting fFtT to sneak within a single line, that would be far better for me.

As it's often more preferable to seek two characters when jumping across lines(or using easymotion/streak-mode). And it's not neat for jumping within one line like this.

@justinmk
Copy link
Owner

justinmk commented Jan 3, 2014

If there's an option setting fFtT to sneak within a single line,

Why not just use regular fFtT?

@bohrshaw
Copy link
Contributor Author

bohrshaw commented Jan 3, 2014

I like the matching characters highlighted ahead, so I'm not blindly repeating with ; or ,, especially when there're several matches in a line.

I know this's is a small enhancement which may be trivial to many others. But I would appreciate it as I'm using fFtT very often.

@justinmk
Copy link
Owner

justinmk commented Jan 4, 2014

Ok, I'm confused, because I thought you wanted it so that the search is restricted to a single line. But then this sentence makes it sound like you want it to behave multi-line:

especially when there're several matches in a line.

If that's the case, then you can set up these mappings and f/F will use single-character sneak. Is there something I'm missing?

@bohrshaw
Copy link
Contributor Author

bohrshaw commented Jan 4, 2014

Sorry for the confusion. (I am still on the early stage learning English and its expression.)

I do mean "fFtT(with highlighting) only in the current single line". However I now realise this is really trivial in many situations. But fFtT in a range of the whole page is certainly not my way.

So I re-propose to provide an option to limit single-character-jumping within just two lines.

@justinmk
Copy link
Owner

justinmk commented Jan 7, 2014

No worries, your English is fine. I think the feature request though is a bit out-of-scope for the plugin. It is not well-defined, so it will be confusing to users who just want consistent behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants