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

Copy pasting inside of macros does not match Vim's behaviour #127

Open
davur opened this issue Apr 26, 2012 · 1 comment
Open

Copy pasting inside of macros does not match Vim's behaviour #127

davur opened this issue Apr 26, 2012 · 1 comment

Comments

@davur
Copy link

davur commented Apr 26, 2012

Say we have the text:
a
b
c

With the cursor on the line with the a on it (not in insert mode), try recording a macro (qq) that copies the line (yy) and pastes it underneath (p), then move to the next line (j). Stop recording (q).

Repeating this macro two more times (@q@q) in Vim gets you:
a
a
b
b
c
c

In the current version of sublime text I get
a
a
b
a
c
a

The full key sequence to replicate is:
qqyypjq@q@q

I'm sorry to just point out the issue and run, but I probably couldn't patch it myself (not quickly and elegantly at least).

@pconerly
Copy link

+1

In a django urls.py I have:

    url_ignore_case(r'^wedding$', TemplateView.as_view(template_name = 'v2/wedding/wedding.djhtml')),
    url_ignore_case(r'^evite$', TemplateView.as_view(template_name = 'v2/evite/evite.djhtml')),
    url_ignore_case(r'^editor$', TemplateView.as_view(template_name = 'v2/editor/editor.djhtml')),

and then I'm doing:

qd (start macro)
f^ l (find ^ and move over)
yt$ (yank everything before $)
f, f, (go to second comma)
i name=' [esc] p  (sublime automatically adds the second ' )

and I'm getting:

    url_ignore_case(r'^wedding$', TemplateView.as_view(template_name = 'v2/wedding/wedding.djhtml'), name='wedding'),
    url_ignore_case(r'^evite$', TemplateView.as_view(template_name = 'v2/evite/evite.djhtml'), name='wedding'),
    url_ignore_case(r'^editor$', TemplateView.as_view(template_name = 'v2/editor/editor.djhtml'), name='wedding'),

:(

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

2 participants