VSCodeVim/Vim

Different behavior recording vs executing macros

开放

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

 (3 条评论) (5 个反应) (0 位负责人)TypeScript (1,271 个派生)batch import
area/macrohelp wantedkind/bug

仓库指标

星标
 (12,664 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南