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

[RFC] Add feature to highlight characters to which the cursor can be moved directly #47

Merged
merged 11 commits into from Jun 26, 2019

Conversation

@yuntan
Copy link
Contributor

yuntan commented Jun 13, 2019

This PR adds feature to highlight characters to which the cursor can be moved directly.

demo screen cast (fgj^fm):

Screenshot from Gyazo

This behavior is like deris/vim-shot-f and previously mentioned in #29 . This PR introduces two variables g:clever_f_mark_direct and g:clever_f_mark_direct_color.

TODO

  • fix tests
  • add document

NOTE This PR doesn't add migemo support.

Copy link
Owner

rhysd left a comment

Please ensure this works fine with Japanese text.

autoload/clever_f.vim Outdated Show resolved Hide resolved
autoload/clever_f.vim Outdated Show resolved Hide resolved
autoload/clever_f.vim Outdated Show resolved Hide resolved
test/test.vimspec Outdated Show resolved Hide resolved
test/test.vimspec Outdated Show resolved Hide resolved
yuntan added 5 commits Jun 14, 2019
introduce public function `clever_f#_mark_direct()` for test
add test for multibyte string
add comments to show highlighted characters
add test for backward matching and one hop matching
add helper function `GetHighlightedPositions()`
remove lambdas
@rhysd

This comment has been minimized.

Copy link
Owner

rhysd commented Jun 16, 2019

Thank you for the fixes. Is this PR ready for final review or still WIP?

@yuntan

This comment has been minimized.

Copy link
Contributor Author

yuntan commented Jun 17, 2019

The last thing to do is documentation. The code is ready for review.

@rhysd

This comment has been minimized.

Copy link
Owner

rhysd commented Jun 19, 2019

OK, let me check the implementation.

It should highlight backward characters
normal! gg$
" pOge huga Hiyo pOy#
let s = ' _ ____ __ _____ '

This comment has been minimized.

Copy link
@rhysd

rhysd Jun 19, 2019

Owner

This is very easy to understand. Thank you.

@rhysd
rhysd approved these changes Jun 19, 2019
@rhysd

This comment has been minimized.

Copy link
Owner

rhysd commented Jun 19, 2019

Do you want to write documentation? If you don't, it's ok to write up it by me after merging this.

add document for `g:clever_f_mark_direct` and
`g:clever_f_mark_direct_color`
@yuntan

This comment has been minimized.

Copy link
Contributor Author

yuntan commented Jun 25, 2019

wrote document. The documentation is ready for review.

Do you think make g:clever_f_mark_direct = 1 default?

@yuntan yuntan changed the title [WIP] Add feature to highlight characters to which the cursor can be moved directly [RFC] Add feature to highlight characters to which the cursor can be moved directly Jun 25, 2019
@rhysd

This comment has been minimized.

Copy link
Owner

rhysd commented Jun 26, 2019

Thank you for your suggestion. But clever-f.vim is a long live plugin. So I'm conservative against changing default behavior. Let me leave this feature optional for now.

@rhysd
rhysd approved these changes Jun 26, 2019
Copy link
Owner

rhysd left a comment

Documentation looks good.

@rhysd rhysd merged commit 5f447f3 into rhysd:master Jun 26, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@yuntan

This comment has been minimized.

Copy link
Contributor Author

yuntan commented Jun 26, 2019

OK. Thank you!

quinoa42 added a commit to quinoa42/dotfiles that referenced this pull request Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.