Skip to content

Added ability to match do/end pairs plus fixed various bugs. #3

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevemadere
Copy link

New features:

  • Matches do/end pairs

Bugs fixed:

  • Works better when the cursor is on one of these: {[()]}
  • When the cursor is not on a supported matched end point
    or a match cannot be found, it used to jump to the beginning
    of the line. Now it stays put.
  • Uses the safer normal! instead of normal at various places.

Flaws:

  • Hacky use of 'normal! mZ' may screw up your marks

…art if no match found. flaw: Hacky use of mZ may screw up your marks
if starting_curr_word !~ '\<\(' . block_start_words . '\|end\)\>'
" otherwise, use the word at the beginning of the line
" remember where we were in case we abort
normal! mZ
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the hacky use of mZ.
It is a problem in that if the user had marked something else with mZ, this will override that and
would likely cause extreme confusion and frustration.
I am open to suggestions of how else to return to the exact location (line and column) at which user started.

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

Successfully merging this pull request may close these issues.

1 participant