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

Add 'g C-a' like incremental increment functionality, support block selections, and more #11

Open
wants to merge 127 commits into
base: master
Choose a base branch
from

Conversation

juliapath
Copy link

I'm not sure if incremental increment is a good description, but it was the best I could come up with.

@noctuid
Copy link

noctuid commented May 8, 2018

There's an extra &optional that needs to be removed for this to work.

Jan Path added 2 commits November 5, 2018 13:16
For example suppose we have the following where | is point and $ is mark and
execute evil-numbers/inc-at-point.

```
|9 9$
```

Expected:

```
10 10
```

Actual:

```
10 9
```

This is because we would save the beginning and end of the region before we do
any changes, so the second 9 is pushed out of the saved region bounds by the
first 9 turning into a 10.
@juliapath
Copy link
Author

@noctuid Thank you.

Jan Path added 2 commits November 10, 2018 22:48
E.g. in the following position (where ^ shows where point is) we want to
increase 2, not 1 when calling inc-at-pt.

1 2
 ^
@juliapath juliapath changed the title Add 'g C-a' like incremental increment functionality. Add 'g C-a' like incremental increment functionality, support block selections, and some fixes. Nov 10, 2018
Jan Path added 3 commits November 10, 2018 23:18
Previously negative numbers were not padded at all. Specifically calling
inc-at-pt on -1 yields +1.
@juliapath juliapath changed the title Add 'g C-a' like incremental increment functionality, support block selections, and some fixes. Add 'g C-a' like incremental increment functionality, support block selections, and more Nov 11, 2018
Jan Path and others added 12 commits November 12, 2018 16:41
This can help people who defer a lot of package-loading.
Explicitly require evil.
The magic autoload comment only works automatically for defun and the like. For
macros such as evil-define-operator it will copy over the whole definition
resulting in errors due to other parts of the file not being loaded.
Autoload operators as interactive commands
Imagine we're editing hyphen-separated numbers like the following:

    cursor:          v
    text:   2020-01-02

When we invoke 'inc-at-pt', we want the last number to change:

    cursor:          v
    text:   2020-01-01

(Note that the number is decremented instead of being incremented due to
the leading '-'. This also matches Vim behavior)

However, evil-numbers currently change the first number instead:

    cursor:    v
    text:   2021-01-02

This patch fixes evil-numbers to match the expected behavior.
fix: handle hyphen-separated numbers correctly
Resolve Warning: looking-back called with 1 argument, but requires 2-3.
Also add explanation for why initialize in packages is needed.
This would have prevented bug #18,
as well as related issues from happening in the future.
There have been issues in the past where the newline
boundary was ignored. Add another test to ensure it's not.

Signed-off-by: Campbell Barton <[email protected]>
Add fill-column local variable.
This contains a few fixes and improvements which are now every well
tested and justify being in a release.
Avoids the need for manual formatting.
Avoids the need for `progn` adding/removing when using multiple
statements in the first condition.
Both give warnings with melpazoid.
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.

7 participants