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

[Feature request] Not recorded macro: replacing file contents to contents of another file #1428

Closed
Kristinita opened this issue Oct 1, 2016 · 3 comments

Comments

@Kristinita
Copy link

Summary

I can not make a macro: replacing the file contents to the contents of another file.

Expected behavior

Good working macro.

Actual behavior

My saved .sublime-macro file

[
    {
        "args": null,
        "command": "select_all"
    },
    {
        "args": null,
        "command": "paste"
    }
]

Steps to reproduce

key evt: control+q
command: toggle_record_macro
key evt: control+a
command: select_all
key evt: control+c
command: copy_edit
key evt: control+w
command: close
key evt: control+a
command: select_all
key evt: control+v
command: paste_and_indent
key evt: control+s
command: save
key evt: control+q
command: toggle_record_macro

Replacing macro

Environment

Operating system and version:
Windows 10.0.14393
Sublime Text:
Build 3126

Thanks.

@keith-hall
Copy link
Collaborator

I might be wrong, but I have the idea that macros only work with TextCommands and not WindowCommands. Therefore making find and replace, closing a tab etc. not possible.

@Kristinita
Copy link
Author

Don't fix, but I close this issue. Reasons:

  1. We have Sublime Text packages for run multiple Sublime Text commands. I use ImprovedMacro package.
  2. We have gratis third-party tools for macros. In Windows, I use AutoHotkey.

It would be nice, if @jskinner and @wbond will not work in features that can already be done in Sublime Text packages.

Thanks.

@FichteFoll
Copy link
Collaborator

Since macros are entirely based on a single view, it doesn't make a lot of sense to support the particular use case displayed in this issue. Notably, it's not clear which file ST should open/focus after another one was closed and it may be that there is only one view, after which an anonymous view is opened instead. AHK seems like a better suited alternative, if you prepared the files ST is supposed to operate on appropriately, which you probably had to do anyway. Alternatively, plugins.

It makes sense to support find and replace operations, but we have a separate issue for that already.

@FichteFoll FichteFoll changed the title [Bug] Not recorded macro: replacing file contents to contents of another file Not recorded macro: replacing file contents to contents of another file Apr 21, 2017
@Kristinita Kristinita changed the title Not recorded macro: replacing file contents to contents of another file [Feature request] Not recorded macro: replacing file contents to contents of another file Apr 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants