-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement
change_line
mapping.
Resolves #244. * Implement preliminary change_line mapping As of this commit, given the input, where `|` denotes the cursor position: ``` let x = foo(args|); ``` `cS)(` yields: ``` let x = foo(| args ); ``` The indentation of `args` depends on the indentation rules for the filetype. We still need to iron out behavior for complex surrounds like HTML tags and functions. Currently, given the input, where `|` denotes the cursor position: ``` let x = foo(args|); ``` Both `csf` AND `cSf` with `bar` would yield: ``` let x = |bar(args); ``` This follows because the change target selection is just the `foo`. However, users may instead want the result to be: ``` let x = |bar( args ); ``` This is more useful because otherwise, `cs` and `cS` would be exhibiting the same behavior. * Write basic tests for change_line * Add missing `delimiters` type annotation for normal cache This is unrelated to the PR, but Kyle caught this while reviewing it and asked me to put it in.
- Loading branch information
Showing
4 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters