Skip to content

Commit

Permalink
Changed all editorscroll commands to work in all visual modes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chillee committed Jun 24, 2017
1 parent e39ca99 commit 52d1a78
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/actions/commands/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ class CommandCtrlOpenBracket extends CommandEsc {
}

abstract class CommandEditorScroll extends BaseCommand {
modes = [ModeName.Normal];
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock];
runsOnceForEachCountPrefix = false;
keys: string[];
to: EditorScrollDirection;
Expand Down Expand Up @@ -561,31 +561,27 @@ class CommandCtrlY extends CommandEditorScroll {

@RegisterAction
class CommandMoveFullPageUp extends CommandEditorScroll {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock];
keys = ["<C-b>"];
to: EditorScrollDirection = "up";
by: EditorScrollByUnit = "page";
}

@RegisterAction
class CommandMoveFullPageDown extends CommandEditorScroll {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock];
keys = ["<C-f>"];
to: EditorScrollDirection = "down";
by: EditorScrollByUnit = "page";
}

@RegisterAction
class CommandMoveHalfPageDown extends CommandEditorScroll {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock];
keys = ["<C-d>"];
to: EditorScrollDirection = "down";
by: EditorScrollByUnit = "halfPage";
}

@RegisterAction
class CommandMoveHalfPageUp extends CommandEditorScroll {
modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock];
keys = ["<C-u>"];
to: EditorScrollDirection = "up";
by: EditorScrollByUnit = "halfPage";
Expand Down Expand Up @@ -1080,7 +1076,7 @@ export class MarkCommand extends BaseCommand {
public async exec(position: Position, vimState: VimState): Promise<VimState> {
const markName = this.keysPressed[1];


vimState.historyTracker.addMark(position, markName);

return vimState;
}
Expand Down

0 comments on commit 52d1a78

Please sign in to comment.