VSCodeVim/Vim

Different behavior recording vs executing macros

Open

#2,613 创建于 2018年5月4日

在 GitHub 查看
 (3 评论) (5 反应) (0 负责人)TypeScript (12,664 star) (1,271 fork)batch import
area/macrohelp wantedkind/bug

描述

Is this a BUG REPORT or FEATURE REQUEST? : Bug

What happened:

When recording macros, the behavior of the command w is different during recording than it is during execution. For instance, if you have a string and want to jump to the beginning of the word, during recording you have to press w twice to jump to the ' and then the beginning of the word. However, during execution the first time w fires the cursor goes straight to the beginning of the word, so the second recorded w will move the cursor to the next word and throw the entire sequence out of position.

How to reproduce it:

start with [ 'string', ] and cursor at the beginning

  1. qa
  2. w (cursor moves to ')
  3. w (cursor moves to s)
  4. yw w l l p
  5. q

during recording that yields ['string', string], but when you call it with @a it yields [ 'ststringring', ]

I think the problem is the ' character. When the example above executes, the w commands in steps 2 and 4 don't jump the cursor to ' like they do during recording.

Environment:

  • Extension (VsCodeVim) version: 0.11.5
  • VSCode version: 1.22.2
  • OS version: OSX 10.11.6

贡献者指南