microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.21k stars 28.86k forks source link

Macro recording #4490

Open fabiopicchi opened 8 years ago

fabiopicchi commented 8 years ago

It would be nice to be able to record a sequence of inputs and then reproduce it as in Notepad++ or Vim.

finalclass commented 8 years ago

This feature plus dired mode and vscode could compete with emacs.

DeltaCharlieAlpha commented 8 years ago

Major help when refactoring to have a recordable macro for repetitive edits.

mphaney commented 8 years ago

I'd love to see this, but one step further as in EditPlus, where multiple different macros can be recorded and assigned to different hotkeys. Makes it EXTREMELY nice to have common repetitive tasks assigned semi-permanently.

hazballae commented 7 years ago

+1 It would be great

d-akara commented 7 years ago

JEdit has a great macro implementation. It captures not only keyboard commands, but actions from menus as well. A script is created that you can then also save or modify.

Yayuro commented 7 years ago

+1

bradw2k commented 7 years ago

VSCode missing macros is the only reason I still have Sublime. I do repetitive editing by recording then playing back macros almost daily.

bradw2k commented 7 years ago

By the way, would love to be able to record a macro and then assign it to a keybinding. Visual Studio could do this in the 90's and it was great!

geddski commented 7 years ago

I wrote an extension that makes writing custom macros easy. Don't have recording yet, but it's still pretty convenient.

https://marketplace.visualstudio.com/items?itemName=geddski.macros

lekhnath commented 7 years ago

Cannot record macros in vscode :disappointed:

harrywstoic commented 7 years ago

+1 Would love to see ability to record / playback / keyboard-assign macros. Sublime Text, for example, is a very useful text triage tool, and one of the reasons for that is because you can playback repetitive tasks (for me it's usually preparing long lists of values for SQL statements). VSCode is very close.

rodison commented 7 years ago

I don't believe that VS Code doesn't have macro recording!!!! In Notepad++ and Sublime this funcionality exists and is very usefull. I will need now to reinstall Sublime because of this :(

rogierlommers commented 7 years ago

Oh yes! Would LOVE being able to record macros and re-play them until EOF.

CodeFreezr commented 7 years ago

Yes.

tiagolr commented 7 years ago

+1

miliu99 commented 7 years ago

Yes, would love to have it. I'm in process converting angular 1 to angular 2 manually, and need to do a lot of repeating "find and replace".

atisinger commented 7 years ago

Adding my support for this feature. It's the only thing I still open Notepadd++ for.

paulgreaterdata commented 7 years ago

+1

mandolyte commented 7 years ago

Just adding my support for recording macros; this with playback would eliminate my need to keep Notepad++.

JulienFerraro commented 7 years ago

@geddski when you say that your extension doesn't have recording yet, does this mean that it'll get recording in a (near ?) future ?

geddski commented 7 years ago

@JulienFerraro I'm not planning on adding recording but would happily merge a PR with it!

dreftymac commented 7 years ago

Workaround: Add a task that opens the current VSCode buffer in your other editor (e.g. Notepad++ or Vim) then make your changes there. Not elegant nor desirable shrug but it's a workaround.

dunstontc commented 7 years ago

+1

rogierlommers commented 7 years ago

This would be thé feature with makes VSC my default editor for daily usage.

Jakobud commented 7 years ago

Perhaps an alternative to full blown macro recording would be to add some sort of event listeners to the API. This could open the door for extension developers to build a macro recording extension. Ultimately the API would could listen for keystrokes and executed commands and pass those to the event listeners, then an extension could record and save them and then play them back at a later time. It's sort of a low-level piece of the macro-recording puzzle.

JackTrapper commented 7 years ago
greggman commented 7 years ago

I'm actually a little shocked that recordable macros wasn't on the short list of MVP for VSCode. I haven't used an editor in 30 years that hasn't had that feature and I use it quite often. Even Visual Studio has that feature.

I once also added a feature that let you insert the result of an expression. One of the inputs to the expression was the iteration count of the repeat command. So, you could effectively record something like

 insert-expression "(count*10+1000)"
 press enter

Then repeat that (think emacs Ctrl+R) so Ctrl+R 10 Ctrl- would end up making

 1000
 1010
 1020
 1030
 1040
 1050
 ...
mfgann commented 7 years ago

This is a critical feature for me. I was amazed at how much I was enjoying VS Code, and was letting friends and colleagues know about it, but this pushes me back to Sublime Text. I'd really enjoy it if it were Vim-like, in that you could have multiple macros recorded under different keys.

feoh commented 7 years ago

Gotta admit I'm rather shocked that recordable macros aren't a part of VS Code myself.

It seems inane that I need to cut and paste my working text into Vim just so I can build and run a macro :)

jpsala commented 7 years ago

+1 for macros, it is very convenient

disler commented 6 years ago

+1

rogierlommers commented 6 years ago

I was wondering, since people seem to like this (missing) feature. What is the reason why it's not available in VSC? Is it difficult to implement? Is there another reason?

feoh commented 6 years ago

It's a really excellent question. Unfortunately my Javascript skills are nascent at best so I'm no help, but IMO having recordable macros i sa de-rigeur feature for any programmer's editor, and I was totally shocked that an incredible editor like VSCode is missing this feature.

Could we maybe raise awareness about this bug and get a bunch of folks to +1? I'll send out a tweet and mention the issue along with @code - any other fora we can use to promote this?

rogierlommers commented 6 years ago

Well, please do so; I'll retweet :).

rogierlommers commented 6 years ago

Here you are, please retweet: https://twitter.com/rogierlommers/status/918520857563156481

dakuzen commented 6 years ago

+1 How is this not done already...

agence104 commented 6 years ago

+1 Looking forward to this feature.

Miggleness commented 6 years ago

+1 I just moved to mac and intended to make VS Code my default editor but then this...

ricardona commented 6 years ago

+1 I love saving time

xhw1 commented 6 years ago

+1

disler commented 6 years ago

+1 Please add I"m wasting time doing the same stuff over and over

sandos commented 6 years ago

I have used the mentioned macro extension from above, and it works very nicely. All that is needed is a recorder.

I did notice a small problem though. I wanted to, in emacs-speak, isearch-forward for a character and I failed to do it in a macro. For macros to be truly useful, everything needs to be scriptable. The problem with the search facility was that it opens the dialog and the macro does not seem to be able to control the search itself. Maybe there is an incremental search that I missed.

fabiopicchi commented 6 years ago

How do you think this feature works best? Builtin or as a plugin?

rogierlommers commented 6 years ago

I don't really care, as long as I can record/playback keystrokes :)

pdunc commented 6 years ago

+1

jrwrigh commented 6 years ago

+1 Honestly confused as to why it doesn't have a recorder

Mach12 commented 6 years ago

+1 It's been part of other major code editors for long now, VSCode needs this

AndyGee commented 6 years ago

+1

fredswims commented 6 years ago

++i The must be an underlying issue, yes?

itsbw commented 6 years ago

that's really an issue --- I need this feature almost every day for refactoring reasons and it's a blame to switch from vs code to notepad++ refactoring the code and then back to vs code

I would really recommend to put the feature on the high prio dev list

thx Juan