- Map ([|])(m|M) to motions to the prev|next start|end of Python functions
- Map ([|])([|]) to motions to the prev|next end|start of Python classes
Fixes#6213
This reduces the jank of the surround plugin substantially, fixes a number of bugs, and uses an InputBox for specifying tags.
Fixes#1818, fixes#5211, fixes#2893, fixes#6564, fixes#3386
- `I`, `gI`, `gi`
- `w` and `go` motions
- `<C-a>` in Insert mode
- `<C-y>` and `<C-e>` in Insert mode
- `.` after content change with `<BS>`, `<Del>`, and `<CR>`
Refs #5033
Rewrite `gq` reflow to apply manual spacing (including `joinspaces`
option) just when creating whitespace from what were linebreaks.
Fixes#6569
Fix precision around `textwidth`
Fixes#3509
I finally bit the bullet, deleted all of our put logic, and re-implemented it from scratch.
This includes `p`, `P`, `gp`, `gP`, `]p`, `[`, and `:put`.
In addition to cleaner, more maintainable code, this resulted in:
- Using replace transformations, which means better performance
- Fixing VisualBlock put and block-wise put (fixes#1796)
- Fixing put when the register contains a macro (fixes#3714)
- Fixing various other corner cases, particularly with regards to cursor placement
- Beefing up our test suite
I'm sure there are still obscure corner cases that we handle wrong, but it'll be easier going forward to fix them.
- Each register now points to an array - the i'th slot contains the content for the i'th cursor
- If there are more cursors than slots, the first slot is used as a backup
- Each slot contains either a RecordedState (in the case of a macro) or a string
- Newlines in those strings should be interpreted in the context of the associated RegisterMode
- The interface was changed somewhat to be safer and more consistent
I probably broke *something*, but the tests pass and this refactor enables further improvement of the terrible put logic, so I'll fix things as they come up.
- Rename word methods to be more intuitive
- Use Position methods instead of standalone functions
- Use an object for pseudo-kwargs
- Pass WordType instead of having separate methods for "big" words
- Take `TextDocument` as a parameter
The result is a bit verbose (a more fundamental refactor might be needed
at a later date), but it's consistent, safe, and extensible.
This prepares for some changes to fix corner cases in our word handling.
Refs #5663
This fixes some edge cases as well as doing the edits in parallel
Fixes#4915, Refs #5663
Known issue: interactive `:s` does not update the document until the last replace is confirmed
- Much better edit merging, so undoing/redoing should generally only take one replace
- Correct changelist edge cases
- Improve and organize related tests
Known issue: `U` after `O` is broken, but that's a small corner case and `U` is generally much better behaved now.