VI "." command does not reapply append to line with parenthesis

  1. Enter VIM mode
  2. Using A command, append the following to a line of text (abc)
  3. Change from insert mode to command mode w/ ESC key
  4. Move to another line
  5. Use . command to reapply the previous action

Observe that the appended text is ()abc rather than (abc)

This has something to do with the auto pair brackets functionality. If you disable this in Settings > Editor > Auto pair brackets you will not have this issue.

I’m guessing that this happens because when this is enabled and you type the (, the corresponding ) is typed and the cursor is moved in between them so you can type. It is strange that if you type the closing ), it is swallowed (you don’t want to add additional closing brackets) and is not included in the . command vi repeat.

You will see similar issues with [], {}, etc. Anything that get’s the closing pair entered will have this issue.




Me personally, I disable the auto pair functionality as I’m going to be typing the closing character anyways, but I do agree that this is a bug.