message: Be a bit smarter when figuring out how to repeat insertion with count
  Fixes
diff: @@ -68,23 +68,27 @@ export class CommandEscInsertMode extends BaseCommand {
  // If we wanted to repeat this insert (only for i and a), now is the time to do it. Insert
  // count amount of these strings before returning back to normal mode
  - const typeOfInsert =
  - vimState.recordedState.actionsRun[vimState.recordedState.actionsRun.length - 3];
  - const isTypeToRepeatInsert =
  - typeOfInsert instanceof CommandInsertAtCursor ||
  - typeOfInsert instanceof CommandInsertAfterCursor ||
  - typeOfInsert instanceof CommandInsertAtLineBegin ||
  - typeOfInsert instanceof CommandInsertAtLineEnd ||
  - typeOfInsert instanceof CommandInsertAtFirstCharacter ||
  - typeOfInsert instanceof CommandInsertAtLastChange;
  + const shouldRepeatInsert =
  + vimState.recordedState.count > 1 &&
  + vimState.recordedState.actionsRun.find(
  + (a) =>
  + a instanceof CommandInsertAtCursor ||
  + a instanceof CommandInsertAfterCursor ||
  + a instanceof CommandInsertAtLineBegin ||
  + a instanceof CommandInsertAtLineEnd ||
  + a instanceof CommandInsertAtFirstCharacter ||
  + a instanceof CommandInsertAtLastChange
  + ) !== undefined;
  // If this is the type to repeat insert, do this now
  - if (vimState.recordedState.count > 1 && isTypeToRepeatInsert) {
  - const changeAction = vimState.recordedState.actionsRun[
  - vimState.recordedState.actionsRun.length - 2
  - ] as DocumentContentChangeAction;
  -
  + if (shouldRepeatInsert) {
  + const changeAction = vimState.recordedState.actionsRun
  + .slice()
  + .reverse()
  + .find((a) => a instanceof DocumentContentChangeAction);
  + if (changeAction instanceof DocumentContentChangeAction) {
  // Add count amount of inserts in the case of 4i=<esc>
  + // TODO: A few actions such as <C-t> should be repeated, but are not
  for (let i = 0; i < vimState.recordedState.count - 1; i++) {
  // If this is the last transform, move cursor back one character
  const positionDiff =
  @@ -98,6 +102,7 @@ export class CommandEscInsertMode extends BaseCommand {
  );
  }
  }
  + }
  if (vimState.historyTracker.currentContentChanges.length > 0) {
  vimState.historyTracker.lastContentChanges = vimState.historyTracker.currentContentChanges;
  