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

Expose the current sneak direction #119

Closed
lydell opened this issue Jul 6, 2014 · 3 comments
Closed

Expose the current sneak direction #119

lydell opened this issue Jul 6, 2014 · 3 comments

Comments

@lydell
Copy link

lydell commented Jul 6, 2014

I want to create a mapping such as this:

nmap <silent> <expr> <tab> sneak#is_sneaking() ? (FOO ? '<Plug>(SneakStreak)<cr>' : '<Plug>(SneakStreakBackward)<cr>') : '<Plug>Sneak_s'

I’m missing the FOO part though. Could sneak expose the current sneak direction as well?

@justinmk
Copy link
Owner

justinmk commented Jul 6, 2014

Yes, I meant to do this earlier this week. Expect it within the next few hours. Thanks.

@justinmk
Copy link
Owner

justinmk commented Jul 9, 2014

@lydell Try it like this:

        nmap <silent> <expr> <tab> sneak#is_sneaking()
              \ ? (sneak#state().rptreverse ? '<Plug>(SneakStreakBackward)<cr>' : '<Plug>(SneakStreak)<cr>')
              \ : '<Plug>Sneak_s'

@lydell
Copy link
Author

lydell commented Jul 9, 2014

Thanks a lot!

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

No branches or pull requests

2 participants