message: Slight refactor combining a few actions
diff: @@ -6,7 +6,7 @@ import { SearchCommandLine } from '../../cmd_line/commandLine';
  import { sorted } from '../../common/motion/position';
  import { configuration } from '../../configuration/configuration';
  import { VimError, ErrorCode } from '../../error';
  -import { Mode } from '../../mode/mode';
  +import { isVisualMode, Mode } from '../../mode/mode';
  import { Register } from '../../register/register';
  import { globalState } from '../../state/globalState';
  import { SearchState } from '../../state/searchState';
  @@ -142,16 +142,20 @@ async function createSearchStateAndMoveToMatch(args: {
  @RegisterAction
  class CommandSearchCurrentWordExactForward extends BaseCommand {
  - modes = [Mode.Normal];
  + modes = [Mode.Normal, Mode.Visual, Mode.VisualLine];
  keys = ['*'];
  override isMotion = true;
  override runsOnceForEachCountPrefix = true;
  override isJump = true;
  public override async exec(position: Position, vimState: VimState): Promise<void> {
  + if (isVisualMode(vimState.currentMode) && configuration.visualstar) {
  + await searchCurrentSelection(vimState, SearchDirection.Forward);
  + } else {
  await searchCurrentWord(position, vimState, SearchDirection.Forward, true);
  }
  }
  +}
  @RegisterAction
  class CommandSearchCurrentWordForward extends BaseCommand {
  @@ -166,35 +170,22 @@ class CommandSearchCurrentWordForward extends BaseCommand {
  }
  }
  -@RegisterAction
  -class CommandSearchVisualForward extends BaseCommand {
  - modes = [Mode.Visual, Mode.VisualLine];
  - keys = ['*'];
  - override isMotion = true;
  - override runsOnceForEachCountPrefix = true;
  - override isJump = true;
  -
  - public override async exec(position: Position, vimState: VimState): Promise<void> {
  - if (configuration.visualstar) {
  - await searchCurrentSelection(vimState, SearchDirection.Forward);
  - } else {
  - await searchCurrentWord(position, vimState, SearchDirection.Forward, true);
  - }
  - }
  -}
  -
  @RegisterAction
  class CommandSearchCurrentWordExactBackward extends BaseCommand {
  - modes = [Mode.Normal];
  + modes = [Mode.Normal, Mode.Visual, Mode.VisualLine];
  keys = ['#'];
  override isMotion = true;
  override runsOnceForEachCountPrefix = true;
  override isJump = true;
  public override async exec(position: Position, vimState: VimState): Promise<void> {
  + if (configuration.visualstar) {
  + await searchCurrentSelection(vimState, SearchDirection.Backward);
  + } else {
  await searchCurrentWord(position, vimState, SearchDirection.Backward, true);
  }
  }
  +}
  @RegisterAction
  class CommandSearchCurrentWordBackward extends BaseCommand {
  @@ -209,23 +200,6 @@ class CommandSearchCurrentWordBackward extends BaseCommand {
  }
  }
  -@RegisterAction
  -class CommandSearchVisualBackward extends BaseCommand {
  - modes = [Mode.Visual, Mode.VisualLine];
  - keys = ['#'];
  - override isMotion = true;
  - override runsOnceForEachCountPrefix = true;
  - override isJump = true;
  -
  - public override async exec(position: Position, vimState: VimState): Promise<void> {
  - if (configuration.visualstar) {
  - await searchCurrentSelection(vimState, SearchDirection.Backward);
  - } else {
  - await searchCurrentWord(position, vimState, SearchDirection.Backward, true);
  - }
  - }
  -}
  -
  @RegisterAction
  class CommandSearchForwards extends BaseCommand {
  modes = [Mode.Normal, Mode.Visual, Mode.VisualLine, Mode.VisualBlock];
  