Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Repeated macro with copy paste #210

Open
pastacolsugo opened this issue Jan 4, 2020 · 0 comments
Open

[BUG] Repeated macro with copy paste #210

pastacolsugo opened this issue Jan 4, 2020 · 0 comments

Comments

@pastacolsugo
Copy link

Problem:

You record a macro q that copies some text and pastes it. You repeat said macro n times with n@q. The macro is applied n times, but also the paste operation in the first macro execution is repeated n times.

Steps to reproduce:

  1. Open a buffer with a word per line, like this:
foo
bar
banana
apple
orange
  1. In Command Mode, place your cursor at the beginning of the file.
  2. Record this macro:
qq (record on q)
viw (select the word, foo in this case)
y$p (copy and paste at the end of the line
j (down one line)
0 (go to the beginning of the line)
q (stop recording)
  1. You should have:
foofoo
bar
banana
apple
orange

with your cursor at the beginning of the second line, in command mode.
5. Replay with 3@q

Expected result

foofoo
barbar
bananabanana
appleapple
orange

Actual result

foofoo
barbarbarbar
bananabanana
appleapple
orange

bar is pasted 3 times.

Version and OS

Sublime Text 3.2.2, Build 3211
Vintage mode enabled
MacOS High Sierra 10.13.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant