Skip to content

Commit

Permalink
Merge pull request #1428 from xconverge/gUU-and-guu
Browse files Browse the repository at this point in the history
gUU and guu
  • Loading branch information
xconverge authored Mar 25, 2017
2 parents 2e3ead5 + 4eb524e commit e02363e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2785,6 +2785,7 @@ class CommandUndo extends BaseCommand {
modes = [ModeName.Normal];
keys = ["u"];
runsOnceForEveryCursor() { return false; }
mustBeFirstKey = true;

public async exec(position: Position, vimState: VimState): Promise<VimState> {
const newPositions = await vimState.historyTracker.goBackHistoryStep();
Expand Down Expand Up @@ -5131,6 +5132,34 @@ class MoveFormat extends BaseMovement {
}
}

// Used for gUU
@RegisterAction
class MoveUpercaseLine extends BaseMovement {
modes = [ModeName.Normal];
keys = ["U"];

public async execAction(position: Position, vimState: VimState): Promise<IMovement> {
return {
start : position.getLineBegin(),
stop : position.getLineEnd(),
};
}
}

// Used for guu
@RegisterAction
class MoveLowercaseLine extends BaseMovement {
modes = [ModeName.Normal];
keys = ["u"];

public async execAction(position: Position, vimState: VimState): Promise<IMovement> {
return {
start : position.getLineBegin(),
stop : position.getLineEnd(),
};
}
}

@RegisterAction
class ActionDeleteLineVisualMode extends BaseCommand {
modes = [ModeName.Visual, ModeName.VisualLine];
Expand Down

0 comments on commit e02363e

Please sign in to comment.