Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to record a macro in sublime text 2?

I am using sublime text 2 and want to record a macro for uploading the current file vie transmit docsend (super+u) and saving it locally (super+s).

So I start to record a macro ctrl+q and see the status notification in the footer

Starting to record macro ...

Then I hit super+s and it saves and the upload it vie super+u. After hitting ctrl+q for stopping macrorecording the footer says

Stopping recording macro

But I do not have the Option in the menu "Tools/Playback macro" and when I hit save Macro it doesnt do anything.

Any Idea?

PS: I am working on OS X and I have no directory

/Library/Application\ Support/Sublime\ Text\ 2

Have I to create it as admin?

Thanks a lot

Now I realized that I dont need the folder /Library... but ~/Library...

But after saving the File ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/transmit-upload-and-save.sublime-macro

[
{"command": "save"},
{"command": "transmit_docksend"}
]

and adding the following to user shortcuts

[
{ "keys": ["super+u"], "command": "run_macro_file", "args": {"file": "Packages/User/transmit-upload-and-save.sublime-macro"} }
]

it does not save but uploads ... whats wrong?

like image 203
fvosberg Avatar asked Oct 21 '22 15:10

fvosberg


1 Answers

To simply playback last recorded Macro press Ctrl+Shift+q.

In Sublime Text2 Macros are not saved to file by default they reside in the macro buffer instead.
More here

The reason it's uploading is because your key is only defined as [super+u] which is for upload - it should be [super+s] for save.

Hope that helps

like image 199
obfuscate Avatar answered Oct 25 '22 22:10

obfuscate